OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // OS_WIN | 10 #endif // OS_WIN |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 prefs::kAutofillPersonalDataManagerFirstRun) && | 438 prefs::kAutofillPersonalDataManagerFirstRun) && |
439 local_state->GetBoolean(prefs::kAutofillPersonalDataManagerFirstRun)) { | 439 local_state->GetBoolean(prefs::kAutofillPersonalDataManagerFirstRun)) { |
440 // Notify PDM that this is a first run. | 440 // Notify PDM that this is a first run. |
441 #if defined(OS_WIN) | 441 #if defined(OS_WIN) |
442 ImportAutofillDataWin(PersonalDataManagerFactory::GetForProfile(profile_)); | 442 ImportAutofillDataWin(PersonalDataManagerFactory::GetForProfile(profile_)); |
443 #endif // defined(OS_WIN) | 443 #endif // defined(OS_WIN) |
444 // Reset the preference so we don't call it again for subsequent windows. | 444 // Reset the preference so we don't call it again for subsequent windows. |
445 local_state->ClearPref(prefs::kAutofillPersonalDataManagerFirstRun); | 445 local_state->ClearPref(prefs::kAutofillPersonalDataManagerFirstRun); |
446 } | 446 } |
447 | 447 |
448 fullscreen_controller_ = new FullscreenController(window_, profile_, this); | 448 fullscreen_controller_.reset(new FullscreenController(this)); |
449 } | 449 } |
450 | 450 |
451 Browser::~Browser() { | 451 Browser::~Browser() { |
452 // The tab strip should not have any tabs at this point. | 452 // The tab strip should not have any tabs at this point. |
453 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) | 453 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) |
454 DCHECK(tab_strip_model_->empty()); | 454 DCHECK(tab_strip_model_->empty()); |
455 tab_strip_model_->RemoveObserver(this); | 455 tab_strip_model_->RemoveObserver(this); |
456 | 456 |
457 BrowserList::RemoveBrowser(this); | 457 BrowserList::RemoveBrowser(this); |
458 | 458 |
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2289 if (contents && !allow_js_access) { | 2289 if (contents && !allow_js_access) { |
2290 contents->web_contents()->GetController().LoadURL( | 2290 contents->web_contents()->GetController().LoadURL( |
2291 target_url, | 2291 target_url, |
2292 content::Referrer(), | 2292 content::Referrer(), |
2293 content::PAGE_TRANSITION_LINK, | 2293 content::PAGE_TRANSITION_LINK, |
2294 std::string()); // No extra headers. | 2294 std::string()); // No extra headers. |
2295 } | 2295 } |
2296 | 2296 |
2297 return contents != NULL; | 2297 return contents != NULL; |
2298 } | 2298 } |
OLD | NEW |