OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | |
6 #define EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | |
7 | |
8 #include "extensions/browser/app_window/app_window.h" | |
9 | |
10 namespace extensions { | |
11 | |
12 // A dummy version of AppWindowContents for unit tests. | |
13 // Best used with AppWindow::SetAppWindowContentsForTesting(). | |
James Cook
2014/11/17 17:48:36
Thanks for the helpful class comment!
| |
14 class TestAppWindowContents : public AppWindowContents { | |
15 public: | |
16 explicit TestAppWindowContents(content::WebContents* web_contents); | |
James Cook
2014/11/17 17:48:36
nit: While not strictly necessary, forward declare
Yoyo Zhou
2014/11/17 23:55:26
Done.
| |
17 ~TestAppWindowContents() override; | |
18 | |
19 // apps:AppWindowContents: | |
20 void Initialize(content::BrowserContext* context, const GURL& url) override; | |
21 void LoadContents(int32 creator_process_id) override; | |
22 void NativeWindowChanged(NativeAppWindow* native_app_window) override; | |
23 void NativeWindowClosed() override; | |
24 void DispatchWindowShownForTests() const override; | |
25 content::WebContents* GetWebContents() const override; | |
26 | |
27 private: | |
28 scoped_ptr<content::WebContents> web_contents_; | |
29 }; | |
James Cook
2014/11/17 17:48:36
DISALLOW_COPY_AND_ASSIGN + macros.h?
Yoyo Zhou
2014/11/17 23:55:26
Done.
| |
30 | |
31 } // namespace extensions | |
32 | |
33 #endif // EXTENSIONS_BROWSER_APP_WINDOW_TEST_APP_WINDOW_CONTENTS_ | |
OLD | NEW |