| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" |
| 16 #include "chrome/browser/automation/automation_resource_message_filter.h" | 17 #include "chrome/browser/automation/automation_resource_message_filter.h" |
| 17 #include "chrome/browser/infobars/infobar_container.h" | 18 #include "chrome/browser/infobars/infobar_container.h" |
| 18 #include "chrome/browser/net/chrome_url_request_context.h" | 19 #include "chrome/browser/net/chrome_url_request_context.h" |
| 19 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 20 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" |
| 20 #include "chrome/browser/ui/views/frame/browser_bubble_host.h" | 21 #include "chrome/browser/ui/views/frame/browser_bubble_host.h" |
| 21 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 22 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
| 22 #include "content/browser/tab_contents/tab_contents_delegate.h" | 23 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 23 #include "content/browser/tab_contents/tab_contents_observer.h" | 24 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 24 #include "content/public/browser/navigation_types.h" | 25 #include "content/public/browser/navigation_types.h" |
| 25 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 bool load_requests_via_automation_; | 297 bool load_requests_via_automation_; |
| 297 | 298 |
| 298 // whether top level URL requests are to be handled by the automation client. | 299 // whether top level URL requests are to be handled by the automation client. |
| 299 bool handle_top_level_requests_; | 300 bool handle_top_level_requests_; |
| 300 | 301 |
| 301 // Contains ExternalTabContainers that have not been connected to as yet. | 302 // Contains ExternalTabContainers that have not been connected to as yet. |
| 302 static base::LazyInstance<PendingTabs> pending_tabs_; | 303 static base::LazyInstance<PendingTabs> pending_tabs_; |
| 303 | 304 |
| 304 // Allows us to run tasks on the ExternalTabContainer instance which are | 305 // Allows us to run tasks on the ExternalTabContainer instance which are |
| 305 // bound by its lifetime. | 306 // bound by its lifetime. |
| 306 ScopedRunnableMethodFactory<ExternalTabContainer> external_method_factory_; | 307 base::WeakPtrFactory<ExternalTabContainer> weak_factory_; |
| 307 | 308 |
| 308 // The URL request context to be used for this tab. Can be NULL. | 309 // The URL request context to be used for this tab. Can be NULL. |
| 309 scoped_refptr<ChromeURLRequestContextGetter> request_context_; | 310 scoped_refptr<ChromeURLRequestContextGetter> request_context_; |
| 310 | 311 |
| 311 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 312 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 312 | 313 |
| 313 // A mapping between accelerators and commands. | 314 // A mapping between accelerators and commands. |
| 314 std::map<ui::Accelerator, int> accelerator_table_; | 315 std::map<ui::Accelerator, int> accelerator_table_; |
| 315 | 316 |
| 316 // Top level navigations received for a tab while it is waiting for an ack | 317 // Top level navigations received for a tab while it is waiting for an ack |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 return false; | 414 return false; |
| 414 } | 415 } |
| 415 | 416 |
| 416 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, | 417 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, |
| 417 bool* proceed_to_fire_unload) { | 418 bool* proceed_to_fire_unload) { |
| 418 NOTREACHED(); | 419 NOTREACHED(); |
| 419 } | 420 } |
| 420 }; | 421 }; |
| 421 | 422 |
| 422 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 423 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
| OLD | NEW |