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

Side by Side Diff: webkit/glue/plugins/pepper_plugin_instance.h

Issue 2896009: add find hookup (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: update DEPS Created 10 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
« no previous file with comments | « DEPS ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "gfx/rect.h" 15 #include "gfx/rect.h"
16 #include "third_party/ppapi/c/pp_cursor_type.h" 16 #include "third_party/ppapi/c/pp_cursor_type.h"
17 #include "third_party/ppapi/c/pp_instance.h" 17 #include "third_party/ppapi/c/pp_instance.h"
18 #include "third_party/ppapi/c/pp_resource.h" 18 #include "third_party/ppapi/c/pp_resource.h"
19 #include "third_party/ppapi/c/ppb_find.h"
20 #include "third_party/ppapi/c/ppp_find.h"
19 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" 21 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
20 22
21 typedef struct _pp_Var PP_Var; 23 typedef struct _pp_Var PP_Var;
22 typedef struct _ppb_Instance PPB_Instance; 24 typedef struct _ppb_Instance PPB_Instance;
23 typedef struct _ppp_Instance PPP_Instance; 25 typedef struct _ppp_Instance PPP_Instance;
24 26
25 namespace gfx { 27 namespace gfx {
26 class Rect; 28 class Rect;
27 } 29 }
28 30
(...skipping 15 matching lines...) Expand all
44 PluginInstance(PluginDelegate* delegate, 46 PluginInstance(PluginDelegate* delegate,
45 PluginModule* module, 47 PluginModule* module,
46 const PPP_Instance* instance_interface); 48 const PPP_Instance* instance_interface);
47 ~PluginInstance(); 49 ~PluginInstance();
48 50
49 static const PPB_Instance* GetInterface(); 51 static const PPB_Instance* GetInterface();
50 52
51 // Converts the given instance ID to an actual instance object. 53 // Converts the given instance ID to an actual instance object.
52 static PluginInstance* FromPPInstance(PP_Instance instance); 54 static PluginInstance* FromPPInstance(PP_Instance instance);
53 55
56 // Returns a pointer to the interface implementing PPB_Find that is
57 // exposed to the plugin.
58 static const PPB_Find* GetFindInterface();
59
54 PluginDelegate* delegate() const { return delegate_; } 60 PluginDelegate* delegate() const { return delegate_; }
55 PluginModule* module() const { return module_.get(); } 61 PluginModule* module() const { return module_.get(); }
56 62
57 WebKit::WebPluginContainer* container() const { return container_; } 63 WebKit::WebPluginContainer* container() const { return container_; }
58 64
59 const gfx::Rect& position() const { return position_; } 65 const gfx::Rect& position() const { return position_; }
60 const gfx::Rect& clip() const { return clip_; } 66 const gfx::Rect& clip() const { return clip_; }
61 67
62 int find_identifier() const { return find_identifier_; } 68 int find_identifier() const { return find_identifier_; }
63 69
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // visible. This is in the plugin's coordinate system, so fully visible will 134 // visible. This is in the plugin's coordinate system, so fully visible will
129 // be (0, 0, w, h) regardless of scroll position. 135 // be (0, 0, w, h) regardless of scroll position.
130 gfx::Rect clip_; 136 gfx::Rect clip_;
131 137
132 // The current device context for painting in 2D. 138 // The current device context for painting in 2D.
133 scoped_refptr<DeviceContext2D> device_context_2d_; 139 scoped_refptr<DeviceContext2D> device_context_2d_;
134 140
135 // The id of the current find operation, or -1 if none is in process. 141 // The id of the current find operation, or -1 if none is in process.
136 int find_identifier_; 142 int find_identifier_;
137 143
144 // The plugin find interface.
145 const PPP_Find* plugin_find_interface_;
146
138 // Containes the cursor if it's set by the plugin. 147 // Containes the cursor if it's set by the plugin.
139 scoped_ptr<WebKit::WebCursorInfo> cursor_; 148 scoped_ptr<WebKit::WebCursorInfo> cursor_;
140 149
141 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 150 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
142 }; 151 };
143 152
144 } // namespace pepper 153 } // namespace pepper
145 154
146 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 155 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « DEPS ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698