| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); | 363 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
| 364 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) | 364 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) |
| 365 << "Only off the record browser may be opened in guest mode"; | 365 << "Only off the record browser may be opened in guest mode"; |
| 366 | 366 |
| 367 // TODO(jeremy): Move to initializer list once flag is removed. | 367 // TODO(jeremy): Move to initializer list once flag is removed. |
| 368 if (IsFastTabUnloadEnabled()) | 368 if (IsFastTabUnloadEnabled()) |
| 369 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); | 369 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); |
| 370 else | 370 else |
| 371 unload_controller_.reset(new chrome::UnloadController(this)); | 371 unload_controller_.reset(new chrome::UnloadController(this)); |
| 372 | 372 |
| 373 if (!app_name_.empty()) | |
| 374 chrome::RegisterAppPrefs(app_name_, profile_); | |
| 375 tab_strip_model_->AddObserver(this); | 373 tab_strip_model_->AddObserver(this); |
| 376 | 374 |
| 377 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); | 375 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); |
| 378 search_model_.reset(new SearchModel()); | 376 search_model_.reset(new SearchModel()); |
| 379 search_delegate_.reset(new SearchDelegate(search_model_.get())); | 377 search_delegate_.reset(new SearchDelegate(search_model_.get())); |
| 380 | 378 |
| 381 registrar_.Add(this, | 379 registrar_.Add(this, |
| 382 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, | 380 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, |
| 383 content::Source<Profile>(profile_->GetOriginalProfile())); | 381 content::Source<Profile>(profile_->GetOriginalProfile())); |
| 384 registrar_.Add(this, | 382 registrar_.Add(this, |
| (...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2475 if (contents && !allow_js_access) { | 2473 if (contents && !allow_js_access) { |
| 2476 contents->web_contents()->GetController().LoadURL( | 2474 contents->web_contents()->GetController().LoadURL( |
| 2477 target_url, | 2475 target_url, |
| 2478 content::Referrer(), | 2476 content::Referrer(), |
| 2479 content::PAGE_TRANSITION_LINK, | 2477 content::PAGE_TRANSITION_LINK, |
| 2480 std::string()); // No extra headers. | 2478 std::string()); // No extra headers. |
| 2481 } | 2479 } |
| 2482 | 2480 |
| 2483 return contents != NULL; | 2481 return contents != NULL; |
| 2484 } | 2482 } |
| OLD | NEW |