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

Side by Side Diff: ui/views/cocoa/views_nswindow_delegate.mm

Issue 2251123002: macviews: honor system control tint setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use luminance Created 4 years, 4 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 | « ui/views/cocoa/views_nswindow_delegate.h ('k') | ui/views/controls/button/label_button.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/cocoa/views_nswindow_delegate.h" 5 #import "ui/views/cocoa/views_nswindow_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ui/views/cocoa/bridged_content_view.h" 8 #import "ui/views/cocoa/bridged_content_view.h"
9 #import "ui/views/cocoa/bridged_native_widget.h" 9 #import "ui/views/cocoa/bridged_native_widget.h"
10 #include "ui/views/widget/native_widget_mac.h" 10 #include "ui/views/widget/native_widget_mac.h"
(...skipping 21 matching lines...) Expand all
32 return; 32 return;
33 33
34 cursor_.reset([newCursor retain]); 34 cursor_.reset([newCursor retain]);
35 [parent_->ns_window() resetCursorRects]; 35 [parent_->ns_window() resetCursorRects];
36 } 36 }
37 37
38 - (void)onWindowOrderChanged:(NSNotification*)notification { 38 - (void)onWindowOrderChanged:(NSNotification*)notification {
39 parent_->OnVisibilityChanged(); 39 parent_->OnVisibilityChanged();
40 } 40 }
41 41
42 - (void)onSystemControlTintChanged:(NSNotification*)notification {
43 parent_->OnSystemControlTintChanged();
44 }
45
42 - (void)sheetDidEnd:(NSWindow*)sheet 46 - (void)sheetDidEnd:(NSWindow*)sheet
43 returnCode:(NSInteger)returnCode 47 returnCode:(NSInteger)returnCode
44 contextInfo:(void*)contextInfo { 48 contextInfo:(void*)contextInfo {
45 [sheet orderOut:nil]; 49 [sheet orderOut:nil];
46 parent_->OnWindowWillClose(); 50 parent_->OnWindowWillClose();
47 } 51 }
48 52
49 - (BOOL)shouldRepostPendingLeftMouseDown:(NSPoint)locationInWindow { 53 - (BOOL)shouldRepostPendingLeftMouseDown:(NSPoint)locationInWindow {
50 return parent_->ShouldRepostPendingLeftMouseDown(locationInWindow); 54 return parent_->ShouldRepostPendingLeftMouseDown(locationInWindow);
51 } 55 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 usingRect:(NSRect)defaultSheetLocation { 139 usingRect:(NSRect)defaultSheetLocation {
136 // As per NSWindowDelegate documentation, the origin indicates the top left 140 // As per NSWindowDelegate documentation, the origin indicates the top left
137 // point of the host frame in window coordinates. The width changes the 141 // point of the host frame in window coordinates. The width changes the
138 // animation from vertical to trapezoid if it is smaller than the width of the 142 // animation from vertical to trapezoid if it is smaller than the width of the
139 // dialog. The height is ignored but should be set to zero. 143 // dialog. The height is ignored but should be set to zero.
140 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(), 144 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(),
141 NSWidth(defaultSheetLocation), 0); 145 NSWidth(defaultSheetLocation), 0);
142 } 146 }
143 147
144 @end 148 @end
OLDNEW
« no previous file with comments | « ui/views/cocoa/views_nswindow_delegate.h ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698