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 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 initial_workspace_(params.initial_workspace), | 374 initial_workspace_(params.initial_workspace), |
375 is_session_restore_(params.is_session_restore), | 375 is_session_restore_(params.is_session_restore), |
376 content_setting_bubble_model_delegate_( | 376 content_setting_bubble_model_delegate_( |
377 new BrowserContentSettingBubbleModelDelegate(this)), | 377 new BrowserContentSettingBubbleModelDelegate(this)), |
378 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), | 378 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), |
379 live_tab_context_(new BrowserLiveTabContext(this)), | 379 live_tab_context_(new BrowserLiveTabContext(this)), |
380 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), | 380 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), |
381 bookmark_bar_state_(BookmarkBar::HIDDEN), | 381 bookmark_bar_state_(BookmarkBar::HIDDEN), |
382 command_controller_(new chrome::BrowserCommandController(this)), | 382 command_controller_(new chrome::BrowserCommandController(this)), |
383 window_has_shown_(false), | 383 window_has_shown_(false), |
| 384 keyboard_lock_host_(new keyboard_lock::KeyboardLockHost( |
| 385 this, base::ThreadTaskRunnerHandle::Get())), |
384 chrome_updater_factory_(this), | 386 chrome_updater_factory_(this), |
385 weak_factory_(this) { | 387 weak_factory_(this) { |
386 // If this causes a crash then a window is being opened using a profile type | 388 // If this causes a crash then a window is being opened using a profile type |
387 // that is disallowed by policy. The crash prevents the disabled window type | 389 // that is disallowed by policy. The crash prevents the disabled window type |
388 // from opening at all, but the path that triggered it should be fixed. | 390 // from opening at all, but the path that triggered it should be fixed. |
389 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); | 391 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
390 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) | 392 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) |
391 << "Only off the record browser may be opened in guest mode"; | 393 << "Only off the record browser may be opened in guest mode"; |
392 DCHECK(!profile_->IsSystemProfile()) | 394 DCHECK(!profile_->IsSystemProfile()) |
393 << "The system profile should never have a real browser."; | 395 << "The system profile should never have a real browser."; |
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2634 // new window later, thus we need to navigate the window now. | 2636 // new window later, thus we need to navigate the window now. |
2635 if (contents) { | 2637 if (contents) { |
2636 contents->web_contents()->GetController().LoadURL( | 2638 contents->web_contents()->GetController().LoadURL( |
2637 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, | 2639 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, |
2638 std::string()); // No extra headers. | 2640 std::string()); // No extra headers. |
2639 } | 2641 } |
2640 } | 2642 } |
2641 | 2643 |
2642 return contents != NULL; | 2644 return contents != NULL; |
2643 } | 2645 } |
OLD | NEW |