OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_EXTERNAL_TAB_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ | 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual void URLStarredChanged(TabContents* source, bool starred); | 108 virtual void URLStarredChanged(TabContents* source, bool starred); |
109 virtual void UpdateTargetURL(TabContents* source, const GURL& url); | 109 virtual void UpdateTargetURL(TabContents* source, const GURL& url); |
110 virtual void ContentsZoomChange(bool zoom_in); | 110 virtual void ContentsZoomChange(bool zoom_in); |
111 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); | 111 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); |
112 virtual void ForwardMessageToExternalHost(const std::string& message, | 112 virtual void ForwardMessageToExternalHost(const std::string& message, |
113 const std::string& origin, | 113 const std::string& origin, |
114 const std::string& target); | 114 const std::string& target); |
115 virtual bool IsExternalTabContainer() const { | 115 virtual bool IsExternalTabContainer() const { |
116 return true; | 116 return true; |
117 }; | 117 }; |
| 118 virtual gfx::NativeWindow GetFrameNativeWindow(); |
118 | 119 |
119 virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 120 virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
120 | 121 |
121 virtual bool TakeFocus(bool reverse); | 122 virtual bool TakeFocus(bool reverse); |
122 | 123 |
123 virtual bool CanDownload(int request_id); | 124 virtual bool CanDownload(int request_id); |
124 | 125 |
125 virtual bool OnGoToEntryOffset(int offset); | 126 virtual bool OnGoToEntryOffset(int offset); |
126 | 127 |
127 virtual void ShowPageInfo(Profile* profile, | 128 virtual void ShowPageInfo(Profile* profile, |
128 const GURL& url, | 129 const GURL& url, |
129 const NavigationEntry::SSLStatus& ssl, | 130 const NavigationEntry::SSLStatus& ssl, |
130 bool show_history); | 131 bool show_history); |
131 | 132 |
| 133 virtual Browser* GetBrowser() { return browser_.get(); } |
| 134 |
132 // Overridden from NotificationObserver: | 135 // Overridden from NotificationObserver: |
133 virtual void Observe(NotificationType type, | 136 virtual void Observe(NotificationType type, |
134 const NotificationSource& source, | 137 const NotificationSource& source, |
135 const NotificationDetails& details); | 138 const NotificationDetails& details); |
136 | 139 |
137 // Handles the context menu display operation. This allows external | 140 // Handles the context menu display operation. This allows external |
138 // hosts to customize the menu. | 141 // hosts to customize the menu. |
139 virtual bool HandleContextMenu(const ContextMenuParams& params); | 142 virtual bool HandleContextMenu(const ContextMenuParams& params); |
140 | 143 |
141 // Executes the context menu command identified by the command | 144 // Executes the context menu command identified by the command |
(...skipping 11 matching lines...) Expand all Loading... |
153 // passed in. It also erases the corresponding reference from the map. | 156 // passed in. It also erases the corresponding reference from the map. |
154 // Returns NULL if we fail to find the cookie in the map. | 157 // Returns NULL if we fail to find the cookie in the map. |
155 static ExternalTabContainer* RemovePendingTab(intptr_t cookie); | 158 static ExternalTabContainer* RemovePendingTab(intptr_t cookie); |
156 | 159 |
157 // Enables extension automation (for e.g. UITests), with the current tab | 160 // Enables extension automation (for e.g. UITests), with the current tab |
158 // used as a conduit for the extension API messages being handled by the | 161 // used as a conduit for the extension API messages being handled by the |
159 // automation client. | 162 // automation client. |
160 void SetEnableExtensionAutomation( | 163 void SetEnableExtensionAutomation( |
161 const std::vector<std::string>& functions_enabled); | 164 const std::vector<std::string>& functions_enabled); |
162 | 165 |
| 166 // Overridden from views::WidgetWin: |
| 167 virtual views::Window* GetWindow(); |
| 168 |
163 protected: | 169 protected: |
164 // Overridden from views::WidgetWin: | 170 // Overridden from views::WidgetWin: |
165 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); | 171 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); |
166 virtual void OnDestroy(); | 172 virtual void OnDestroy(); |
167 virtual void OnFinalMessage(HWND window); | 173 virtual void OnFinalMessage(HWND window); |
168 | 174 |
169 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, | 175 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, |
170 NavigationType::Type nav_type, | 176 NavigationType::Type nav_type, |
171 int relative_offset); | 177 int relative_offset); |
172 void Navigate(const GURL& url, const GURL& referrer); | 178 void Navigate(const GURL& url, const GURL& referrer); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // bound by its lifetime. | 233 // bound by its lifetime. |
228 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; | 234 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; |
229 | 235 |
230 // The URL request context to be used for this tab. Can be NULL. | 236 // The URL request context to be used for this tab. Can be NULL. |
231 scoped_refptr<ChromeURLRequestContextGetter> request_context_; | 237 scoped_refptr<ChromeURLRequestContextGetter> request_context_; |
232 | 238 |
233 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); | 239 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); |
234 }; | 240 }; |
235 | 241 |
236 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ | 242 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
OLD | NEW |