Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: extensions/browser/app_window/test_app_window_contents.h

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698