| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 // TODO(beng): move to ChromeBrowserMain: | 440 // TODO(beng): move to ChromeBrowserMain: |
| 441 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { | 441 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { |
| 442 #if defined(OS_WIN) | 442 #if defined(OS_WIN) |
| 443 // Notify PDM that this is a first run. | 443 // Notify PDM that this is a first run. |
| 444 ImportAutofillDataWin( | 444 ImportAutofillDataWin( |
| 445 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 445 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
| 446 #endif // defined(OS_WIN) | 446 #endif // defined(OS_WIN) |
| 447 } | 447 } |
| 448 | 448 |
| 449 exclusive_access_manager_.reset(new ExclusiveAccessManager(this)); | 449 exclusive_access_manager_.reset( |
| 450 new ExclusiveAccessManager(window_->GetExclusiveAccessContext())); |
| 450 | 451 |
| 451 // Must be initialized after window_. | 452 // Must be initialized after window_. |
| 452 // Also: surprise! a modal dialog host is not necessary to host modal dialogs | 453 // Also: surprise! a modal dialog host is not necessary to host modal dialogs |
| 453 // without a modal dialog host, so that value may be null. | 454 // without a modal dialog host, so that value may be null. |
| 454 popup_manager_.reset(new web_modal::PopupManager( | 455 popup_manager_.reset(new web_modal::PopupManager( |
| 455 GetWebContentsModalDialogHost())); | 456 GetWebContentsModalDialogHost())); |
| 456 } | 457 } |
| 457 | 458 |
| 458 Browser::~Browser() { | 459 Browser::~Browser() { |
| 459 // Stop observing notifications before continuing with destruction. Profile | 460 // Stop observing notifications before continuing with destruction. Profile |
| (...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2537 if (contents && !allow_js_access) { | 2538 if (contents && !allow_js_access) { |
| 2538 contents->web_contents()->GetController().LoadURL( | 2539 contents->web_contents()->GetController().LoadURL( |
| 2539 target_url, | 2540 target_url, |
| 2540 content::Referrer(), | 2541 content::Referrer(), |
| 2541 ui::PAGE_TRANSITION_LINK, | 2542 ui::PAGE_TRANSITION_LINK, |
| 2542 std::string()); // No extra headers. | 2543 std::string()); // No extra headers. |
| 2543 } | 2544 } |
| 2544 | 2545 |
| 2545 return contents != NULL; | 2546 return contents != NULL; |
| 2546 } | 2547 } |
| OLD | NEW |