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