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

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

Issue 2973004: [Mac]Implement ViewID support. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Turns out that, it's not a good solution. Created 10 years, 5 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/toolbar_view.h" 5 #import "chrome/browser/cocoa/toolbar_view.h"
6 6
7 #import "chrome/browser/cocoa/themed_window.h" 7 #import "chrome/browser/cocoa/themed_window.h"
8 #import "chrome/browser/cocoa/view_id_util.h"
8 9
9 @implementation ToolbarView 10 @implementation ToolbarView
10 11
11 @synthesize dividerOpacity = dividerOpacity_; 12 @synthesize dividerOpacity = dividerOpacity_;
12 13
13 // Prevent mouse down events from moving the parent window around. 14 // Prevent mouse down events from moving the parent window around.
14 - (BOOL)mouseDownCanMoveWindow { 15 - (BOOL)mouseDownCanMoveWindow {
15 return NO; 16 return NO;
16 } 17 }
17 18
(...skipping 14 matching lines...) Expand all
32 return NO; 33 return NO;
33 } 34 }
34 35
35 - (id)accessibilityAttributeValue:(NSString*)attribute { 36 - (id)accessibilityAttributeValue:(NSString*)attribute {
36 if ([attribute isEqual:NSAccessibilityRoleAttribute]) 37 if ([attribute isEqual:NSAccessibilityRoleAttribute])
37 return NSAccessibilityToolbarRole; 38 return NSAccessibilityToolbarRole;
38 39
39 return [super accessibilityAttributeValue:attribute]; 40 return [super accessibilityAttributeValue:attribute];
40 } 41 }
41 42
43 // Tag is used solely for ViewID. Override to prevent changing of it.
44 - (NSInteger)tag {
45 return view_id_util::ViewIDToTag(VIEW_ID_TOOLBAR);
46 }
47
42 @end 48 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller_unittest.mm ('k') | chrome/browser/cocoa/view_id_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698