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

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

Issue 1211003006: [Extensions OOPI] Update app window bindings for OOPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
12 #include "extensions/browser/app_window/app_window.h" 11 #include "extensions/browser/app_window/app_window.h"
13 #include "url/gurl.h" 12 #include "url/gurl.h"
14 13
15 namespace content { 14 namespace content {
16 class BrowserContext; 15 class BrowserContext;
16 class RenderFrameHost;
17 } 17 }
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 struct DraggableRegion; 21 struct DraggableRegion;
22 22
23 // AppWindowContents class specific to app windows. It maintains a 23 // AppWindowContents class specific to app windows. It maintains a
24 // WebContents instance and observes it for the purpose of passing 24 // WebContents instance and observes it for the purpose of passing
25 // messages to the extensions system. 25 // messages to the extensions system.
26 class AppWindowContentsImpl : public AppWindowContents, 26 class AppWindowContentsImpl : public AppWindowContents,
27 public content::WebContentsObserver { 27 public content::WebContentsObserver {
28 public: 28 public:
29 explicit AppWindowContentsImpl(AppWindow* host); 29 explicit AppWindowContentsImpl(AppWindow* host);
30 ~AppWindowContentsImpl() override; 30 ~AppWindowContentsImpl() override;
31 31
32 // AppWindowContents 32 // AppWindowContents
33 void Initialize(content::BrowserContext* context, const GURL& url) override; 33 void Initialize(content::BrowserContext* context, const GURL& url) override;
34 void LoadContents(int32 creator_process_id) override; 34 void LoadContents(int32 creator_process_id) override;
35 void NativeWindowChanged(NativeAppWindow* native_app_window) override; 35 void NativeWindowChanged(NativeAppWindow* native_app_window) override;
36 void NativeWindowClosed() override; 36 void NativeWindowClosed() override;
37 void DispatchWindowShownForTests() const override; 37 void DispatchWindowShownForTests() const override;
38 content::WebContents* GetWebContents() const override; 38 content::WebContents* GetWebContents() const override;
39 WindowController* GetWindowController() const override; 39 WindowController* GetWindowController() const override;
40 40
41 private: 41 private:
42 // content::WebContentsObserver 42 // content::WebContentsObserver
43 bool OnMessageReceived(const IPC::Message& message) override; 43 bool OnMessageReceived(const IPC::Message& message) override;
44 44
45 void UpdateDraggableRegions(const std::vector<DraggableRegion>& regions); 45 void UpdateDraggableRegions(const std::vector<DraggableRegion>& regions);
46 void SuspendRenderViewHost(content::RenderViewHost* rvh); 46 void SuspendRenderFrameHost(content::RenderFrameHost* rfh);
47 47
48 AppWindow* host_; // This class is owned by |host_| 48 AppWindow* host_; // This class is owned by |host_|
49 GURL url_; 49 GURL url_;
50 scoped_ptr<content::WebContents> web_contents_; 50 scoped_ptr<content::WebContents> web_contents_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(AppWindowContentsImpl); 52 DISALLOW_COPY_AND_ASSIGN(AppWindowContentsImpl);
53 }; 53 };
54 54
55 } // namespace extensions 55 } // namespace extensions
56 56
57 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_ 57 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698