OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 public IPC::Listener, | 49 public IPC::Listener, |
50 public IPC::Sender, | 50 public IPC::Sender, |
51 public base::SupportsWeakPtr<WebPluginDelegateProxy> { | 51 public base::SupportsWeakPtr<WebPluginDelegateProxy> { |
52 public: | 52 public: |
53 WebPluginDelegateProxy(WebPluginImpl* plugin, | 53 WebPluginDelegateProxy(WebPluginImpl* plugin, |
54 const std::string& mime_type, | 54 const std::string& mime_type, |
55 const base::WeakPtr<RenderViewImpl>& render_view, | 55 const base::WeakPtr<RenderViewImpl>& render_view, |
56 RenderFrameImpl* render_frame); | 56 RenderFrameImpl* render_frame); |
57 | 57 |
58 // WebPluginDelegate implementation: | 58 // WebPluginDelegate implementation: |
59 virtual void PluginDestroyed() OVERRIDE; | 59 virtual void PluginDestroyed() override; |
60 virtual bool Initialize(const GURL& url, | 60 virtual bool Initialize(const GURL& url, |
61 const std::vector<std::string>& arg_names, | 61 const std::vector<std::string>& arg_names, |
62 const std::vector<std::string>& arg_values, | 62 const std::vector<std::string>& arg_values, |
63 bool load_manually) OVERRIDE; | 63 bool load_manually) override; |
64 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 64 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
65 const gfx::Rect& clip_rect) OVERRIDE; | 65 const gfx::Rect& clip_rect) override; |
66 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) OVERRIDE; | 66 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) override; |
67 virtual NPObject* GetPluginScriptableObject() OVERRIDE; | 67 virtual NPObject* GetPluginScriptableObject() override; |
68 virtual struct _NPP* GetPluginNPP() OVERRIDE; | 68 virtual struct _NPP* GetPluginNPP() override; |
69 virtual bool GetFormValue(base::string16* value) OVERRIDE; | 69 virtual bool GetFormValue(base::string16* value) override; |
70 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, | 70 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, |
71 int notify_id) OVERRIDE; | 71 int notify_id) override; |
72 virtual void SetFocus(bool focused) OVERRIDE; | 72 virtual void SetFocus(bool focused) override; |
73 virtual bool HandleInputEvent(const blink::WebInputEvent& event, | 73 virtual bool HandleInputEvent(const blink::WebInputEvent& event, |
74 WebCursor::CursorInfo* cursor) OVERRIDE; | 74 WebCursor::CursorInfo* cursor) override; |
75 virtual int GetProcessId() OVERRIDE; | 75 virtual int GetProcessId() override; |
76 | 76 |
77 // Informs the plugin that its containing content view has gained or lost | 77 // Informs the plugin that its containing content view has gained or lost |
78 // first responder status. | 78 // first responder status. |
79 virtual void SetContentAreaFocus(bool has_focus); | 79 virtual void SetContentAreaFocus(bool has_focus); |
80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
81 // Informs the plugin that plugin IME has updated its status. | 81 // Informs the plugin that plugin IME has updated its status. |
82 virtual void ImeCompositionUpdated( | 82 virtual void ImeCompositionUpdated( |
83 const base::string16& text, | 83 const base::string16& text, |
84 const std::vector<int>& clauses, | 84 const std::vector<int>& clauses, |
85 const std::vector<int>& target, | 85 const std::vector<int>& target, |
(...skipping 11 matching lines...) Expand all Loading... |
97 virtual void SetContainerVisibility(bool is_visible); | 97 virtual void SetContainerVisibility(bool is_visible); |
98 // Informs the plugin that its enclosing window's frame has changed. | 98 // Informs the plugin that its enclosing window's frame has changed. |
99 virtual void WindowFrameChanged(gfx::Rect window_frame, gfx::Rect view_frame); | 99 virtual void WindowFrameChanged(gfx::Rect window_frame, gfx::Rect view_frame); |
100 // Informs the plugin that plugin IME has completed. | 100 // Informs the plugin that plugin IME has completed. |
101 // If |text| is empty, composition was cancelled. | 101 // If |text| is empty, composition was cancelled. |
102 virtual void ImeCompositionCompleted(const base::string16& text, | 102 virtual void ImeCompositionCompleted(const base::string16& text, |
103 int plugin_id); | 103 int plugin_id); |
104 #endif | 104 #endif |
105 | 105 |
106 // IPC::Listener implementation: | 106 // IPC::Listener implementation: |
107 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 107 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
108 virtual void OnChannelError() OVERRIDE; | 108 virtual void OnChannelError() override; |
109 | 109 |
110 // IPC::Sender implementation: | 110 // IPC::Sender implementation: |
111 virtual bool Send(IPC::Message* msg) OVERRIDE; | 111 virtual bool Send(IPC::Message* msg) override; |
112 | 112 |
113 virtual void SendJavaScriptStream(const GURL& url, | 113 virtual void SendJavaScriptStream(const GURL& url, |
114 const std::string& result, | 114 const std::string& result, |
115 bool success, | 115 bool success, |
116 int notify_id) OVERRIDE; | 116 int notify_id) override; |
117 | 117 |
118 virtual void DidReceiveManualResponse(const GURL& url, | 118 virtual void DidReceiveManualResponse(const GURL& url, |
119 const std::string& mime_type, | 119 const std::string& mime_type, |
120 const std::string& headers, | 120 const std::string& headers, |
121 uint32 expected_length, | 121 uint32 expected_length, |
122 uint32 last_modified) OVERRIDE; | 122 uint32 last_modified) override; |
123 virtual void DidReceiveManualData(const char* buffer, int length) OVERRIDE; | 123 virtual void DidReceiveManualData(const char* buffer, int length) override; |
124 virtual void DidFinishManualLoading() OVERRIDE; | 124 virtual void DidFinishManualLoading() override; |
125 virtual void DidManualLoadFail() OVERRIDE; | 125 virtual void DidManualLoadFail() override; |
126 virtual WebPluginResourceClient* CreateResourceClient( | 126 virtual WebPluginResourceClient* CreateResourceClient( |
127 unsigned long resource_id, const GURL& url, int notify_id) OVERRIDE; | 127 unsigned long resource_id, const GURL& url, int notify_id) override; |
128 virtual WebPluginResourceClient* CreateSeekableResourceClient( | 128 virtual WebPluginResourceClient* CreateSeekableResourceClient( |
129 unsigned long resource_id, int range_request_id) OVERRIDE; | 129 unsigned long resource_id, int range_request_id) override; |
130 virtual void FetchURL(unsigned long resource_id, | 130 virtual void FetchURL(unsigned long resource_id, |
131 int notify_id, | 131 int notify_id, |
132 const GURL& url, | 132 const GURL& url, |
133 const GURL& first_party_for_cookies, | 133 const GURL& first_party_for_cookies, |
134 const std::string& method, | 134 const std::string& method, |
135 const char* buf, | 135 const char* buf, |
136 unsigned int len, | 136 unsigned int len, |
137 const GURL& referrer, | 137 const GURL& referrer, |
138 bool notify_redirects, | 138 bool notify_redirects, |
139 bool is_plugin_src_load, | 139 bool is_plugin_src_load, |
140 int origin_pid, | 140 int origin_pid, |
141 int render_frame_id, | 141 int render_frame_id, |
142 int render_view_id) OVERRIDE; | 142 int render_view_id) override; |
143 | 143 |
144 gfx::PluginWindowHandle GetPluginWindowHandle(); | 144 gfx::PluginWindowHandle GetPluginWindowHandle(); |
145 | 145 |
146 protected: | 146 protected: |
147 friend class base::DeleteHelper<WebPluginDelegateProxy>; | 147 friend class base::DeleteHelper<WebPluginDelegateProxy>; |
148 virtual ~WebPluginDelegateProxy(); | 148 virtual ~WebPluginDelegateProxy(); |
149 | 149 |
150 private: | 150 private: |
151 struct SharedBitmap { | 151 struct SharedBitmap { |
152 SharedBitmap(); | 152 SharedBitmap(); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
307 // The url of the main frame hosting the plugin. | 307 // The url of the main frame hosting the plugin. |
308 GURL page_url_; | 308 GURL page_url_; |
309 | 309 |
310 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 310 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
311 }; | 311 }; |
312 | 312 |
313 } // namespace content | 313 } // namespace content |
314 | 314 |
315 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 315 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |