OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ |
6 #define EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "extensions/browser/app_window/app_window.h" | 11 #include "extensions/browser/app_window/app_window.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class WebContents; | 14 class WebContents; |
15 } | 15 } |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 // A dummy version of AppWindowContents for unit tests. | 19 // A dummy version of AppWindowContents for unit tests. |
20 // Best used with AppWindow::SetAppWindowContentsForTesting(). | 20 // Best used with AppWindow::SetAppWindowContentsForTesting(). |
21 class TestAppWindowContents : public AppWindowContents { | 21 class TestAppWindowContents : public AppWindowContents { |
22 public: | 22 public: |
23 explicit TestAppWindowContents(content::WebContents* web_contents); | 23 explicit TestAppWindowContents(content::WebContents* web_contents); |
24 ~TestAppWindowContents() override; | 24 ~TestAppWindowContents() override; |
25 | 25 |
26 // apps:AppWindowContents: | 26 // apps:AppWindowContents: |
27 void Initialize(content::BrowserContext* context, const GURL& url) override; | 27 void Initialize(content::BrowserContext* context, |
| 28 content::RenderFrameHost* creator_frame, |
| 29 const GURL& url) override; |
28 void LoadContents(int32_t creator_process_id) override; | 30 void LoadContents(int32_t creator_process_id) override; |
29 void NativeWindowChanged(NativeAppWindow* native_app_window) override; | 31 void NativeWindowChanged(NativeAppWindow* native_app_window) override; |
30 void NativeWindowClosed() override; | 32 void NativeWindowClosed() override; |
31 void DispatchWindowShownForTests() const override; | 33 void DispatchWindowShownForTests() const override; |
32 void OnWindowReady() override; | 34 void OnWindowReady() override; |
33 content::WebContents* GetWebContents() const override; | 35 content::WebContents* GetWebContents() const override; |
34 WindowController* GetWindowController() const override; | 36 WindowController* GetWindowController() const override; |
35 | 37 |
36 private: | 38 private: |
37 scoped_ptr<content::WebContents> web_contents_; | 39 scoped_ptr<content::WebContents> web_contents_; |
38 | 40 |
39 DISALLOW_COPY_AND_ASSIGN(TestAppWindowContents); | 41 DISALLOW_COPY_AND_ASSIGN(TestAppWindowContents); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace extensions | 44 } // namespace extensions |
43 | 45 |
44 #endif // EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | 46 #endif // EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ |
OLD | NEW |