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

Side by Side Diff: chrome/browser/cocoa/download_shelf_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/delayedmenu_button.h ('k') | chrome/browser/cocoa/draggable_button.h » ('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) 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/download_shelf_view.h" 5 #import "chrome/browser/cocoa/download_shelf_view.h"
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #include "chrome/browser/browser_theme_provider.h" 8 #include "chrome/browser/browser_theme_provider.h"
9 #import "chrome/browser/cocoa/themed_window.h" 9 #import "chrome/browser/cocoa/themed_window.h"
10 #import "chrome/browser/cocoa/view_id_util.h"
10 #include "grit/theme_resources.h" 11 #include "grit/theme_resources.h"
11 12
12 @implementation DownloadShelfView 13 @implementation DownloadShelfView
13 14
14 - (NSColor*)strokeColor { 15 - (NSColor*)strokeColor {
15 BOOL isKey = [[self window] isKeyWindow]; 16 BOOL isKey = [[self window] isKeyWindow];
16 ThemeProvider* themeProvider = [[self window] themeProvider]; 17 ThemeProvider* themeProvider = [[self window] themeProvider];
17 return themeProvider ? themeProvider->GetNSColor( 18 return themeProvider ? themeProvider->GetNSColor(
18 isKey ? BrowserThemeProvider::COLOR_TOOLBAR_STROKE : 19 isKey ? BrowserThemeProvider::COLOR_TOOLBAR_STROKE :
19 BrowserThemeProvider::COLOR_TOOLBAR_STROKE_INACTIVE, true) : 20 BrowserThemeProvider::COLOR_TOOLBAR_STROKE_INACTIVE, true) :
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 NSDivideRect([self bounds], &borderRect, &contentRect, 1, NSMaxYEdge); 57 NSDivideRect([self bounds], &borderRect, &contentRect, 1, NSMaxYEdge);
57 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 58 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
58 } 59 }
59 60
60 // Mouse down events on the download shelf should not allow dragging the parent 61 // Mouse down events on the download shelf should not allow dragging the parent
61 // window around. 62 // window around.
62 - (BOOL)mouseDownCanMoveWindow { 63 - (BOOL)mouseDownCanMoveWindow {
63 return NO; 64 return NO;
64 } 65 }
65 66
67 // Tag is used solely for ViewID. Override to prevent changing of it.
68 - (NSInteger)tag {
69 return view_id_util::ViewIDToTag(VIEW_ID_DOWNLOAD_SHELF);
70 }
71
66 @end 72 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/delayedmenu_button.h ('k') | chrome/browser/cocoa/draggable_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698