| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 params.host_desktop_type)), | 344 params.host_desktop_type)), |
| 345 content_setting_bubble_model_delegate_( | 345 content_setting_bubble_model_delegate_( |
| 346 new BrowserContentSettingBubbleModelDelegate(this)), | 346 new BrowserContentSettingBubbleModelDelegate(this)), |
| 347 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), | 347 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), |
| 348 tab_restore_service_delegate_(new BrowserTabRestoreServiceDelegate(this)), | 348 tab_restore_service_delegate_(new BrowserTabRestoreServiceDelegate(this)), |
| 349 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), | 349 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), |
| 350 bookmark_bar_state_(BookmarkBar::HIDDEN), | 350 bookmark_bar_state_(BookmarkBar::HIDDEN), |
| 351 command_controller_(new chrome::BrowserCommandController(this)), | 351 command_controller_(new chrome::BrowserCommandController(this)), |
| 352 window_has_shown_(false), | 352 window_has_shown_(false), |
| 353 chrome_updater_factory_(this), | 353 chrome_updater_factory_(this), |
| 354 weak_factory_(this), | |
| 355 translate_driver_observer_( | 354 translate_driver_observer_( |
| 356 new BrowserContentTranslateDriverObserver(this)) { | 355 new BrowserContentTranslateDriverObserver(this)), |
| 356 weak_factory_(this) { |
| 357 // If this causes a crash then a window is being opened using a profile type | 357 // If this causes a crash then a window is being opened using a profile type |
| 358 // that is disallowed by policy. The crash prevents the disabled window type | 358 // that is disallowed by policy. The crash prevents the disabled window type |
| 359 // from opening at all, but the path that triggered it should be fixed. | 359 // from opening at all, but the path that triggered it should be fixed. |
| 360 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); | 360 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
| 361 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) | 361 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) |
| 362 << "Only off the record browser may be opened in guest mode"; | 362 << "Only off the record browser may be opened in guest mode"; |
| 363 | 363 |
| 364 // TODO(jeremy): Move to initializer list once flag is removed. | 364 // TODO(jeremy): Move to initializer list once flag is removed. |
| 365 if (IsFastTabUnloadEnabled()) | 365 if (IsFastTabUnloadEnabled()) |
| 366 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); | 366 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); |
| (...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2472 if (contents && !allow_js_access) { | 2472 if (contents && !allow_js_access) { |
| 2473 contents->web_contents()->GetController().LoadURL( | 2473 contents->web_contents()->GetController().LoadURL( |
| 2474 target_url, | 2474 target_url, |
| 2475 content::Referrer(), | 2475 content::Referrer(), |
| 2476 content::PAGE_TRANSITION_LINK, | 2476 content::PAGE_TRANSITION_LINK, |
| 2477 std::string()); // No extra headers. | 2477 std::string()); // No extra headers. |
| 2478 } | 2478 } |
| 2479 | 2479 |
| 2480 return contents != NULL; | 2480 return contents != NULL; |
| 2481 } | 2481 } |
| OLD | NEW |