OLD | NEW |
---|---|
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/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2132 // RenderWidgetHostViewAura, | 2132 // RenderWidgetHostViewAura, |
2133 // aura::client::ActivationChangeObserver implementation: | 2133 // aura::client::ActivationChangeObserver implementation: |
2134 | 2134 |
2135 void RenderWidgetHostViewAura::OnWindowActivated(aura::Window* gained_active, | 2135 void RenderWidgetHostViewAura::OnWindowActivated(aura::Window* gained_active, |
2136 aura::Window* lost_active) { | 2136 aura::Window* lost_active) { |
2137 DCHECK(window_ == gained_active || window_ == lost_active); | 2137 DCHECK(window_ == gained_active || window_ == lost_active); |
2138 if (window_ == gained_active) { | 2138 if (window_ == gained_active) { |
2139 const ui::Event* event = window_->GetHost()->dispatcher()->current_event(); | 2139 const ui::Event* event = window_->GetHost()->dispatcher()->current_event(); |
2140 if (event && PointerEventActivates(*event)) | 2140 if (event && PointerEventActivates(*event)) |
2141 host_->OnPointerEventActivate(); | 2141 host_->OnPointerEventActivate(); |
2142 | |
tdresser
2015/01/24 14:29:00
Get rid of whitespace changes in this file.
lanwei
2015/01/30 14:21:49
Done.
| |
2142 } | 2143 } |
2143 } | 2144 } |
2144 | 2145 |
2145 //////////////////////////////////////////////////////////////////////////////// | 2146 //////////////////////////////////////////////////////////////////////////////// |
2146 // RenderWidgetHostViewAura, aura::client::CursorClientObserver implementation: | 2147 // RenderWidgetHostViewAura, aura::client::CursorClientObserver implementation: |
2147 | 2148 |
2148 void RenderWidgetHostViewAura::OnCursorVisibilityChanged(bool is_visible) { | 2149 void RenderWidgetHostViewAura::OnCursorVisibilityChanged(bool is_visible) { |
2149 NotifyRendererOfCursorVisibilityState(is_visible); | 2150 NotifyRendererOfCursorVisibilityState(is_visible); |
2150 } | 2151 } |
2151 | 2152 |
2152 //////////////////////////////////////////////////////////////////////////////// | 2153 //////////////////////////////////////////////////////////////////////////////// |
2154 | |
2153 // RenderWidgetHostViewAura, aura::client::FocusChangeObserver implementation: | 2155 // RenderWidgetHostViewAura, aura::client::FocusChangeObserver implementation: |
2154 | 2156 |
2155 void RenderWidgetHostViewAura::OnWindowFocused(aura::Window* gained_focus, | 2157 void RenderWidgetHostViewAura::OnWindowFocused(aura::Window* gained_focus, |
2156 aura::Window* lost_focus) { | 2158 aura::Window* lost_focus) { |
2157 DCHECK(window_ == gained_focus || window_ == lost_focus); | 2159 DCHECK(window_ == gained_focus || window_ == lost_focus); |
2158 if (window_ == gained_focus) { | 2160 if (window_ == gained_focus) { |
2159 // We need to honor input bypass if the associated tab is does not want | 2161 // We need to honor input bypass if the associated tab is does not want |
2160 // input. This gives the current focused window a chance to be the text | 2162 // input. This gives the current focused window a chance to be the text |
2161 // input client and handle events. | 2163 // input client and handle events. |
2162 if (host_->ignore_input_events()) | 2164 if (host_->ignore_input_events()) |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2620 window_->GetHost(), | 2622 window_->GetHost(), |
2621 desired_size, | 2623 desired_size, |
2622 defer_compositor_lock, | 2624 defer_compositor_lock, |
2623 base::TimeDelta::FromMilliseconds(kResizeLockTimeoutMs))); | 2625 base::TimeDelta::FromMilliseconds(kResizeLockTimeoutMs))); |
2624 } | 2626 } |
2625 | 2627 |
2626 DelegatedFrameHost* RenderWidgetHostViewAura::GetDelegatedFrameHost() const { | 2628 DelegatedFrameHost* RenderWidgetHostViewAura::GetDelegatedFrameHost() const { |
2627 return delegated_frame_host_.get(); | 2629 return delegated_frame_host_.get(); |
2628 } | 2630 } |
2629 | 2631 |
2632 void RenderWidgetHostViewAura::ResetGestureDetection() { | |
2633 ui::GestureRecognizer::Get()->CancelActiveTouches(window_); | |
2634 } | |
2635 | |
2630 //////////////////////////////////////////////////////////////////////////////// | 2636 //////////////////////////////////////////////////////////////////////////////// |
2631 // RenderWidgetHostViewBase, public: | 2637 // RenderWidgetHostViewBase, public: |
2632 | 2638 |
2633 // static | 2639 // static |
2634 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2640 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2635 GetScreenInfoForWindow(results, NULL); | 2641 GetScreenInfoForWindow(results, NULL); |
2636 } | 2642 } |
2637 | 2643 |
2644 | |
2645 | |
2638 } // namespace content | 2646 } // namespace content |
OLD | NEW |