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 "content/browser/android/overscroll_controller_android.h" | 5 #include "content/browser/android/overscroll_controller_android.h" |
6 | 6 |
7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/output/compositor_frame_metadata.h" | 10 #include "cc/output/compositor_frame_metadata.h" |
11 #include "content/browser/android/edge_effect.h" | 11 #include "content/browser/android/edge_effect.h" |
12 #include "content/browser/android/edge_effect_l.h" | 12 #include "content/browser/android/edge_effect_l.h" |
13 #include "content/browser/web_contents/web_contents_impl.h" | 13 #include "content/browser/web_contents/web_contents_impl.h" |
14 #include "content/common/input/did_overscroll_params.h" | 14 #include "content/common/input/did_overscroll_params.h" |
15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/user_metrics.h" | 16 #include "content/public/browser/user_metrics.h" |
17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
18 #include "third_party/WebKit/public/web/WebInputEvent.h" | 18 #include "third_party/WebKit/public/web/WebInputEvent.h" |
19 #include "ui/android/resources/resource_manager.h" | 19 #include "ui/android/resources/resource_manager.h" |
20 #include "ui/base/android/window_android_compositor.h" | 20 #include "ui/android/window_android_compositor.h" |
21 #include "ui/base/l10n/l10n_util_android.h" | 21 #include "ui/base/l10n/l10n_util_android.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Used for conditional creation of EdgeEffect types for the overscroll glow. | 26 // Used for conditional creation of EdgeEffect types for the overscroll glow. |
27 const int kAndroidLSDKVersion = 21; | 27 const int kAndroidLSDKVersion = 21; |
28 | 28 |
29 // Default offset in dips from the top of the view beyond which the refresh | 29 // Default offset in dips from the top of the view beyond which the refresh |
30 // action will be activated. | 30 // action will be activated. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 scoped_ptr<EdgeEffectBase> OverscrollControllerAndroid::CreateEdgeEffect() { | 314 scoped_ptr<EdgeEffectBase> OverscrollControllerAndroid::CreateEdgeEffect() { |
315 return CreateGlowEdgeEffect(&compositor_->GetResourceManager(), dpi_scale_); | 315 return CreateGlowEdgeEffect(&compositor_->GetResourceManager(), dpi_scale_); |
316 } | 316 } |
317 | 317 |
318 void OverscrollControllerAndroid::SetNeedsAnimate() { | 318 void OverscrollControllerAndroid::SetNeedsAnimate() { |
319 compositor_->SetNeedsAnimate(); | 319 compositor_->SetNeedsAnimate(); |
320 } | 320 } |
321 | 321 |
322 } // namespace content | 322 } // namespace content |
OLD | NEW |