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

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

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 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 "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 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 21 matching lines...) Expand all
32 #include "content/browser/renderer_host/compositing_iosurface_mac.h" 32 #include "content/browser/renderer_host/compositing_iosurface_mac.h"
33 #include "content/browser/renderer_host/render_view_host_impl.h" 33 #include "content/browser/renderer_host/render_view_host_impl.h"
34 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h" 34 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h"
35 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h" 35 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h"
36 #import "content/browser/renderer_host/text_input_client_mac.h" 36 #import "content/browser/renderer_host/text_input_client_mac.h"
37 #include "content/common/accessibility_messages.h" 37 #include "content/common/accessibility_messages.h"
38 #include "content/common/edit_command.h" 38 #include "content/common/edit_command.h"
39 #include "content/common/gpu/gpu_messages.h" 39 #include "content/common/gpu/gpu_messages.h"
40 #include "content/common/input_messages.h" 40 #include "content/common/input_messages.h"
41 #include "content/common/view_messages.h" 41 #include "content/common/view_messages.h"
42 #include "content/common/webplugin_geometry.h"
42 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" 43 #include "content/port/browser/render_widget_host_view_frame_subscriber.h"
43 #include "content/public/browser/browser_thread.h" 44 #include "content/public/browser/browser_thread.h"
44 #include "content/public/browser/native_web_keyboard_event.h" 45 #include "content/public/browser/native_web_keyboard_event.h"
45 #import "content/public/browser/render_widget_host_view_mac_delegate.h" 46 #import "content/public/browser/render_widget_host_view_mac_delegate.h"
46 #include "content/public/common/content_switches.h" 47 #include "content/public/common/content_switches.h"
47 #include "skia/ext/platform_canvas.h" 48 #include "skia/ext/platform_canvas.h"
48 #include "third_party/WebKit/public/web/WebInputEvent.h" 49 #include "third_party/WebKit/public/web/WebInputEvent.h"
49 #include "third_party/WebKit/public/web/WebScreenInfo.h" 50 #include "third_party/WebKit/public/web/WebScreenInfo.h"
50 #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h" 51 #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h"
51 #import "third_party/mozilla/ComplexTextInputPanel.h" 52 #import "third_party/mozilla/ComplexTextInputPanel.h"
52 #include "ui/base/cocoa/animation_utils.h" 53 #include "ui/base/cocoa/animation_utils.h"
53 #import "ui/base/cocoa/fullscreen_window_manager.h" 54 #import "ui/base/cocoa/fullscreen_window_manager.h"
54 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" 55 #import "ui/base/cocoa/underlay_opengl_hosting_window.h"
55 #include "ui/base/keycodes/keyboard_codes.h" 56 #include "ui/base/keycodes/keyboard_codes.h"
56 #include "ui/base/layout.h" 57 #include "ui/base/layout.h"
57 #include "ui/gfx/display.h" 58 #include "ui/gfx/display.h"
58 #include "ui/gfx/point.h" 59 #include "ui/gfx/point.h"
59 #include "ui/gfx/rect_conversions.h" 60 #include "ui/gfx/rect_conversions.h"
60 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 61 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
61 #include "ui/gfx/screen.h" 62 #include "ui/gfx/screen.h"
62 #include "ui/gfx/size_conversions.h" 63 #include "ui/gfx/size_conversions.h"
63 #include "ui/gl/io_surface_support_mac.h" 64 #include "ui/gl/io_surface_support_mac.h"
64 #include "webkit/plugins/npapi/webplugin.h"
65 65
66 using content::BackingStoreMac; 66 using content::BackingStoreMac;
67 using content::BrowserAccessibility; 67 using content::BrowserAccessibility;
68 using content::BrowserAccessibilityManager; 68 using content::BrowserAccessibilityManager;
69 using content::EditCommand; 69 using content::EditCommand;
70 using content::NativeWebKeyboardEvent; 70 using content::NativeWebKeyboardEvent;
71 using content::RenderViewHostImpl; 71 using content::RenderViewHostImpl;
72 using content::RenderWidgetHostImpl; 72 using content::RenderWidgetHostImpl;
73 using content::RenderWidgetHostViewMac; 73 using content::RenderWidgetHostViewMac;
74 using content::RenderWidgetHostViewMacEditCommandHelper; 74 using content::RenderWidgetHostViewMacEditCommandHelper;
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 return reinterpret_cast<gfx::NativeViewId>(GetNativeView()); 790 return reinterpret_cast<gfx::NativeViewId>(GetNativeView());
791 } 791 }
792 792
793 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() { 793 gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() {
794 NOTIMPLEMENTED(); 794 NOTIMPLEMENTED();
795 return static_cast<gfx::NativeViewAccessible>(NULL); 795 return static_cast<gfx::NativeViewAccessible>(NULL);
796 } 796 }
797 797
798 void RenderWidgetHostViewMac::MovePluginWindows( 798 void RenderWidgetHostViewMac::MovePluginWindows(
799 const gfx::Vector2d& scroll_offset, 799 const gfx::Vector2d& scroll_offset,
800 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { 800 const std::vector<WebPluginGeometry>& moves) {
801 // Must be overridden, but unused on this platform. Core Animation 801 // Must be overridden, but unused on this platform. Core Animation
802 // plugins are drawn by the GPU process (through the compositor), 802 // plugins are drawn by the GPU process (through the compositor),
803 // and Core Graphics plugins are drawn by the renderer process. 803 // and Core Graphics plugins are drawn by the renderer process.
804 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 804 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
805 } 805 }
806 806
807 void RenderWidgetHostViewMac::Focus() { 807 void RenderWidgetHostViewMac::Focus() {
808 [[cocoa_view_ window] makeFirstResponder:cocoa_view_]; 808 [[cocoa_view_ window] makeFirstResponder:cocoa_view_];
809 } 809 }
810 810
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 return YES; 3777 return YES;
3778 } 3778 }
3779 3779
3780 - (BOOL)isOpaque { 3780 - (BOOL)isOpaque {
3781 if (renderWidgetHostView_->use_core_animation_) 3781 if (renderWidgetHostView_->use_core_animation_)
3782 return YES; 3782 return YES;
3783 return [super isOpaque]; 3783 return [super isOpaque];
3784 } 3784 }
3785 3785
3786 @end 3786 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698