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

Side by Side Diff: chrome/plugin/webplugin_delegate_stub.cc

Issue 155172: Start using WebCursorInfo from the WebKit API. WebCursorInfo is a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/renderer/print_web_view_helper.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 #include "chrome/plugin/webplugin_delegate_stub.h" 5 #include "chrome/plugin/webplugin_delegate_stub.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "chrome/common/plugin_messages.h" 11 #include "chrome/common/plugin_messages.h"
12 #include "chrome/plugin/npobject_stub.h" 12 #include "chrome/plugin/npobject_stub.h"
13 #include "chrome/plugin/plugin_channel.h" 13 #include "chrome/plugin/plugin_channel.h"
14 #include "chrome/plugin/plugin_thread.h" 14 #include "chrome/plugin/plugin_thread.h"
15 #include "chrome/plugin/webplugin_proxy.h" 15 #include "chrome/plugin/webplugin_proxy.h"
16 #include "printing/native_metafile.h" 16 #include "printing/native_metafile.h"
17 #include "third_party/npapi/bindings/npapi.h" 17 #include "third_party/npapi/bindings/npapi.h"
18 #include "third_party/npapi/bindings/npruntime.h" 18 #include "third_party/npapi/bindings/npruntime.h"
19 #include "skia/ext/platform_device.h" 19 #include "skia/ext/platform_device.h"
20 #include "webkit/api/public/WebCursorInfo.h"
20 #include "webkit/glue/webcursor.h" 21 #include "webkit/glue/webcursor.h"
21 #include "webkit/glue/webplugin_delegate.h" 22 #include "webkit/glue/webplugin_delegate.h"
22 23
24 using WebKit::WebCursorInfo;
25
23 class FinishDestructionTask : public Task { 26 class FinishDestructionTask : public Task {
24 public: 27 public:
25 FinishDestructionTask(WebPluginDelegate* delegate, WebPlugin* webplugin) 28 FinishDestructionTask(WebPluginDelegate* delegate, WebPlugin* webplugin)
26 : delegate_(delegate), webplugin_(webplugin) { } 29 : delegate_(delegate), webplugin_(webplugin) { }
27 30
28 void Run() { 31 void Run() {
29 // WebPlugin must outlive WebPluginDelegate. 32 // WebPlugin must outlive WebPluginDelegate.
30 if (delegate_) 33 if (delegate_)
31 delegate_->PluginDestroyed(); 34 delegate_->PluginDestroyed();
32 35
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 210 }
208 211
209 void WebPluginDelegateStub::OnSetFocus() { 212 void WebPluginDelegateStub::OnSetFocus() {
210 delegate_->SetFocus(); 213 delegate_->SetFocus();
211 } 214 }
212 215
213 void WebPluginDelegateStub::OnHandleInputEvent( 216 void WebPluginDelegateStub::OnHandleInputEvent(
214 const WebKit::WebInputEvent *event, 217 const WebKit::WebInputEvent *event,
215 bool* handled, 218 bool* handled,
216 WebCursor* cursor) { 219 WebCursor* cursor) {
217 *handled = delegate_->HandleInputEvent(*event, cursor); 220 WebCursorInfo cursor_info;
221 *handled = delegate_->HandleInputEvent(*event, &cursor_info);
222 cursor->InitFromCursorInfo(cursor_info);
218 } 223 }
219 224
220 void WebPluginDelegateStub::OnPaint(const gfx::Rect& damaged_rect) { 225 void WebPluginDelegateStub::OnPaint(const gfx::Rect& damaged_rect) {
221 webplugin_->Paint(damaged_rect); 226 webplugin_->Paint(damaged_rect);
222 } 227 }
223 228
224 void WebPluginDelegateStub::OnDidPaint() { 229 void WebPluginDelegateStub::OnDidPaint() {
225 webplugin_->DidPaint(); 230 webplugin_->DidPaint();
226 } 231 }
227 232
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 params.notify_data, 363 params.notify_data,
359 params.stream); 364 params.stream);
360 webplugin_->OnResourceCreated(params.resource_id, resource_client); 365 webplugin_->OnResourceCreated(params.resource_id, resource_client);
361 } 366 }
362 367
363 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, 368 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url,
364 bool notify_needed, 369 bool notify_needed,
365 intptr_t notify_data) { 370 intptr_t notify_data) {
366 delegate_->URLRequestRouted(url, notify_needed, notify_data); 371 delegate_->URLRequestRouted(url, notify_needed, notify_data);
367 } 372 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698