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.
5 #include "content/child/npapi/webplugin_delegate_impl.h"
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 "content/common/cursors/webcursor.h"
13 using blink::WebInputEvent
;
17 WebPluginDelegateImpl::WebPluginDelegateImpl(
19 PluginInstance
* instance
)
20 : windowed_handle_(0),
21 windowed_did_set_window_(false),
26 handle_event_depth_(0),
27 first_set_window_call_(true) {
28 memset(&window_
, 0, sizeof(window_
));
31 WebPluginDelegateImpl::~WebPluginDelegateImpl() {
34 bool WebPluginDelegateImpl::PlatformInitialize() {
38 void WebPluginDelegateImpl::PlatformDestroyInstance() {
39 // Nothing to do here.
42 void WebPluginDelegateImpl::Paint(SkCanvas
* canvas
, const gfx::Rect
& rect
) {
45 bool WebPluginDelegateImpl::WindowedCreatePlugin() {
49 void WebPluginDelegateImpl::WindowedDestroyWindow() {
52 bool WebPluginDelegateImpl::WindowedReposition(
53 const gfx::Rect
& window_rect
,
54 const gfx::Rect
& clip_rect
) {
58 void WebPluginDelegateImpl::WindowedSetWindow() {
61 void WebPluginDelegateImpl::WindowlessUpdateGeometry(
62 const gfx::Rect
& window_rect
,
63 const gfx::Rect
& clip_rect
) {
66 void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context
,
67 const gfx::Rect
& damage_rect
) {
70 bool WebPluginDelegateImpl::PlatformSetPluginHasFocus(bool focused
) {
74 bool WebPluginDelegateImpl::PlatformHandleInputEvent(
75 const WebInputEvent
& event
, WebCursor::CursorInfo
* cursor_info
) {