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> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "extensions/browser/app_window/app_window.h" | 11 #include "extensions/browser/app_window/app_window.h" |
10 | 12 |
11 namespace content { | 13 namespace content { |
12 class WebContents; | 14 class WebContents; |
13 } | 15 } |
14 | 16 |
15 namespace extensions { | 17 namespace extensions { |
16 | 18 |
17 // A dummy version of AppWindowContents for unit tests. | 19 // A dummy version of AppWindowContents for unit tests. |
18 // Best used with AppWindow::SetAppWindowContentsForTesting(). | 20 // Best used with AppWindow::SetAppWindowContentsForTesting(). |
19 class TestAppWindowContents : public AppWindowContents { | 21 class TestAppWindowContents : public AppWindowContents { |
20 public: | 22 public: |
21 explicit TestAppWindowContents(content::WebContents* web_contents); | 23 explicit TestAppWindowContents(content::WebContents* web_contents); |
22 ~TestAppWindowContents() override; | 24 ~TestAppWindowContents() override; |
23 | 25 |
24 // apps:AppWindowContents: | 26 // apps:AppWindowContents: |
25 void Initialize(content::BrowserContext* context, const GURL& url) override; | 27 void Initialize(content::BrowserContext* context, const GURL& url) override; |
26 void LoadContents(int32 creator_process_id) override; | 28 void LoadContents(int32_t creator_process_id) override; |
27 void NativeWindowChanged(NativeAppWindow* native_app_window) override; | 29 void NativeWindowChanged(NativeAppWindow* native_app_window) override; |
28 void NativeWindowClosed() override; | 30 void NativeWindowClosed() override; |
29 void DispatchWindowShownForTests() const override; | 31 void DispatchWindowShownForTests() const override; |
30 void OnWindowReady() override; | 32 void OnWindowReady() override; |
31 content::WebContents* GetWebContents() const override; | 33 content::WebContents* GetWebContents() const override; |
32 WindowController* GetWindowController() const override; | 34 WindowController* GetWindowController() const override; |
33 | 35 |
34 private: | 36 private: |
35 scoped_ptr<content::WebContents> web_contents_; | 37 scoped_ptr<content::WebContents> web_contents_; |
36 | 38 |
37 DISALLOW_COPY_AND_ASSIGN(TestAppWindowContents); | 39 DISALLOW_COPY_AND_ASSIGN(TestAppWindowContents); |
38 }; | 40 }; |
39 | 41 |
40 } // namespace extensions | 42 } // namespace extensions |
41 | 43 |
42 #endif // EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | 44 #endif // EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ |
OLD | NEW |