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_EXTENSION_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "components/web_modal/web_contents_modal_dialog_host.h" | 9 #include "components/web_modal/web_contents_modal_dialog_host.h" |
10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
11 #include "extensions/browser/extension_host.h" | 11 #include "extensions/browser/extension_host.h" |
12 | 12 |
13 #if defined(TOOLKIT_VIEWS) | 13 #if defined(TOOLKIT_VIEWS) |
14 #include "chrome/browser/ui/views/extensions/extension_view_views.h" | 14 #include "chrome/browser/ui/views/extensions/extension_view_views.h" |
15 #elif defined(OS_MACOSX) | 15 #elif defined(OS_MACOSX) |
16 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" | 16 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" |
17 #elif defined(TOOLKIT_GTK) | |
18 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" | |
19 #elif defined(OS_ANDROID) | 17 #elif defined(OS_ANDROID) |
20 #include "chrome/browser/ui/android/extensions/extension_view_android.h" | 18 #include "chrome/browser/ui/android/extensions/extension_view_android.h" |
21 #endif | 19 #endif |
22 | 20 |
23 class Browser; | 21 class Browser; |
24 | 22 |
25 namespace content { | 23 namespace content { |
26 class SiteInstance; | 24 class SiteInstance; |
27 class WebContents; | 25 class WebContents; |
28 } | 26 } |
(...skipping 12 matching lines...) Expand all Loading... |
41 content::SiteInstance* site_instance, | 39 content::SiteInstance* site_instance, |
42 const GURL& url, | 40 const GURL& url, |
43 ViewType host_type); | 41 ViewType host_type); |
44 virtual ~ExtensionViewHost(); | 42 virtual ~ExtensionViewHost(); |
45 | 43 |
46 // TODO(jamescook): Create platform specific subclasses? | 44 // TODO(jamescook): Create platform specific subclasses? |
47 #if defined(TOOLKIT_VIEWS) | 45 #if defined(TOOLKIT_VIEWS) |
48 typedef ExtensionViewViews PlatformExtensionView; | 46 typedef ExtensionViewViews PlatformExtensionView; |
49 #elif defined(OS_MACOSX) | 47 #elif defined(OS_MACOSX) |
50 typedef ExtensionViewMac PlatformExtensionView; | 48 typedef ExtensionViewMac PlatformExtensionView; |
51 #elif defined(TOOLKIT_GTK) | |
52 typedef ExtensionViewGtk PlatformExtensionView; | |
53 #elif defined(OS_ANDROID) | 49 #elif defined(OS_ANDROID) |
54 // Android does not support extensions. | 50 // Android does not support extensions. |
55 typedef ExtensionViewAndroid PlatformExtensionView; | 51 typedef ExtensionViewAndroid PlatformExtensionView; |
56 #endif | 52 #endif |
57 | 53 |
58 PlatformExtensionView* view() { return view_.get(); } | 54 PlatformExtensionView* view() { return view_.get(); } |
59 | 55 |
60 // Create an ExtensionView and tie it to this host and |browser|. Note NULL | 56 // Create an ExtensionView and tie it to this host and |browser|. Note NULL |
61 // is a valid argument for |browser|. Extension views may be bound to | 57 // is a valid argument for |browser|. Extension views may be bound to |
62 // tab-contents hosted in ExternalTabContainer objects, which do not | 58 // tab-contents hosted in ExternalTabContainer objects, which do not |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Observer to detect when the associated web contents is destroyed. | 140 // Observer to detect when the associated web contents is destroyed. |
145 class AssociatedWebContentsObserver; | 141 class AssociatedWebContentsObserver; |
146 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; | 142 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; |
147 | 143 |
148 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); | 144 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); |
149 }; | 145 }; |
150 | 146 |
151 } // namespace extensions | 147 } // namespace extensions |
152 | 148 |
153 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ | 149 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ |
OLD | NEW |