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

Side by Side Diff: chrome/browser/cocoa/extensions/browser_actions_container_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
« no previous file with comments | « chrome/browser/cocoa/draggable_button.h ('k') | chrome/browser/cocoa/find_bar_text_field.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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/extensions/browser_actions_container_view.h" 5 #import "chrome/browser/cocoa/extensions/browser_actions_container_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/scoped_nsobject.h" 10 #import "base/scoped_nsobject.h"
11 #import "chrome/browser/cocoa/view_id_util.h"
11 12
12 NSString* const kBrowserActionGrippyDragStartedNotification = 13 NSString* const kBrowserActionGrippyDragStartedNotification =
13 @"BrowserActionGrippyDragStartedNotification"; 14 @"BrowserActionGrippyDragStartedNotification";
14 NSString* const kBrowserActionGrippyDraggingNotification = 15 NSString* const kBrowserActionGrippyDraggingNotification =
15 @"BrowserActionGrippyDraggingNotification"; 16 @"BrowserActionGrippyDraggingNotification";
16 NSString* const kBrowserActionGrippyDragFinishedNotification = 17 NSString* const kBrowserActionGrippyDragFinishedNotification =
17 @"BrowserActionGrippyDragFinishedNotification"; 18 @"BrowserActionGrippyDragFinishedNotification";
18 19
19 namespace { 20 namespace {
20 const CGFloat kAnimationDuration = 0.2; 21 const CGFloat kAnimationDuration = 0.2;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } else if (!canDragLeft_) { 198 } else if (!canDragLeft_) {
198 retVal = [NSCursor resizeRightCursor]; 199 retVal = [NSCursor resizeRightCursor];
199 } else if (!canDragRight_) { 200 } else if (!canDragRight_) {
200 retVal = [NSCursor resizeLeftCursor]; 201 retVal = [NSCursor resizeLeftCursor];
201 } else { 202 } else {
202 retVal = [NSCursor resizeLeftRightCursor]; 203 retVal = [NSCursor resizeLeftRightCursor];
203 } 204 }
204 return retVal; 205 return retVal;
205 } 206 }
206 207
208 // Tag is used solely for ViewID. Override to prevent changing of it.
209 - (NSInteger)tag {
210 return view_id_util::ViewIDToTag(VIEW_ID_BROWSER_ACTION_TOOLBAR);
211 }
212
207 @end 213 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/draggable_button.h ('k') | chrome/browser/cocoa/find_bar_text_field.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698