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