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

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

Issue 65011: Flatten down to a single toolbar per window, significantly simplifying the ta... (Closed) Base URL: svn://svn.chromium.org/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
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/cocoa/command_observer_bridge.h"
6
7 CommandObserverBridge::CommandObserverBridge(
8 id<CommandObserverProtocol> observer, CommandUpdater* commands)
9 : observer_(observer), commands_(commands) {
10 DCHECK(observer_ && commands_);
11 }
12
13 CommandObserverBridge::~CommandObserverBridge() {
14 // Unregister the notifications
15 commands_->RemoveCommandObserver(this);
16 }
17
18 void CommandObserverBridge::ObserveCommand(int command) {
19 commands_->AddCommandObserver(command, this);
20 }
21
22 void CommandObserverBridge::EnabledStateChangedForCommand(int command,
23 bool enabled) {
24 [observer_ enabledStateChangedForCommand:command
25 enabled:enabled ? YES : NO];
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698