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
3 // found in the LICENSE file.
4
5 #include "content/child/npapi/webplugin_delegate_impl.h"
6
7 #include "base/basictypes.h"
8 #include "base/logging.h"
9 #include "content/child/npapi/plugin_instance.h"
10 #include "content/child/npapi/webplugin.h"
11 #include "webkit/common/cursors/webcursor.h"
12
13 using blink::WebInputEvent;
14
15 namespace content {
16
WebPluginDelegateImpl(WebPlugin * plugin,PluginInstance * instance)17 WebPluginDelegateImpl::WebPluginDelegateImpl(
18 WebPlugin* plugin,
19 PluginInstance* instance)
20 : windowed_handle_(0),
21 windowed_did_set_window_(false),
22 windowless_(false),
23 plugin_(plugin),
24 instance_(instance),
25 quirks_(0),
26 handle_event_depth_(0),
27 first_set_window_call_(true) {
28 memset(&window_, 0, sizeof(window_));
29 }
30
~WebPluginDelegateImpl()31 WebPluginDelegateImpl::~WebPluginDelegateImpl() {
32 }
33
PlatformInitialize()34 bool WebPluginDelegateImpl::PlatformInitialize() {
35 return true;
36 }
37
PlatformDestroyInstance()38 void WebPluginDelegateImpl::PlatformDestroyInstance() {
39 // Nothing to do here.
40 }
41
Paint(SkCanvas * canvas,const gfx::Rect & rect)42 void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) {
43 }
44
WindowedCreatePlugin()45 bool WebPluginDelegateImpl::WindowedCreatePlugin() {
46 return false;
47 }
48
WindowedDestroyWindow()49 void WebPluginDelegateImpl::WindowedDestroyWindow() {
50 }
51
WindowedReposition(const gfx::Rect & window_rect,const gfx::Rect & clip_rect)52 bool WebPluginDelegateImpl::WindowedReposition(
53 const gfx::Rect& window_rect,
54 const gfx::Rect& clip_rect) {
55 return false;
56 }
57
WindowedSetWindow()58 void WebPluginDelegateImpl::WindowedSetWindow() {
59 }
60
WindowlessUpdateGeometry(const gfx::Rect & window_rect,const gfx::Rect & clip_rect)61 void WebPluginDelegateImpl::WindowlessUpdateGeometry(
62 const gfx::Rect& window_rect,
63 const gfx::Rect& clip_rect) {
64 }
65
WindowlessPaint(gfx::NativeDrawingContext context,const gfx::Rect & damage_rect)66 void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
67 const gfx::Rect& damage_rect) {
68 }
69
PlatformSetPluginHasFocus(bool focused)70 bool WebPluginDelegateImpl::PlatformSetPluginHasFocus(bool focused) {
71 return false;
72 }
73
PlatformHandleInputEvent(const WebInputEvent & event,WebCursor::CursorInfo * cursor_info)74 bool WebPluginDelegateImpl::PlatformHandleInputEvent(
75 const WebInputEvent& event, WebCursor::CursorInfo* cursor_info) {
76 return false;
77 }
78
79 } // content
80