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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |