| 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/web_contents/aura/gesture_nav_simple.h" | 5 #include "content/browser/web_contents/aura/gesture_nav_simple.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
| 8 #include "content/browser/frame_host/navigation_controller_impl.h" | 8 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 9 #include "content/browser/renderer_host/overscroll_controller.h" | 9 #include "content/browser/renderer_host/overscroll_controller.h" |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| 11 #include "content/browser/web_contents/web_contents_view.h" | 11 #include "content/browser/web_contents/web_contents_view.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "content/public/browser/overscroll_configuration.h" | 13 #include "content/public/browser/overscroll_configuration.h" |
| 14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
| 15 #include "grit/ui_resources.h" | |
| 16 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 17 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
| 18 #include "ui/compositor/layer_animation_observer.h" | 17 #include "ui/compositor/layer_animation_observer.h" |
| 19 #include "ui/compositor/layer_delegate.h" | 18 #include "ui/compositor/layer_delegate.h" |
| 20 #include "ui/compositor/scoped_layer_animation_settings.h" | 19 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 21 #include "ui/gfx/animation/tween.h" | 20 #include "ui/gfx/animation/tween.h" |
| 22 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
| 23 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 23 #include "ui/resources/grit/ui_resources.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const int kArrowHeight = 280; | 29 const int kArrowHeight = 280; |
| 30 const int kArrowWidth = 140; | 30 const int kArrowWidth = 140; |
| 31 const float kMinOpacity = 0.25f; | 31 const float kMinOpacity = 0.25f; |
| 32 | 32 |
| 33 bool ShouldNavigateForward(const NavigationController& controller, | 33 bool ShouldNavigateForward(const NavigationController& controller, |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 clip_layer_->SetBounds(window->layer()->bounds()); | 223 clip_layer_->SetBounds(window->layer()->bounds()); |
| 224 clip_layer_->SetMasksToBounds(true); | 224 clip_layer_->SetMasksToBounds(true); |
| 225 clip_layer_->Add(arrow_.get()); | 225 clip_layer_->Add(arrow_.get()); |
| 226 | 226 |
| 227 ui::Layer* parent = window->layer()->parent(); | 227 ui::Layer* parent = window->layer()->parent(); |
| 228 parent->Add(clip_layer_.get()); | 228 parent->Add(clip_layer_.get()); |
| 229 parent->StackAtTop(clip_layer_.get()); | 229 parent->StackAtTop(clip_layer_.get()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace content | 232 } // namespace content |
| OLD | NEW |