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

Unified Diff: ui/views/controls/webview/webview.cc

Issue 1870573003: Full Keyboard Access: Second Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/tree/tree_view.cc ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index 686eeb6ddd4a4d78541e966cca8f3ce20e861b81..c3c1c2322125a9e35d5b7279a8dd6731cd1156cc 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -20,6 +20,7 @@
#include "ui/events/event.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/focus/focus_manager.h"
+#include "ui/views/style/platform_style.h"
#include "ui/views/views_delegate.h"
namespace views {
@@ -67,7 +68,9 @@ void WebView::SetWebContents(content::WebContents* replacement) {
observing_render_process_host_->AddObserver(this);
}
// web_contents() now returns |replacement| from here onwards.
- SetFocusable(!!web_contents());
+ if (web_contents())
+ PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::WEBVIEW, this);
+
if (wc_owner_.get() != replacement)
wc_owner_.reset();
if (embed_fullscreen_widget_mode_enabled_) {
« no previous file with comments | « ui/views/controls/tree/tree_view.cc ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698