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