Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm |
| diff --git a/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm b/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm |
| index e2a8ed0ede86f8407ec191893ec5a4e0662515b0..fd3f2785fd0fa4c8e588d0b2db41f035f0e8c10d 100644 |
| --- a/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm |
| +++ b/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm |
| @@ -22,7 +22,13 @@ ExclusiveAccessController::ExclusiveAccessController( |
| Browser* browser) |
| : controller_(controller), |
| browser_(browser), |
| - bubble_type_(EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE) {} |
| + bubble_type_(EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE) { |
| + pref_registrar_.Init(GetProfile()->GetPrefs()); |
| + pref_registrar_.Add( |
| + prefs::kShowFullscreenToolbar, |
| + base::Bind(&ExclusiveAccessController::UpdateFullscreenToolbar, |
| + base::Unretained(this))); |
| +} |
| ExclusiveAccessController::~ExclusiveAccessController() {} |
| @@ -73,11 +79,10 @@ void ExclusiveAccessController::UpdateFullscreenWithToolbar(bool with_toolbar) { |
| [controller_ updateFullscreenWithToolbar:with_toolbar]; |
| } |
| -void ExclusiveAccessController::ToggleFullscreenToolbar() { |
| - PrefService* prefs = browser_->profile()->GetPrefs(); |
| - bool hideToolbar = !prefs->GetBoolean(prefs::kHideFullscreenToolbar); |
| +void ExclusiveAccessController::UpdateFullscreenToolbar() { |
| + PrefService* prefs = GetProfile()->GetPrefs(); |
| + bool hideToolbar = !prefs->GetBoolean(prefs::kShowFullscreenToolbar); |
|
msw
2016/03/01 00:07:15
This inversion seems correct, but the old logic al
spqchan
2016/03/01 17:50:18
Sorry for the confusion, the old logic was differe
|
| [controller_ setFullscreenToolbarHidden:hideToolbar]; |
| - prefs->SetBoolean(prefs::kHideFullscreenToolbar, hideToolbar); |
| } |
| bool ExclusiveAccessController::IsFullscreenWithToolbar() const { |