James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ |
| 6 | #define UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ |
| 7 | |
| 8 | #include "base/basictypes.h" |
| 9 | #include "base/compiler_specific.h" |
| 10 | #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" |
| 11 | |
| 12 | namespace ui { |
| 13 | namespace test { |
| 14 | |
| 15 | class TestWebContentsHandler |
| 16 | : public WebDialogWebContentsDelegate::WebContentsHandler { |
| 17 | public: |
| 18 | TestWebContentsHandler(); |
| 19 | virtual ~TestWebContentsHandler(); |
| 20 | |
| 21 | private: |
| 22 | // Overridden from WebDialogWebContentsDelegate::WebContentsHandler: |
| 23 | virtual content::WebContents* OpenURLFromTab( |
| 24 | content::BrowserContext* context, |
| 25 | content::WebContents* source, |
James Robinson | e2ac7e8 | 2014-10-15 13:21:59 -0700 | [diff] [blame^] | 26 | const content::OpenURLParams& params) override; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 27 | virtual void AddNewContents(content::BrowserContext* context, |
| 28 | content::WebContents* source, |
| 29 | content::WebContents* new_contents, |
| 30 | WindowOpenDisposition disposition, |
| 31 | const gfx::Rect& initial_pos, |
James Robinson | e2ac7e8 | 2014-10-15 13:21:59 -0700 | [diff] [blame^] | 32 | bool user_gesture) override; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 33 | |
| 34 | DISALLOW_COPY_AND_ASSIGN(TestWebContentsHandler); |
| 35 | }; |
| 36 | |
| 37 | } // namespace test |
| 38 | } // namespace ui |
| 39 | |
| 40 | #endif // UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ |