Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10825115: Clean up FullscreenController. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: WeakPtrFactory Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698