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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 10388108: Implement media::VideoDecodeAccelerator on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 - (void)prepareForDrag:(NSEvent*)initialMouseDownEvent { 305 - (void)prepareForDrag:(NSEvent*)initialMouseDownEvent {
306 dragState_ = PANEL_DRAG_CAN_START; 306 dragState_ = PANEL_DRAG_CAN_START;
307 startMouseLocation_ = [initialMouseDownEvent locationInWindow]; 307 startMouseLocation_ = [initialMouseDownEvent locationInWindow];
308 308
309 // Make sure the cursor stays the same during whole resize operation. 309 // Make sure the cursor stays the same during whole resize operation.
310 // The cursor rects normally do not guarantee the same cursor, since the 310 // The cursor rects normally do not guarantee the same cursor, since the
311 // mouse may temporarily leave the cursor rect area (or even the window) so 311 // mouse may temporarily leave the cursor rect area (or even the window) so
312 // the cursor will flicker. Disable cursor rects and grab the current cursor 312 // the cursor will flicker. Disable cursor rects and grab the current cursor
313 // so we can set it on mouseDragged: events to avoid flicker. 313 // so we can set it on mouseDragged: events to avoid flicker.
314 [[self window] disableCursorRects]; 314 [[self window] disableCursorRects];
315 dragCursor_.reset([NSCursor currentCursor], scoped_policy::RETAIN); 315 dragCursor_.reset([NSCursor currentCursor], base::scoped_policy::RETAIN);
316 } 316 }
317 317
318 -(void)cleanupAfterDrag { 318 -(void)cleanupAfterDrag {
319 dragState_ = PANEL_DRAG_SUPPRESSED; 319 dragState_ = PANEL_DRAG_SUPPRESSED;
320 [[self window] enableCursorRects]; 320 [[self window] enableCursorRects];
321 dragCursor_.reset(); 321 dragCursor_.reset();
322 startMouseLocation_ = NSZeroPoint; 322 startMouseLocation_ = NSZeroPoint;
323 } 323 }
324 324
325 - (BOOL)exceedsDragThreshold:(NSPoint)mouseLocation { 325 - (BOOL)exceedsDragThreshold:(NSPoint)mouseLocation {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 [[self window] setLevel:NSDockWindowLevel]; 1008 [[self window] setLevel:NSDockWindowLevel];
1009 } 1009 }
1010 1010
1011 - (void)enableResizeByMouse:(BOOL)enable { 1011 - (void)enableResizeByMouse:(BOOL)enable {
1012 if (![self isWindowLoaded]) 1012 if (![self isWindowLoaded])
1013 return; 1013 return;
1014 [[self window] invalidateCursorRectsForView:overlayView_]; 1014 [[self window] invalidateCursorRectsForView:overlayView_];
1015 } 1015 }
1016 1016
1017 @end 1017 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698