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