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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: fix build and broken rebase Created 5 years, 3 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
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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 // the view hierarchy because the tab isn't main. Could retrieve 1586 // the view hierarchy because the tab isn't main. Could retrieve
1587 // the information from the main tab for our window. 1587 // the information from the main tab for our window.
1588 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); 1588 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_);
1589 if (!enclosing_window) 1589 if (!enclosing_window)
1590 return gfx::Rect(); 1590 return gfx::Rect();
1591 1591
1592 NSRect bounds = [enclosing_window frame]; 1592 NSRect bounds = [enclosing_window frame];
1593 return FlipNSRectToRectScreen(bounds); 1593 return FlipNSRectToRectScreen(bounds);
1594 } 1594 }
1595 1595
1596 gfx::GLSurfaceHandle RenderWidgetHostViewMac::GetCompositingSurface() {
1597 // TODO(kbr): may be able to eliminate PluginWindowHandle argument
1598 // completely on Mac OS.
1599 return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT);
1600 }
1601
1602 bool RenderWidgetHostViewMac::LockMouse() { 1596 bool RenderWidgetHostViewMac::LockMouse() {
1603 if (mouse_locked_) 1597 if (mouse_locked_)
1604 return true; 1598 return true;
1605 1599
1606 mouse_locked_ = true; 1600 mouse_locked_ = true;
1607 1601
1608 // Lock position of mouse cursor and hide it. 1602 // Lock position of mouse cursor and hide it.
1609 CGAssociateMouseAndMouseCursorPosition(NO); 1603 CGAssociateMouseAndMouseCursorPosition(NO);
1610 [NSCursor hide]; 1604 [NSCursor hide];
1611 1605
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 3471
3478 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3472 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3479 // regions that are not draggable. (See ControlRegionView in 3473 // regions that are not draggable. (See ControlRegionView in
3480 // native_app_window_cocoa.mm). This requires the render host view to be 3474 // native_app_window_cocoa.mm). This requires the render host view to be
3481 // draggable by default. 3475 // draggable by default.
3482 - (BOOL)mouseDownCanMoveWindow { 3476 - (BOOL)mouseDownCanMoveWindow {
3483 return YES; 3477 return YES;
3484 } 3478 }
3485 3479
3486 @end 3480 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698