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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 11154025: browser-plugin: Accept drags through the new WebPlugin interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 8 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
OLDNEW
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 #include "content/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #if defined (OS_WIN) 9 #if defined (OS_WIN)
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 NPObject* browser_plugin_np_object(bindings_->np_object()); 542 NPObject* browser_plugin_np_object(bindings_->np_object());
543 // The object is expected to be retained before it is returned. 543 // The object is expected to be retained before it is returned.
544 WebKit::WebBindings::retainObject(browser_plugin_np_object); 544 WebKit::WebBindings::retainObject(browser_plugin_np_object);
545 return browser_plugin_np_object; 545 return browser_plugin_np_object;
546 } 546 }
547 547
548 bool BrowserPlugin::supportsKeyboardFocus() const { 548 bool BrowserPlugin::supportsKeyboardFocus() const {
549 return true; 549 return true;
550 } 550 }
551 551
552 bool BrowserPlugin::canProcessDrag() const {
553 return true;
554 }
555
552 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) { 556 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) {
553 if (guest_crashed_) { 557 if (guest_crashed_) {
554 if (!sad_guest_) // Lazily initialize bitmap. 558 if (!sad_guest_) // Lazily initialize bitmap.
555 sad_guest_ = content::GetContentClient()->renderer()-> 559 sad_guest_ = content::GetContentClient()->renderer()->
556 GetSadPluginBitmap(); 560 GetSadPluginBitmap();
557 // TODO(fsamuel): Do we want to paint something other than a sad plugin 561 // TODO(fsamuel): Do we want to paint something other than a sad plugin
558 // on crash? See http://www.crbug.com/140266. 562 // on crash? See http://www.crbug.com/140266.
559 // content_shell does not have the sad plugin bitmap, so we'll paint black 563 // content_shell does not have the sad plugin bitmap, so we'll paint black
560 // instead to make it clear that something went wrong. 564 // instead to make it clear that something went wrong.
561 if (sad_guest_) { 565 if (sad_guest_) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 void* notify_data) { 793 void* notify_data) {
790 } 794 }
791 795
792 void BrowserPlugin::didFailLoadingFrameRequest( 796 void BrowserPlugin::didFailLoadingFrameRequest(
793 const WebKit::WebURL& url, 797 const WebKit::WebURL& url,
794 void* notify_data, 798 void* notify_data,
795 const WebKit::WebURLError& error) { 799 const WebKit::WebURLError& error) {
796 } 800 }
797 801
798 } // namespace content 802 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/test/data/browser_plugin_dragging.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698