OLD | NEW |
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 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 } | 960 } |
961 | 961 |
962 gfx::NativeViewId RenderWidgetHostViewMac::GetNativeViewId() const { | 962 gfx::NativeViewId RenderWidgetHostViewMac::GetNativeViewId() const { |
963 return reinterpret_cast<gfx::NativeViewId>(GetNativeView()); | 963 return reinterpret_cast<gfx::NativeViewId>(GetNativeView()); |
964 } | 964 } |
965 | 965 |
966 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() { | 966 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() { |
967 return cocoa_view_; | 967 return cocoa_view_; |
968 } | 968 } |
969 | 969 |
970 void RenderWidgetHostViewMac::MovePluginWindows( | |
971 const std::vector<WebPluginGeometry>& moves) { | |
972 // Must be overridden, but unused on this platform. Core Animation | |
973 // plugins are drawn by the GPU process (through the compositor), | |
974 // and Core Graphics plugins are drawn by the renderer process. | |
975 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
976 } | |
977 | |
978 void RenderWidgetHostViewMac::Focus() { | 970 void RenderWidgetHostViewMac::Focus() { |
979 [[cocoa_view_ window] makeFirstResponder:cocoa_view_]; | 971 [[cocoa_view_ window] makeFirstResponder:cocoa_view_]; |
980 } | 972 } |
981 | 973 |
982 bool RenderWidgetHostViewMac::HasFocus() const { | 974 bool RenderWidgetHostViewMac::HasFocus() const { |
983 return [[cocoa_view_ window] firstResponder] == cocoa_view_; | 975 return [[cocoa_view_ window] firstResponder] == cocoa_view_; |
984 } | 976 } |
985 | 977 |
986 bool RenderWidgetHostViewMac::IsSurfaceAvailableForCopy() const { | 978 bool RenderWidgetHostViewMac::IsSurfaceAvailableForCopy() const { |
987 DCHECK(delegated_frame_host_); | 979 DCHECK(delegated_frame_host_); |
(...skipping 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3484 | 3476 |
3485 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3477 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3486 // regions that are not draggable. (See ControlRegionView in | 3478 // regions that are not draggable. (See ControlRegionView in |
3487 // native_app_window_cocoa.mm). This requires the render host view to be | 3479 // native_app_window_cocoa.mm). This requires the render host view to be |
3488 // draggable by default. | 3480 // draggable by default. |
3489 - (BOOL)mouseDownCanMoveWindow { | 3481 - (BOOL)mouseDownCanMoveWindow { |
3490 return YES; | 3482 return YES; |
3491 } | 3483 } |
3492 | 3484 |
3493 @end | 3485 @end |
OLD | NEW |