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

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: rebase Created 5 years, 2 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 // the view hierarchy because the tab isn't main. Could retrieve 1587 // the view hierarchy because the tab isn't main. Could retrieve
1588 // the information from the main tab for our window. 1588 // the information from the main tab for our window.
1589 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); 1589 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_);
1590 if (!enclosing_window) 1590 if (!enclosing_window)
1591 return gfx::Rect(); 1591 return gfx::Rect();
1592 1592
1593 NSRect bounds = [enclosing_window frame]; 1593 NSRect bounds = [enclosing_window frame];
1594 return FlipNSRectToRectScreen(bounds); 1594 return FlipNSRectToRectScreen(bounds);
1595 } 1595 }
1596 1596
1597 gfx::GLSurfaceHandle RenderWidgetHostViewMac::GetCompositingSurface() {
1598 // TODO(kbr): may be able to eliminate PluginWindowHandle argument
1599 // completely on Mac OS.
1600 return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT);
1601 }
1602
1603 bool RenderWidgetHostViewMac::LockMouse() { 1597 bool RenderWidgetHostViewMac::LockMouse() {
1604 if (mouse_locked_) 1598 if (mouse_locked_)
1605 return true; 1599 return true;
1606 1600
1607 mouse_locked_ = true; 1601 mouse_locked_ = true;
1608 1602
1609 // Lock position of mouse cursor and hide it. 1603 // Lock position of mouse cursor and hide it.
1610 CGAssociateMouseAndMouseCursorPosition(NO); 1604 CGAssociateMouseAndMouseCursorPosition(NO);
1611 [NSCursor hide]; 1605 [NSCursor hide];
1612 1606
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
3486 3480
3487 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3481 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3488 // regions that are not draggable. (See ControlRegionView in 3482 // regions that are not draggable. (See ControlRegionView in
3489 // native_app_window_cocoa.mm). This requires the render host view to be 3483 // native_app_window_cocoa.mm). This requires the render host view to be
3490 // draggable by default. 3484 // draggable by default.
3491 - (BOOL)mouseDownCanMoveWindow { 3485 - (BOOL)mouseDownCanMoveWindow {
3492 return YES; 3486 return YES;
3493 } 3487 }
3494 3488
3495 @end 3489 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698