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

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

Issue 10831229: Revert 150666 - Browser Plugin: Tell WebKit that the Browser Plugin supports keyboard focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | 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) 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 #include "content/common/browser_plugin_messages.h" 9 #include "content/common/browser_plugin_messages.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 275 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
276 } 276 }
277 277
278 NPObject* BrowserPlugin::scriptableObject() { 278 NPObject* BrowserPlugin::scriptableObject() {
279 NPObject* browser_plugin_np_object(bindings_->np_object()); 279 NPObject* browser_plugin_np_object(bindings_->np_object());
280 // The object is expected to be retained before it is returned. 280 // The object is expected to be retained before it is returned.
281 WebKit::WebBindings::retainObject(browser_plugin_np_object); 281 WebKit::WebBindings::retainObject(browser_plugin_np_object);
282 return browser_plugin_np_object; 282 return browser_plugin_np_object;
283 } 283 }
284 284
285 bool BrowserPlugin::supportsKeyboardFocus() const {
286 return true;
287 }
288
289 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) { 285 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) {
290 if (guest_crashed_) { 286 if (guest_crashed_) {
291 if (!sad_guest_) // Lazily initialize bitmap. 287 if (!sad_guest_) // Lazily initialize bitmap.
292 sad_guest_ = content::GetContentClient()->renderer()-> 288 sad_guest_ = content::GetContentClient()->renderer()->
293 GetSadPluginBitmap(); 289 GetSadPluginBitmap();
294 // TODO(fsamuel): Do we want to paint something other than a sad plugin 290 // TODO(fsamuel): Do we want to paint something other than a sad plugin
295 // on crash? See http://www.crbug.com/140266. 291 // on crash? See http://www.crbug.com/140266.
296 webkit::PaintSadPlugin(canvas, plugin_rect_, *sad_guest_); 292 webkit::PaintSadPlugin(canvas, plugin_rect_, *sad_guest_);
297 return; 293 return;
298 } 294 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 void* notify_data) { 408 void* notify_data) {
413 } 409 }
414 410
415 void BrowserPlugin::didFailLoadingFrameRequest( 411 void BrowserPlugin::didFailLoadingFrameRequest(
416 const WebKit::WebURL& url, 412 const WebKit::WebURL& url,
417 void* notify_data, 413 void* notify_data,
418 const WebKit::WebURLError& error) { 414 const WebKit::WebURLError& error) {
419 } 415 }
420 416
421 } // namespace content 417 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698