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

Side by Side Diff: chrome/browser/cocoa/bookmark_bar_state_controller.mm

Issue 63142: Scaffolding cleanup. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/bookmark_bar_state_controller.h" 5 #import "chrome/browser/cocoa/bookmark_bar_state_controller.h"
6 #import "chrome/browser/bookmarks/bookmark_utils.h" 6 #import "chrome/browser/bookmarks/bookmark_utils.h"
7 #import "chrome/browser/browser.h" 7 #import "chrome/browser/browser.h"
8 #import "chrome/common/pref_names.h"
9 #import "chrome/common/pref_service.h"
8 10
9 11
10 @implementation BookmarkBarStateController 12 @implementation BookmarkBarStateController
11 13
12 - (id)initWithBrowser:(Browser *)browser { 14 - (id)initWithBrowser:(Browser *)browser {
13 if ((self = [super init])) { 15 if ((self = [super init])) {
14 browser_ = browser; 16 browser_ = browser;
15 // Initial visibility state comes from our preference. 17 // Initial visibility state comes from our preference.
16 if (browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) { 18 if (browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) {
17 visible_ = YES; 19 visible_ = YES;
(...skipping 11 matching lines...) Expand all
29 - (void)togglePreference { 31 - (void)togglePreference {
30 bookmark_utils::ToggleWhenVisible(browser_->profile()); 32 bookmark_utils::ToggleWhenVisible(browser_->profile());
31 } 33 }
32 34
33 - (void)toggleBookmarkBar { 35 - (void)toggleBookmarkBar {
34 visible_ = visible_ ? NO : YES; 36 visible_ = visible_ ? NO : YES;
35 [self togglePreference]; 37 [self togglePreference];
36 } 38 }
37 39
38 @end // BookmarkBarStateController 40 @end // BookmarkBarStateController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_window_gtk.cc » ('j') | chrome/common/temp_scaffolding_stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698