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

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

Issue 2900012: Hookup pepper v2 zoom interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« 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"
21 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" 19 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
22 20
23 typedef struct _pp_Var PP_Var; 21 typedef struct _pp_Var PP_Var;
24 typedef struct _ppb_Instance PPB_Instance; 22 typedef struct _ppb_Instance PPB_Instance;
23 typedef struct _ppb_Find PPB_Find;
24 typedef struct _ppp_Find PPP_Find;
25 typedef struct _ppp_Instance PPP_Instance; 25 typedef struct _ppp_Instance PPP_Instance;
26 typedef struct _ppp_Zoom PPP_Zoom;
26 27
27 namespace gfx { 28 namespace gfx {
28 class Rect; 29 class Rect;
29 } 30 }
30 31
31 namespace WebKit { 32 namespace WebKit {
32 struct WebCursorInfo; 33 struct WebCursorInfo;
33 class WebInputEvent; 34 class WebInputEvent;
34 class WebPluginContainer; 35 class WebPluginContainer;
35 } 36 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 string16 GetSelectedText(bool html); 109 string16 GetSelectedText(bool html);
109 void Zoom(float factor, bool text_only); 110 void Zoom(float factor, bool text_only);
110 bool StartFind(const string16& search_text, 111 bool StartFind(const string16& search_text,
111 bool case_sensitive, 112 bool case_sensitive,
112 int identifier); 113 int identifier);
113 void SelectFindResult(bool forward); 114 void SelectFindResult(bool forward);
114 void StopFind(); 115 void StopFind();
115 116
116 private: 117 private:
117 bool LoadFindInterface(); 118 bool LoadFindInterface();
119 bool LoadZoomInterface();
118 120
119 PluginDelegate* delegate_; 121 PluginDelegate* delegate_;
120 scoped_refptr<PluginModule> module_; 122 scoped_refptr<PluginModule> module_;
121 const PPP_Instance* instance_interface_; 123 const PPP_Instance* instance_interface_;
122 124
123 // NULL until we have been initialized. 125 // NULL until we have been initialized.
124 WebKit::WebPluginContainer* container_; 126 WebKit::WebPluginContainer* container_;
125 127
126 // Indicates whether this is a full frame instance, which means it represents 128 // Indicates whether this is a full frame instance, which means it represents
127 // an entire document rather than an embed tag. 129 // an entire document rather than an embed tag.
128 bool full_frame_; 130 bool full_frame_;
129 131
130 // Position in the viewport (which moves as the page is scrolled) of this 132 // Position in the viewport (which moves as the page is scrolled) of this
131 // plugin. This will be a 0-sized rectangle if the plugin has not yet been 133 // plugin. This will be a 0-sized rectangle if the plugin has not yet been
132 // laid out. 134 // laid out.
133 gfx::Rect position_; 135 gfx::Rect position_;
134 136
135 // Current clip rect. This will be empty if the plugin is not currently 137 // Current clip rect. This will be empty if the plugin is not currently
136 // visible. This is in the plugin's coordinate system, so fully visible will 138 // visible. This is in the plugin's coordinate system, so fully visible will
137 // be (0, 0, w, h) regardless of scroll position. 139 // be (0, 0, w, h) regardless of scroll position.
138 gfx::Rect clip_; 140 gfx::Rect clip_;
139 141
140 // The current device context for painting in 2D. 142 // The current device context for painting in 2D.
141 scoped_refptr<DeviceContext2D> device_context_2d_; 143 scoped_refptr<DeviceContext2D> device_context_2d_;
142 144
143 // The id of the current find operation, or -1 if none is in process. 145 // The id of the current find operation, or -1 if none is in process.
144 int find_identifier_; 146 int find_identifier_;
145 147
146 // The plugin find interface. 148 // The plugin find and zoom interfaces.
147 const PPP_Find* plugin_find_interface_; 149 const PPP_Find* plugin_find_interface_;
150 const PPP_Zoom* plugin_zoom_interface_;
148 151
149 // Containes the cursor if it's set by the plugin. 152 // Containes the cursor if it's set by the plugin.
150 scoped_ptr<WebKit::WebCursorInfo> cursor_; 153 scoped_ptr<WebKit::WebCursorInfo> cursor_;
151 154
152 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 155 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
153 }; 156 };
154 157
155 } // namespace pepper 158 } // namespace pepper
156 159
157 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 160 #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