OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #include "chrome/browser/ui/browser_list.h" | 97 #include "chrome/browser/ui/browser_list.h" |
98 #include "chrome/browser/ui/browser_navigator.h" | 98 #include "chrome/browser/ui/browser_navigator.h" |
99 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 99 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
100 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" | 100 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" |
101 #include "chrome/browser/ui/browser_tabstrip.h" | 101 #include "chrome/browser/ui/browser_tabstrip.h" |
102 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" | 102 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" |
103 #include "chrome/browser/ui/browser_ui_prefs.h" | 103 #include "chrome/browser/ui/browser_ui_prefs.h" |
104 #include "chrome/browser/ui/browser_window.h" | 104 #include "chrome/browser/ui/browser_window.h" |
105 #include "chrome/browser/ui/chrome_pages.h" | 105 #include "chrome/browser/ui/chrome_pages.h" |
106 #include "chrome/browser/ui/chrome_select_file_policy.h" | 106 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 107 #include "chrome/browser/ui/exclusive_access/exclusive_access_context_browser.h" |
107 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 108 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
108 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" | 109 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" |
109 #include "chrome/browser/ui/fast_unload_controller.h" | 110 #include "chrome/browser/ui/fast_unload_controller.h" |
110 #include "chrome/browser/ui/find_bar/find_bar.h" | 111 #include "chrome/browser/ui/find_bar/find_bar.h" |
111 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 112 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
112 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 113 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
113 #include "chrome/browser/ui/global_error/global_error.h" | 114 #include "chrome/browser/ui/global_error/global_error.h" |
114 #include "chrome/browser/ui/global_error/global_error_service.h" | 115 #include "chrome/browser/ui/global_error/global_error_service.h" |
115 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 116 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
116 #include "chrome/browser/ui/location_bar/location_bar.h" | 117 #include "chrome/browser/ui/location_bar/location_bar.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 440 |
440 // TODO(beng): move to ChromeBrowserMain: | 441 // TODO(beng): move to ChromeBrowserMain: |
441 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { | 442 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { |
442 #if defined(OS_WIN) | 443 #if defined(OS_WIN) |
443 // Notify PDM that this is a first run. | 444 // Notify PDM that this is a first run. |
444 ImportAutofillDataWin( | 445 ImportAutofillDataWin( |
445 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 446 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
446 #endif // defined(OS_WIN) | 447 #endif // defined(OS_WIN) |
447 } | 448 } |
448 | 449 |
449 exclusive_access_manager_.reset(new ExclusiveAccessManager(this)); | 450 scoped_ptr<ExclusiveAccessContextBrowser> context( |
| 451 new ExclusiveAccessContextBrowser(this)); |
| 452 exclusive_access_manager_.reset(new ExclusiveAccessManager(context.Pass())); |
450 | 453 |
451 // Must be initialized after window_. | 454 // Must be initialized after window_. |
452 // Also: surprise! a modal dialog host is not necessary to host modal dialogs | 455 // Also: surprise! a modal dialog host is not necessary to host modal dialogs |
453 // without a modal dialog host, so that value may be null. | 456 // without a modal dialog host, so that value may be null. |
454 popup_manager_.reset(new web_modal::PopupManager( | 457 popup_manager_.reset(new web_modal::PopupManager( |
455 GetWebContentsModalDialogHost())); | 458 GetWebContentsModalDialogHost())); |
456 } | 459 } |
457 | 460 |
458 Browser::~Browser() { | 461 Browser::~Browser() { |
459 // Stop observing notifications before continuing with destruction. Profile | 462 // Stop observing notifications before continuing with destruction. Profile |
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2512 if (contents && !allow_js_access) { | 2515 if (contents && !allow_js_access) { |
2513 contents->web_contents()->GetController().LoadURL( | 2516 contents->web_contents()->GetController().LoadURL( |
2514 target_url, | 2517 target_url, |
2515 content::Referrer(), | 2518 content::Referrer(), |
2516 ui::PAGE_TRANSITION_LINK, | 2519 ui::PAGE_TRANSITION_LINK, |
2517 std::string()); // No extra headers. | 2520 std::string()); // No extra headers. |
2518 } | 2521 } |
2519 | 2522 |
2520 return contents != NULL; | 2523 return contents != NULL; |
2521 } | 2524 } |
OLD | NEW |