| OLD | NEW |
| 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_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class Element; | 34 class Element; |
| 35 class Event; | 35 class Event; |
| 36 class Frame; | 36 class Frame; |
| 37 class IntRect; | 37 class IntRect; |
| 38 class KeyboardEvent; | 38 class KeyboardEvent; |
| 39 class KURL; | 39 class KURL; |
| 40 class MouseEvent; | 40 class MouseEvent; |
| 41 class ResourceHandle; | 41 class ResourceHandle; |
| 42 class ResourceError; | 42 class ResourceError; |
| 43 class ResourceResponse; | 43 class ResourceResponse; |
| 44 class ScrollView; |
| 44 class String; | 45 class String; |
| 45 class Widget; | 46 class Widget; |
| 46 } | 47 } |
| 47 | 48 |
| 48 // Implements WebCore::Widget functions that WebPluginImpl needs. This class | 49 // Implements WebCore::Widget functions that WebPluginImpl needs. This class |
| 49 // exists because it is possible for the plugin widget to be deleted at any | 50 // exists because it is possible for the plugin widget to be deleted at any |
| 50 // time because of a delegate javascript call. However we don't want the | 51 // time because of a delegate javascript call. However we don't want the |
| 51 // WebPluginImpl to be deleted from under us because it could be lower in the | 52 // WebPluginImpl to be deleted from under us because it could be lower in the |
| 52 // call stack. | 53 // call stack. |
| 53 class WebPluginContainer : public WebCore::Widget { | 54 class WebPluginContainer : public WebCore::Widget { |
| 54 public: | 55 public: |
| 55 WebPluginContainer(WebPluginImpl* impl); | 56 WebPluginContainer(WebPluginImpl* impl); |
| 56 virtual ~WebPluginContainer(); | 57 virtual ~WebPluginContainer(); |
| 57 NPObject* GetPluginScriptableObject(); | 58 NPObject* GetPluginScriptableObject(); |
| 58 | 59 |
| 59 // Widget methods: | 60 // Widget methods: |
| 60 virtual void setFrameRect(const WebCore::IntRect& rect); | 61 virtual void setFrameRect(const WebCore::IntRect& rect); |
| 61 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& rect); | 62 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& rect); |
| 62 virtual void invalidateRect(const WebCore::IntRect&); | 63 virtual void invalidateRect(const WebCore::IntRect&); |
| 63 virtual void setFocus(); | 64 virtual void setFocus(); |
| 64 virtual void show(); | 65 virtual void show(); |
| 65 virtual void hide(); | 66 virtual void hide(); |
| 66 virtual void handleEvent(WebCore::Event* event); | 67 virtual void handleEvent(WebCore::Event* event); |
| 67 virtual void frameRectsChanged(); | 68 virtual void frameRectsChanged(); |
| 68 virtual void setParentVisible(bool visible); | 69 virtual void setParentVisible(bool visible); |
| 70 virtual void setParent(WebCore::ScrollView* view); |
| 69 | 71 |
| 70 #if USE(JSC) | 72 #if USE(JSC) |
| 71 virtual bool isPluginView() const; | 73 virtual bool isPluginView() const; |
| 72 #endif | 74 #endif |
| 73 | 75 |
| 74 // Returns window-relative rectangles that should clip this widget. | 76 // Returns window-relative rectangles that should clip this widget. |
| 75 // Only rects that intersect the given bounds are relevant. | 77 // Only rects that intersect the given bounds are relevant. |
| 76 // Use this to implement iframe shim behavior. | 78 // Use this to implement iframe shim behavior. |
| 77 // | 79 // |
| 78 // TODO(tulrich): add this method to WebCore/platform/Widget.h so it | 80 // TODO(tulrich): add this method to WebCore/platform/Widget.h so it |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 }; | 320 }; |
| 319 | 321 |
| 320 std::vector<ClientInfo> clients_; | 322 std::vector<ClientInfo> clients_; |
| 321 | 323 |
| 322 bool windowless_; | 324 bool windowless_; |
| 323 HWND window_; | 325 HWND window_; |
| 324 WebCore::Element* element_; | 326 WebCore::Element* element_; |
| 325 WebFrameImpl* webframe_; | 327 WebFrameImpl* webframe_; |
| 326 | 328 |
| 327 WebPluginDelegate* delegate_; | 329 WebPluginDelegate* delegate_; |
| 328 bool force_geometry_update_; | |
| 329 bool visible_; | 330 bool visible_; |
| 330 // Set when we receive the first paint notification for a windowed | |
| 331 // plugin widget. | |
| 332 bool received_first_paint_notification_; | |
| 333 | 331 |
| 334 WebPluginContainer* widget_; | 332 WebPluginContainer* widget_; |
| 335 | 333 |
| 336 typedef std::map<WebPluginResourceClient*, MultipartResponseDelegate*> | 334 typedef std::map<WebPluginResourceClient*, MultipartResponseDelegate*> |
| 337 MultiPartResponseHandlerMap; | 335 MultiPartResponseHandlerMap; |
| 338 // Tracks HTTP multipart response handlers instantiated for | 336 // Tracks HTTP multipart response handlers instantiated for |
| 339 // a WebPluginResourceClient instance. | 337 // a WebPluginResourceClient instance. |
| 340 MultiPartResponseHandlerMap multi_part_response_map_; | 338 MultiPartResponseHandlerMap multi_part_response_map_; |
| 341 | 339 |
| 342 // The plugin source URL. | 340 // The plugin source URL. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 354 // Holds the list of argument names passed to the plugin. | 352 // Holds the list of argument names passed to the plugin. |
| 355 std::vector<std::string> arg_names_; | 353 std::vector<std::string> arg_names_; |
| 356 | 354 |
| 357 // Holds the list of argument values passed to the plugin. | 355 // Holds the list of argument values passed to the plugin. |
| 358 std::vector<std::string> arg_values_; | 356 std::vector<std::string> arg_values_; |
| 359 | 357 |
| 360 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 358 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
| 361 }; | 359 }; |
| 362 | 360 |
| 363 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 361 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| OLD | NEW |