OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 - (void)windowWillClose:(NSNotification*)notification { | 231 - (void)windowWillClose:(NSNotification*)notification { |
232 [self stopSharing:nil]; | 232 [self stopSharing:nil]; |
233 } | 233 } |
234 | 234 |
235 @end | 235 @end |
236 | 236 |
237 @implementation ScreenCaptureNotificationView | 237 @implementation ScreenCaptureNotificationView |
238 | 238 |
239 - (void)drawRect:(NSRect)dirtyRect { | 239 - (void)drawRect:(NSRect)dirtyRect { |
240 [gfx::SkColorToSRGBNSColor(ui::NativeThemeMac::instance()->GetSystemColor( | 240 [skia::SkColorToSRGBNSColor(ui::NativeThemeMac::instance()->GetSystemColor( |
241 ui::NativeTheme::kColorId_DialogBackground)) set]; | 241 ui::NativeTheme::kColorId_DialogBackground)) set]; |
242 [[NSBezierPath bezierPathWithRoundedRect:[self bounds] | 242 [[NSBezierPath bezierPathWithRoundedRect:[self bounds] |
243 xRadius:kWindowCornerRadius | 243 xRadius:kWindowCornerRadius |
244 yRadius:kWindowCornerRadius] fill]; | 244 yRadius:kWindowCornerRadius] fill]; |
245 } | 245 } |
246 | 246 |
247 @end | 247 @end |
248 | 248 |
249 @implementation WindowGripView | 249 @implementation WindowGripView |
250 - (WindowGripView*)init { | 250 - (WindowGripView*)init { |
251 gfx::Image gripImage = | 251 gfx::Image gripImage = |
252 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 252 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
253 IDR_SCREEN_CAPTURE_NOTIFICATION_GRIP, | 253 IDR_SCREEN_CAPTURE_NOTIFICATION_GRIP, |
254 ui::ResourceBundle::RTL_DISABLED); | 254 ui::ResourceBundle::RTL_DISABLED); |
255 self = [super | 255 self = [super |
256 initWithFrame:NSMakeRect(0, 0, gripImage.Width(), gripImage.Height())]; | 256 initWithFrame:NSMakeRect(0, 0, gripImage.Width(), gripImage.Height())]; |
257 [self setImage:gripImage.ToNSImage()]; | 257 [self setImage:gripImage.ToNSImage()]; |
258 return self; | 258 return self; |
259 } | 259 } |
260 | 260 |
261 - (BOOL)mouseDownCanMoveWindow { | 261 - (BOOL)mouseDownCanMoveWindow { |
262 return YES; | 262 return YES; |
263 } | 263 } |
264 @end | 264 @end |
OLD | NEW |