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

Side by Side Diff: webkit/glue/webplugin.h

Issue 291001: Moved Pepper delegate definition to chrome\renderer to allow it to use... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « webkit/glue/plugins/webplugin_delegate_pepper_impl.cc ('k') | webkit/glue/webplugin_delegate.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_WEBPLUGIN_H_ 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_H_
6 #define WEBKIT_GLUE_WEBPLUGIN_H_ 6 #define WEBKIT_GLUE_WEBPLUGIN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "app/gfx/native_widget_types.h" 11 #include "app/gfx/native_widget_types.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/gfx/rect.h" 13 #include "base/gfx/rect.h"
14 14
15 // TODO(port): this typedef is obviously incorrect on non-Windows 15 // TODO(port): this typedef is obviously incorrect on non-Windows
16 // platforms, but now a lot of code now accidentally depends on them 16 // platforms, but now a lot of code now accidentally depends on them
17 // existing. #ifdef out these declarations and fix all the users. 17 // existing. #ifdef out these declarations and fix all the users.
18 typedef void* HANDLE; 18 typedef void* HANDLE;
19 19
20 class GURL; 20 class GURL;
21 struct NPObject; 21 struct NPObject;
22 22
23 namespace WebKit { 23 namespace WebKit {
24 class WebFrame; 24 class WebFrame;
25 } 25 }
26 26
27 namespace webkit_glue { 27 namespace webkit_glue {
28 28
29 class WebPluginDelegate;
29 class WebPluginParentView; 30 class WebPluginParentView;
30 class WebPluginResourceClient; 31 class WebPluginResourceClient;
31 32
32 // Describes the new location for a plugin window. 33 // Describes the new location for a plugin window.
33 struct WebPluginGeometry { 34 struct WebPluginGeometry {
34 // On Windows, this is the plugin window in the plugin process. 35 // On Windows, this is the plugin window in the plugin process.
35 // On X11, this is the XID of the plugin-side GtkPlug containing the 36 // On X11, this is the XID of the plugin-side GtkPlug containing the
36 // GtkSocket hosting the actual plugin window. 37 // GtkSocket hosting the actual plugin window.
37 gfx::PluginWindowHandle window; 38 gfx::PluginWindowHandle window;
38 gfx::Rect window_rect; 39 gfx::Rect window_rect;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Returns true iff in off the record (Incognito) mode. 119 // Returns true iff in off the record (Incognito) mode.
119 virtual bool IsOffTheRecord() = 0; 120 virtual bool IsOffTheRecord() = 0;
120 121
121 // Called when the WebPluginResourceClient instance is deleted. 122 // Called when the WebPluginResourceClient instance is deleted.
122 virtual void ResourceClientDeleted( 123 virtual void ResourceClientDeleted(
123 WebPluginResourceClient* resource_client) {} 124 WebPluginResourceClient* resource_client) {}
124 125
125 // Defers the loading of the resource identified by resource_id. This is 126 // Defers the loading of the resource identified by resource_id. This is
126 // controlled by the defer parameter. 127 // controlled by the defer parameter.
127 virtual void SetDeferResourceLoading(int resource_id, bool defer) = 0; 128 virtual void SetDeferResourceLoading(int resource_id, bool defer) = 0;
129
130 // Gets the WebPluginDelegate that implements the interface.
131 // This API is only for use with Pepper, and hence only with
132 // in renderer process plugins.
133 virtual WebPluginDelegate* delegate() { return NULL; }
128 }; 134 };
129 135
130 // Simpler version of ResourceHandleClient that lends itself to proxying. 136 // Simpler version of ResourceHandleClient that lends itself to proxying.
131 class WebPluginResourceClient { 137 class WebPluginResourceClient {
132 public: 138 public:
133 virtual ~WebPluginResourceClient() {} 139 virtual ~WebPluginResourceClient() {}
134 virtual void WillSendRequest(const GURL& url) = 0; 140 virtual void WillSendRequest(const GURL& url) = 0;
135 // The request_is_seekable parameter indicates whether byte range requests 141 // The request_is_seekable parameter indicates whether byte range requests
136 // can be issued for the underlying stream. 142 // can be issued for the underlying stream.
137 virtual void DidReceiveResponse(const std::string& mime_type, 143 virtual void DidReceiveResponse(const std::string& mime_type,
138 const std::string& headers, 144 const std::string& headers,
139 uint32 expected_length, 145 uint32 expected_length,
140 uint32 last_modified, 146 uint32 last_modified,
141 bool request_is_seekable) = 0; 147 bool request_is_seekable) = 0;
142 virtual void DidReceiveData(const char* buffer, int length, 148 virtual void DidReceiveData(const char* buffer, int length,
143 int data_offset) = 0; 149 int data_offset) = 0;
144 virtual void DidFinishLoading() = 0; 150 virtual void DidFinishLoading() = 0;
145 virtual void DidFail() = 0; 151 virtual void DidFail() = 0;
146 virtual bool IsMultiByteResponseExpected() = 0; 152 virtual bool IsMultiByteResponseExpected() = 0;
147 }; 153 };
148 154
149 } // namespace webkit_glue 155 } // namespace webkit_glue
150 156
151 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H_ 157 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_pepper_impl.cc ('k') | webkit/glue/webplugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698