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" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #if defined(TOOLKIT_VIEWS) | 45 #if defined(TOOLKIT_VIEWS) |
46 typedef ExtensionViewViews PlatformExtensionView; | 46 typedef ExtensionViewViews PlatformExtensionView; |
47 #elif defined(OS_MACOSX) | 47 #elif defined(OS_MACOSX) |
48 typedef ExtensionViewMac PlatformExtensionView; | 48 typedef ExtensionViewMac PlatformExtensionView; |
49 #elif defined(OS_ANDROID) | 49 #elif defined(OS_ANDROID) |
50 // Android does not support extensions. | 50 // Android does not support extensions. |
51 typedef ExtensionViewAndroid PlatformExtensionView; | 51 typedef ExtensionViewAndroid PlatformExtensionView; |
52 #endif | 52 #endif |
53 | 53 |
54 PlatformExtensionView* view() { return view_.get(); } | 54 PlatformExtensionView* view() { return view_.get(); } |
| 55 const PlatformExtensionView* view() const { return view_.get(); } |
55 | 56 |
56 // Create an ExtensionView and tie it to this host and |browser|. Note NULL | 57 // Create an ExtensionView and tie it to this host and |browser|. Note NULL |
57 // is a valid argument for |browser|. Extension views may be bound to | 58 // is a valid argument for |browser|. Extension views may be bound to |
58 // tab-contents hosted in ExternalTabContainer objects, which do not | 59 // tab-contents hosted in ExternalTabContainer objects, which do not |
59 // instantiate Browser objects. | 60 // instantiate Browser objects. |
60 void CreateView(Browser* browser); | 61 void CreateView(Browser* browser); |
61 | 62 |
62 void SetAssociatedWebContents(content::WebContents* web_contents); | 63 void SetAssociatedWebContents(content::WebContents* web_contents); |
63 | 64 |
64 // Handles keyboard events that were not handled by HandleKeyboardEvent(). | 65 // Handles keyboard events that were not handled by HandleKeyboardEvent(). |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Observer to detect when the associated web contents is destroyed. | 141 // Observer to detect when the associated web contents is destroyed. |
141 class AssociatedWebContentsObserver; | 142 class AssociatedWebContentsObserver; |
142 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; | 143 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; |
143 | 144 |
144 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); | 145 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); |
145 }; | 146 }; |
146 | 147 |
147 } // namespace extensions | 148 } // namespace extensions |
148 | 149 |
149 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ | 150 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ |
OLD | NEW |