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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 #include "chrome/browser/ui/browser_list.h" | 98 #include "chrome/browser/ui/browser_list.h" |
99 #include "chrome/browser/ui/browser_navigator.h" | 99 #include "chrome/browser/ui/browser_navigator.h" |
100 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 100 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
101 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" | 101 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" |
102 #include "chrome/browser/ui/browser_tabstrip.h" | 102 #include "chrome/browser/ui/browser_tabstrip.h" |
103 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" | 103 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" |
104 #include "chrome/browser/ui/browser_ui_prefs.h" | 104 #include "chrome/browser/ui/browser_ui_prefs.h" |
105 #include "chrome/browser/ui/browser_window.h" | 105 #include "chrome/browser/ui/browser_window.h" |
106 #include "chrome/browser/ui/chrome_pages.h" | 106 #include "chrome/browser/ui/chrome_pages.h" |
107 #include "chrome/browser/ui/chrome_select_file_policy.h" | 107 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 108 #include "chrome/browser/ui/exclusive_access/exclusive_access_context_browser.h" |
108 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 109 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
109 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" | 110 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h" |
110 #include "chrome/browser/ui/fast_unload_controller.h" | 111 #include "chrome/browser/ui/fast_unload_controller.h" |
111 #include "chrome/browser/ui/find_bar/find_bar.h" | 112 #include "chrome/browser/ui/find_bar/find_bar.h" |
112 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 113 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
113 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 114 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
114 #include "chrome/browser/ui/global_error/global_error.h" | 115 #include "chrome/browser/ui/global_error/global_error.h" |
115 #include "chrome/browser/ui/global_error/global_error_service.h" | 116 #include "chrome/browser/ui/global_error/global_error_service.h" |
116 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 117 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
117 #include "chrome/browser/ui/location_bar/location_bar.h" | 118 #include "chrome/browser/ui/location_bar/location_bar.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 442 |
442 // TODO(beng): move to ChromeBrowserMain: | 443 // TODO(beng): move to ChromeBrowserMain: |
443 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { | 444 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { |
444 #if defined(OS_WIN) | 445 #if defined(OS_WIN) |
445 // Notify PDM that this is a first run. | 446 // Notify PDM that this is a first run. |
446 ImportAutofillDataWin( | 447 ImportAutofillDataWin( |
447 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 448 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
448 #endif // defined(OS_WIN) | 449 #endif // defined(OS_WIN) |
449 } | 450 } |
450 | 451 |
451 exclusive_access_manager_.reset(new ExclusiveAccessManager(this)); | 452 // TODO(sriramsr): HACK TO PASS pointer and will fix by having browser window |
| 453 // implement the interface. |
| 454 exclusive_access_manager_.reset( |
| 455 new ExclusiveAccessManager(new ExclusiveAccessContextBrowser(this))); |
452 | 456 |
453 // Must be initialized after window_. | 457 // Must be initialized after window_. |
454 // Also: surprise! a modal dialog host is not necessary to host modal dialogs | 458 // Also: surprise! a modal dialog host is not necessary to host modal dialogs |
455 // without a modal dialog host, so that value may be null. | 459 // without a modal dialog host, so that value may be null. |
456 popup_manager_.reset(new web_modal::PopupManager( | 460 popup_manager_.reset(new web_modal::PopupManager( |
457 GetWebContentsModalDialogHost())); | 461 GetWebContentsModalDialogHost())); |
458 } | 462 } |
459 | 463 |
460 Browser::~Browser() { | 464 Browser::~Browser() { |
461 // Stop observing notifications before continuing with destruction. Profile | 465 // Stop observing notifications before continuing with destruction. Profile |
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2529 if (contents && !allow_js_access) { | 2533 if (contents && !allow_js_access) { |
2530 contents->web_contents()->GetController().LoadURL( | 2534 contents->web_contents()->GetController().LoadURL( |
2531 target_url, | 2535 target_url, |
2532 content::Referrer(), | 2536 content::Referrer(), |
2533 ui::PAGE_TRANSITION_LINK, | 2537 ui::PAGE_TRANSITION_LINK, |
2534 std::string()); // No extra headers. | 2538 std::string()); // No extra headers. |
2535 } | 2539 } |
2536 | 2540 |
2537 return contents != NULL; | 2541 return contents != NULL; |
2538 } | 2542 } |
OLD | NEW |