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

Side by Side Diff: extensions/browser/app_window/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_APP_WINDOW_CONTENTS_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_ 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 // AppWindowContents class specific to app windows. It maintains a 25 // AppWindowContents class specific to app windows. It maintains a
26 // WebContents instance and observes it for the purpose of passing 26 // WebContents instance and observes it for the purpose of passing
27 // messages to the extensions system. 27 // messages to the extensions system.
28 class AppWindowContentsImpl : public AppWindowContents, 28 class AppWindowContentsImpl : public AppWindowContents,
29 public content::WebContentsObserver { 29 public content::WebContentsObserver {
30 public: 30 public:
31 explicit AppWindowContentsImpl(AppWindow* host); 31 explicit AppWindowContentsImpl(AppWindow* host);
32 ~AppWindowContentsImpl() override; 32 ~AppWindowContentsImpl() override;
33 33
34 // AppWindowContents 34 // AppWindowContents
35 void Initialize(content::BrowserContext* context, const GURL& url) override; 35 void Initialize(content::BrowserContext* context,
36 content::RenderFrameHost* creator_frame,
37 const GURL& url) override;
36 void LoadContents(int32_t creator_process_id) override; 38 void LoadContents(int32_t creator_process_id) override;
37 void NativeWindowChanged(NativeAppWindow* native_app_window) override; 39 void NativeWindowChanged(NativeAppWindow* native_app_window) override;
38 void NativeWindowClosed() override; 40 void NativeWindowClosed() override;
39 void DispatchWindowShownForTests() const override; 41 void DispatchWindowShownForTests() const override;
40 void OnWindowReady() override; 42 void OnWindowReady() override;
41 content::WebContents* GetWebContents() const override; 43 content::WebContents* GetWebContents() const override;
42 WindowController* GetWindowController() const override; 44 WindowController* GetWindowController() const override;
43 45
44 private: 46 private:
45 // content::WebContentsObserver 47 // content::WebContentsObserver
46 bool OnMessageReceived(const IPC::Message& message) override; 48 bool OnMessageReceived(const IPC::Message& message) override;
47 void ReadyToCommitNavigation(content::NavigationHandle* handle) override; 49 void ReadyToCommitNavigation(content::NavigationHandle* handle) override;
48 50
49 void UpdateDraggableRegions(const std::vector<DraggableRegion>& regions); 51 void UpdateDraggableRegions(const std::vector<DraggableRegion>& regions);
50 void SuspendRenderFrameHost(content::RenderFrameHost* rfh); 52 void SuspendRenderFrameHost(content::RenderFrameHost* rfh);
51 53
52 AppWindow* host_; // This class is owned by |host_| 54 AppWindow* host_; // This class is owned by |host_|
53 GURL url_; 55 GURL url_;
54 scoped_ptr<content::WebContents> web_contents_; 56 scoped_ptr<content::WebContents> web_contents_;
55 bool is_blocking_requests_; 57 bool is_blocking_requests_;
56 bool is_window_ready_; 58 bool is_window_ready_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(AppWindowContentsImpl); 60 DISALLOW_COPY_AND_ASSIGN(AppWindowContentsImpl);
59 }; 61 };
60 62
61 } // namespace extensions 63 } // namespace extensions
62 64
63 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_ 65 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698