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 "content/common/cursors/webcursor.h"
12
13using blink::WebInputEvent;
14
15namespace content {
16
17WebPluginDelegateImpl::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
31WebPluginDelegateImpl::~WebPluginDelegateImpl() {
32}
33
34bool WebPluginDelegateImpl::PlatformInitialize() {
35  return true;
36}
37
38void WebPluginDelegateImpl::PlatformDestroyInstance() {
39  // Nothing to do here.
40}
41
42void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) {
43}
44
45bool WebPluginDelegateImpl::WindowedCreatePlugin() {
46  return false;
47}
48
49void WebPluginDelegateImpl::WindowedDestroyWindow() {
50}
51
52bool WebPluginDelegateImpl::WindowedReposition(
53    const gfx::Rect& window_rect,
54    const gfx::Rect& clip_rect) {
55  return false;
56}
57
58void WebPluginDelegateImpl::WindowedSetWindow() {
59}
60
61void WebPluginDelegateImpl::WindowlessUpdateGeometry(
62    const gfx::Rect& window_rect,
63    const gfx::Rect& clip_rect) {
64}
65
66void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
67                                            const gfx::Rect& damage_rect) {
68}
69
70bool WebPluginDelegateImpl::PlatformSetPluginHasFocus(bool focused) {
71  return false;
72}
73
74bool WebPluginDelegateImpl::PlatformHandleInputEvent(
75    const WebInputEvent& event, WebCursor::CursorInfo* cursor_info) {
76  return false;
77}
78
79}  // content
80