OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIN_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // Overridden from NotificationObserver: | 180 // Overridden from NotificationObserver: |
181 virtual void Observe(NotificationType type, | 181 virtual void Observe(NotificationType type, |
182 const NotificationSource& source, | 182 const NotificationSource& source, |
183 const NotificationDetails& details); | 183 const NotificationDetails& details); |
184 | 184 |
185 // Returns the ExternalTabContainer instance associated with the cookie | 185 // Returns the ExternalTabContainer instance associated with the cookie |
186 // passed in. It also erases the corresponding reference from the map. | 186 // passed in. It also erases the corresponding reference from the map. |
187 // Returns NULL if we fail to find the cookie in the map. | 187 // Returns NULL if we fail to find the cookie in the map. |
188 static scoped_refptr<ExternalTabContainer> RemovePendingTab(uintptr_t cookie); | 188 static scoped_refptr<ExternalTabContainer> RemovePendingTab(uintptr_t cookie); |
189 | 189 |
190 // Enables extension automation (for e.g. UITests), with the current tab | |
191 // used as a conduit for the extension API messages being handled by the | |
192 // automation client. | |
193 void SetEnableExtensionAutomation( | |
194 const std::vector<std::string>& functions_enabled); | |
195 | |
196 // Overridden from views::WidgetWin: | 190 // Overridden from views::WidgetWin: |
197 virtual views::Window* GetWindow(); | 191 virtual views::Window* GetWindow(); |
198 | 192 |
199 // Handles the specified |accelerator| being pressed. | 193 // Handles the specified |accelerator| being pressed. |
200 bool AcceleratorPressed(const views::Accelerator& accelerator); | 194 bool AcceleratorPressed(const views::Accelerator& accelerator); |
201 | 195 |
202 bool pending() const { | 196 bool pending() const { |
203 return pending_; | 197 return pending_; |
204 } | 198 } |
205 | 199 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 291 |
298 // whether top level URL requests are to be handled by the automation client. | 292 // whether top level URL requests are to be handled by the automation client. |
299 bool handle_top_level_requests_; | 293 bool handle_top_level_requests_; |
300 | 294 |
301 // Scoped browser object for this ExternalTabContainer instance. | 295 // Scoped browser object for this ExternalTabContainer instance. |
302 scoped_ptr<Browser> browser_; | 296 scoped_ptr<Browser> browser_; |
303 | 297 |
304 // Contains ExternalTabContainers that have not been connected to as yet. | 298 // Contains ExternalTabContainers that have not been connected to as yet. |
305 static base::LazyInstance<PendingTabs> pending_tabs_; | 299 static base::LazyInstance<PendingTabs> pending_tabs_; |
306 | 300 |
307 // True if this tab is currently the conduit for extension API automation. | |
308 bool enabled_extension_automation_; | |
309 | |
310 // Allows us to run tasks on the ExternalTabContainer instance which are | 301 // Allows us to run tasks on the ExternalTabContainer instance which are |
311 // bound by its lifetime. | 302 // bound by its lifetime. |
312 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; | 303 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; |
313 | 304 |
314 // The URL request context to be used for this tab. Can be NULL. | 305 // The URL request context to be used for this tab. Can be NULL. |
315 scoped_refptr<ChromeURLRequestContextGetter> request_context_; | 306 scoped_refptr<ChromeURLRequestContextGetter> request_context_; |
316 | 307 |
317 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 308 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
318 | 309 |
319 // A mapping between accelerators and commands. | 310 // A mapping between accelerators and commands. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 return false; | 398 return false; |
408 } | 399 } |
409 | 400 |
410 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, | 401 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, |
411 bool* proceed_to_fire_unload) { | 402 bool* proceed_to_fire_unload) { |
412 NOTREACHED(); | 403 NOTREACHED(); |
413 } | 404 } |
414 }; | 405 }; |
415 | 406 |
416 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 407 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
OLD | NEW |