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

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

Issue 10831215: 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 259 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
260 } 260 }
261 261
262 NPObject* BrowserPlugin::scriptableObject() { 262 NPObject* BrowserPlugin::scriptableObject() {
263 NPObject* browser_plugin_np_object(bindings_->np_object()); 263 NPObject* browser_plugin_np_object(bindings_->np_object());
264 // The object is expected to be retained before it is returned. 264 // The object is expected to be retained before it is returned.
265 WebKit::WebBindings::retainObject(browser_plugin_np_object); 265 WebKit::WebBindings::retainObject(browser_plugin_np_object);
266 return browser_plugin_np_object; 266 return browser_plugin_np_object;
267 } 267 }
268 268
269 bool BrowserPlugin::supportsKeyboardFocus() const {
270 return true;
271 }
272
269 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) { 273 void BrowserPlugin::paint(WebCanvas* canvas, const WebRect& rect) {
270 if (guest_crashed_) { 274 if (guest_crashed_) {
271 if (!sad_guest_) // Lazily initialize bitmap. 275 if (!sad_guest_) // Lazily initialize bitmap.
272 sad_guest_ = content::GetContentClient()->renderer()-> 276 sad_guest_ = content::GetContentClient()->renderer()->
273 GetSadPluginBitmap(); 277 GetSadPluginBitmap();
274 // TODO(fsamuel): Do we want to paint something other than a sad plugin 278 // TODO(fsamuel): Do we want to paint something other than a sad plugin
275 // on crash? See http://www.crbug.com/140266. 279 // on crash? See http://www.crbug.com/140266.
276 webkit::PaintSadPlugin(canvas, plugin_rect_, *sad_guest_); 280 webkit::PaintSadPlugin(canvas, plugin_rect_, *sad_guest_);
277 return; 281 return;
278 } 282 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 void* notify_data) { 396 void* notify_data) {
393 } 397 }
394 398
395 void BrowserPlugin::didFailLoadingFrameRequest( 399 void BrowserPlugin::didFailLoadingFrameRequest(
396 const WebKit::WebURL& url, 400 const WebKit::WebURL& url,
397 void* notify_data, 401 void* notify_data,
398 const WebKit::WebURLError& error) { 402 const WebKit::WebURLError& error) {
399 } 403 }
400 404
401 } // namespace content 405 } // 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