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

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: fix cros build 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
« no previous file with comments | « base/memory/scoped_policy.h ('k') | content/common/gpu/media/mac_video_decode_accelerator.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) 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 - (void)prepareForDrag:(NSEvent*)initialMouseDownEvent { 307 - (void)prepareForDrag:(NSEvent*)initialMouseDownEvent {
308 dragState_ = PANEL_DRAG_CAN_START; 308 dragState_ = PANEL_DRAG_CAN_START;
309 startMouseLocation_ = [initialMouseDownEvent locationInWindow]; 309 startMouseLocation_ = [initialMouseDownEvent locationInWindow];
310 310
311 // Make sure the cursor stays the same during whole resize operation. 311 // Make sure the cursor stays the same during whole resize operation.
312 // The cursor rects normally do not guarantee the same cursor, since the 312 // The cursor rects normally do not guarantee the same cursor, since the
313 // mouse may temporarily leave the cursor rect area (or even the window) so 313 // mouse may temporarily leave the cursor rect area (or even the window) so
314 // the cursor will flicker. Disable cursor rects and grab the current cursor 314 // the cursor will flicker. Disable cursor rects and grab the current cursor
315 // so we can set it on mouseDragged: events to avoid flicker. 315 // so we can set it on mouseDragged: events to avoid flicker.
316 [[self window] disableCursorRects]; 316 [[self window] disableCursorRects];
317 dragCursor_.reset([NSCursor currentCursor], scoped_policy::RETAIN); 317 dragCursor_.reset([NSCursor currentCursor], base::scoped_policy::RETAIN);
318 } 318 }
319 319
320 -(void)cleanupAfterDrag { 320 -(void)cleanupAfterDrag {
321 dragState_ = PANEL_DRAG_SUPPRESSED; 321 dragState_ = PANEL_DRAG_SUPPRESSED;
322 [[self window] enableCursorRects]; 322 [[self window] enableCursorRects];
323 dragCursor_.reset(); 323 dragCursor_.reset();
324 startMouseLocation_ = NSZeroPoint; 324 startMouseLocation_ = NSZeroPoint;
325 } 325 }
326 326
327 - (BOOL)exceedsDragThreshold:(NSPoint)mouseLocation { 327 - (BOOL)exceedsDragThreshold:(NSPoint)mouseLocation {
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { 1038 - (NSRect)contentRectForFrameRect:(NSRect)frameRect {
1039 NSRect contentRect = [[[self window] contentView] convertRect:frameRect 1039 NSRect contentRect = [[[self window] contentView] convertRect:frameRect
1040 fromView:nil]; 1040 fromView:nil];
1041 contentRect.size.height -= panel::kTitlebarHeight; 1041 contentRect.size.height -= panel::kTitlebarHeight;
1042 if (contentRect.size.height < 0) 1042 if (contentRect.size.height < 0)
1043 contentRect.size.height = 0; 1043 contentRect.size.height = 0;
1044 return contentRect; 1044 return contentRect;
1045 } 1045 }
1046 1046
1047 @end 1047 @end
OLDNEW
« no previous file with comments | « base/memory/scoped_policy.h ('k') | content/common/gpu/media/mac_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698