OLD | NEW |
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 CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h" | 12 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h" |
13 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
14 #include "extensions/browser/app_window/app_window.h" | 14 #include "extensions/browser/app_window/app_window.h" |
15 #include "extensions/browser/extension_function_dispatcher.h" | 15 #include "extensions/browser/extension_function_dispatcher.h" |
16 | 16 |
17 class AshPanelWindowController; | 17 class AshPanelWindowController; |
18 class GURL; | 18 class GURL; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 class RenderViewHost; | 21 class RenderViewHost; |
22 } | 22 } |
23 | 23 |
24 namespace extensions { | |
25 struct DraggableRegion; | |
26 } | |
27 | |
28 // extensions::AppWindowContents class specific to panel windows created by v1 | 24 // extensions::AppWindowContents class specific to panel windows created by v1 |
29 // extenstions. This class maintains a WebContents instance and observes it for | 25 // extenstions. This class maintains a WebContents instance and observes it for |
30 // the purpose of passing messages to the extensions system. It also creates | 26 // the purpose of passing messages to the extensions system. It also creates |
31 // an extensions::WindowController instance for interfacing with the v1 | 27 // an extensions::WindowController instance for interfacing with the v1 |
32 // extensions API. | 28 // extensions API. |
33 class AshPanelContents | 29 class AshPanelContents |
34 : public extensions::AppWindowContents, | 30 : public extensions::AppWindowContents, |
35 public content::WebContentsObserver, | 31 public content::WebContentsObserver, |
36 public LauncherFaviconLoader::Delegate, | 32 public LauncherFaviconLoader::Delegate, |
37 public extensions::ExtensionFunctionDispatcher::Delegate { | 33 public extensions::ExtensionFunctionDispatcher::Delegate { |
38 public: | 34 public: |
39 explicit AshPanelContents(extensions::AppWindow* host); | 35 explicit AshPanelContents(extensions::AppWindow* host); |
40 virtual ~AshPanelContents(); | 36 virtual ~AshPanelContents(); |
41 | 37 |
42 // extensions::AppWindowContents | 38 // extensions::AppWindowContents |
43 virtual void Initialize(content::BrowserContext* context, | 39 virtual void Initialize(content::BrowserContext* context, |
44 const GURL& url) OVERRIDE; | 40 const GURL& url) OVERRIDE; |
45 virtual void LoadContents(int32 creator_process_id) OVERRIDE; | 41 virtual void LoadContents(int32 creator_process_id) OVERRIDE; |
46 virtual void NativeWindowChanged( | 42 virtual void NativeWindowChanged( |
47 extensions::NativeAppWindow* native_app_window) OVERRIDE; | 43 native_app_window::NativeAppWindow* native_app_window) OVERRIDE; |
48 virtual void NativeWindowClosed() OVERRIDE; | 44 virtual void NativeWindowClosed() OVERRIDE; |
49 virtual void DispatchWindowShownForTests() const OVERRIDE; | 45 virtual void DispatchWindowShownForTests() const OVERRIDE; |
50 virtual content::WebContents* GetWebContents() const OVERRIDE; | 46 virtual content::WebContents* GetWebContents() const OVERRIDE; |
51 | 47 |
52 // LauncherFaviconLoader::Delegate overrides: | 48 // LauncherFaviconLoader::Delegate overrides: |
53 virtual void FaviconUpdated() OVERRIDE; | 49 virtual void FaviconUpdated() OVERRIDE; |
54 | 50 |
55 // extensions::ExtensionFunctionDispatcher::Delegate | 51 // extensions::ExtensionFunctionDispatcher::Delegate |
56 virtual extensions::WindowController* GetExtensionWindowController() const | 52 virtual extensions::WindowController* GetExtensionWindowController() const |
57 OVERRIDE; | 53 OVERRIDE; |
(...skipping 14 matching lines...) Expand all Loading... |
72 scoped_ptr<content::WebContents> web_contents_; | 68 scoped_ptr<content::WebContents> web_contents_; |
73 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 69 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
74 extension_function_dispatcher_; | 70 extension_function_dispatcher_; |
75 scoped_ptr<AshPanelWindowController> window_controller_; | 71 scoped_ptr<AshPanelWindowController> window_controller_; |
76 scoped_ptr<LauncherFaviconLoader> launcher_favicon_loader_; | 72 scoped_ptr<LauncherFaviconLoader> launcher_favicon_loader_; |
77 | 73 |
78 DISALLOW_COPY_AND_ASSIGN(AshPanelContents); | 74 DISALLOW_COPY_AND_ASSIGN(AshPanelContents); |
79 }; | 75 }; |
80 | 76 |
81 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_ASH_PANEL_CONTENTS_H_ |
OLD | NEW |