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

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

Issue 18768: POSIX: gfx::NativeViewId and CrossProcessEvent (Closed)
Patch Set: Addressing Brett's comments Created 11 years, 10 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 | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webplugin_impl.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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/gfx/rect.h" 13 #include "base/gfx/rect.h"
14 #include "base/gfx/native_widget_types.h"
14 15
15 // TODO(port): type typedefs are obviously incorrect on non-Windows 16 // TODO(port): this typedef is obviously incorrect on non-Windows
16 // platforms, but now a lot of code now accidentally depends on them 17 // platforms, but now a lot of code now accidentally depends on them
17 // existing. #ifdef out these declarations and fix all the users. 18 // existing. #ifdef out these declarations and fix all the users.
18 typedef struct HWND__* HWND;
19 typedef void* HANDLE; 19 typedef void* HANDLE;
20 20
21 class GURL; 21 class GURL;
22 class WebFrame; 22 class WebFrame;
23 class WebPluginResourceClient; 23 class WebPluginResourceClient;
24 24
25 struct NPObject; 25 struct NPObject;
26 26
27 // Describes a mime type entry for a plugin. 27 // Describes a mime type entry for a plugin.
28 struct WebPluginMimeType { 28 struct WebPluginMimeType {
(...skipping 22 matching lines...) Expand all
51 // A description of the plugin that we get from its version info. 51 // A description of the plugin that we get from its version info.
52 std::wstring desc; 52 std::wstring desc;
53 53
54 // A list of all the mime types that this plugin supports. 54 // A list of all the mime types that this plugin supports.
55 std::vector<WebPluginMimeType> mime_types; 55 std::vector<WebPluginMimeType> mime_types;
56 }; 56 };
57 57
58 58
59 // Describes the new location for a plugin window. 59 // Describes the new location for a plugin window.
60 struct WebPluginGeometry { 60 struct WebPluginGeometry {
61 HWND window; 61 gfx::NativeView window;
62 gfx::Rect window_rect; 62 gfx::Rect window_rect;
63 // Clip rect (include) and cutouts (excludes), relative to 63 // Clip rect (include) and cutouts (excludes), relative to
64 // window_rect origin. 64 // window_rect origin.
65 gfx::Rect clip_rect; 65 gfx::Rect clip_rect;
66 std::vector<gfx::Rect> cutout_rects; 66 std::vector<gfx::Rect> cutout_rects;
67 bool visible; 67 bool visible;
68 }; 68 };
69 69
70 70
71 enum RoutingStatus { 71 enum RoutingStatus {
(...skipping 10 matching lines...) Expand all
82 WebPlugin() { } 82 WebPlugin() { }
83 virtual ~WebPlugin() { } 83 virtual ~WebPlugin() { }
84 84
85 // Called by the plugin delegate to let the WebPlugin know if the plugin is 85 // Called by the plugin delegate to let the WebPlugin know if the plugin is
86 // windowed (i.e. handle is not NULL) or windowless (handle is NULL). This 86 // windowed (i.e. handle is not NULL) or windowless (handle is NULL). This
87 // tells the WebPlugin to send mouse/keyboard events to the plugin delegate, 87 // tells the WebPlugin to send mouse/keyboard events to the plugin delegate,
88 // as well as the information about the HDC for paint operations. 88 // as well as the information about the HDC for paint operations.
89 // The pump_messages_event is a event handle which is valid only for 89 // The pump_messages_event is a event handle which is valid only for
90 // windowless plugins and is used in NPP_HandleEvent calls to pump messages 90 // windowless plugins and is used in NPP_HandleEvent calls to pump messages
91 // if the plugin enters a modal loop. 91 // if the plugin enters a modal loop.
92 virtual void SetWindow(HWND window, HANDLE pump_messages_event) = 0; 92 virtual void SetWindow(gfx::NativeView window,
93 HANDLE pump_messages_event) = 0;
93 // Cancels a pending request. 94 // Cancels a pending request.
94 virtual void CancelResource(int id) = 0; 95 virtual void CancelResource(int id) = 0;
95 virtual void Invalidate() = 0; 96 virtual void Invalidate() = 0;
96 virtual void InvalidateRect(const gfx::Rect& rect) = 0; 97 virtual void InvalidateRect(const gfx::Rect& rect) = 0;
97 98
98 // Returns the NPObject for the browser's window object. 99 // Returns the NPObject for the browser's window object.
99 virtual NPObject* GetWindowScriptNPObject() = 0; 100 virtual NPObject* GetWindowScriptNPObject() = 0;
100 101
101 // Returns the DOM element that loaded the plugin. 102 // Returns the DOM element that loaded the plugin.
102 virtual NPObject* GetPluginElement() = 0; 103 virtual NPObject* GetPluginElement() = 0;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 virtual void DidReceiveData(const char* buffer, int length, 164 virtual void DidReceiveData(const char* buffer, int length,
164 int data_offset) = 0; 165 int data_offset) = 0;
165 virtual void DidFinishLoading() = 0; 166 virtual void DidFinishLoading() = 0;
166 virtual void DidFail() = 0; 167 virtual void DidFail() = 0;
167 virtual bool IsMultiByteResponseExpected() = 0; 168 virtual bool IsMultiByteResponseExpected() = 0;
168 }; 169 };
169 170
170 171
171 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ 172 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__
172 173
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698