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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 853333002: Browser Plugin: Make aware of focus direction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 11 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
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/common/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" 10 #include "content/browser/frame_host/render_widget_host_view_guest.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) { 110 void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) {
111 SetSize(rect.size()); 111 SetSize(rect.size());
112 } 112 }
113 113
114 void RenderWidgetHostViewGuest::Focus() { 114 void RenderWidgetHostViewGuest::Focus() {
115 // InterstitialPageImpl focuses views directly, so we place focus logic here. 115 // InterstitialPageImpl focuses views directly, so we place focus logic here.
116 // InterstitialPages are not WebContents, and so BrowserPluginGuest does not 116 // InterstitialPages are not WebContents, and so BrowserPluginGuest does not
117 // have direct access to the interstitial page's RenderWidgetHost. 117 // have direct access to the interstitial page's RenderWidgetHost.
118 if (guest_) 118 if (guest_)
119 guest_->SetFocus(host_, true); 119 guest_->SetFocus(host_, true, blink::WebFocusTypeNone);
120 } 120 }
121 121
122 bool RenderWidgetHostViewGuest::HasFocus() const { 122 bool RenderWidgetHostViewGuest::HasFocus() const {
123 if (!guest_) 123 if (!guest_)
124 return false; 124 return false;
125 return guest_->focused(); 125 return guest_->focused();
126 } 126 }
127 127
128 #if defined(USE_AURA) 128 #if defined(USE_AURA)
129 void RenderWidgetHostViewGuest::ProcessAckedTouchEvent( 129 void RenderWidgetHostViewGuest::ProcessAckedTouchEvent(
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 } 585 }
586 586
587 if (blink::WebInputEvent::isGestureEventType(event->type)) { 587 if (blink::WebInputEvent::isGestureEventType(event->type)) {
588 host_->ForwardGestureEvent( 588 host_->ForwardGestureEvent(
589 *static_cast<const blink::WebGestureEvent*>(event)); 589 *static_cast<const blink::WebGestureEvent*>(event));
590 return; 590 return;
591 } 591 }
592 } 592 }
593 593
594 } // namespace content 594 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/common/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698