| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 host_desktop_type_( | 353 host_desktop_type_( |
| 354 BrowserWindow::AdjustHostDesktopType(params.host_desktop_type)), | 354 BrowserWindow::AdjustHostDesktopType(params.host_desktop_type)), |
| 355 content_setting_bubble_model_delegate_( | 355 content_setting_bubble_model_delegate_( |
| 356 new BrowserContentSettingBubbleModelDelegate(this)), | 356 new BrowserContentSettingBubbleModelDelegate(this)), |
| 357 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), | 357 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), |
| 358 tab_restore_service_delegate_(new BrowserTabRestoreServiceDelegate(this)), | 358 tab_restore_service_delegate_(new BrowserTabRestoreServiceDelegate(this)), |
| 359 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), | 359 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), |
| 360 bookmark_bar_state_(BookmarkBar::HIDDEN), | 360 bookmark_bar_state_(BookmarkBar::HIDDEN), |
| 361 command_controller_(new chrome::BrowserCommandController(this)), | 361 command_controller_(new chrome::BrowserCommandController(this)), |
| 362 window_has_shown_(false), | 362 window_has_shown_(false), |
| 363 override_redirect_(params.override_redirect), |
| 363 chrome_updater_factory_(this), | 364 chrome_updater_factory_(this), |
| 364 weak_factory_(this) { | 365 weak_factory_(this) { |
| 365 // If this causes a crash then a window is being opened using a profile type | 366 // If this causes a crash then a window is being opened using a profile type |
| 366 // that is disallowed by policy. The crash prevents the disabled window type | 367 // that is disallowed by policy. The crash prevents the disabled window type |
| 367 // from opening at all, but the path that triggered it should be fixed. | 368 // from opening at all, but the path that triggered it should be fixed. |
| 368 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); | 369 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
| 369 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) | 370 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) |
| 370 << "Only off the record browser may be opened in guest mode"; | 371 << "Only off the record browser may be opened in guest mode"; |
| 371 DCHECK(!profile_->IsSystemProfile()) | 372 DCHECK(!profile_->IsSystemProfile()) |
| 372 << "The system profile should never have a real browser."; | 373 << "The system profile should never have a real browser."; |
| (...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2639 if (contents && !allow_js_access) { | 2640 if (contents && !allow_js_access) { |
| 2640 contents->web_contents()->GetController().LoadURL( | 2641 contents->web_contents()->GetController().LoadURL( |
| 2641 target_url, | 2642 target_url, |
| 2642 content::Referrer(), | 2643 content::Referrer(), |
| 2643 ui::PAGE_TRANSITION_LINK, | 2644 ui::PAGE_TRANSITION_LINK, |
| 2644 std::string()); // No extra headers. | 2645 std::string()); // No extra headers. |
| 2645 } | 2646 } |
| 2646 | 2647 |
| 2647 return contents != NULL; | 2648 return contents != NULL; |
| 2648 } | 2649 } |
| OLD | NEW |