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" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 canvas->DrawCircle( | 93 canvas->DrawCircle( |
94 gfx::Point(left_arrow_ ? 0 : kArrowWidth, kArrowHeight / 2), | 94 gfx::Point(left_arrow_ ? 0 : kArrowWidth, kArrowHeight / 2), |
95 kArrowWidth, | 95 kArrowWidth, |
96 paint); | 96 paint); |
97 canvas->DrawImageInt(*image_.ToImageSkia(), | 97 canvas->DrawImageInt(*image_.ToImageSkia(), |
98 left_arrow_ ? 0 : kArrowWidth - image_.Width(), | 98 left_arrow_ ? 0 : kArrowWidth - image_.Width(), |
99 (kArrowHeight - image_.Height()) / 2); | 99 (kArrowHeight - image_.Height()) / 2); |
100 } | 100 } |
101 | 101 |
| 102 virtual void OnDelegatedFrameDamage( |
| 103 const gfx::Rect& damage_rect_in_dip) OVERRIDE {} |
| 104 |
102 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} | 105 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} |
103 | 106 |
104 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { | 107 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { |
105 return base::Closure(); | 108 return base::Closure(); |
106 } | 109 } |
107 | 110 |
108 const gfx::Image& image_; | 111 const gfx::Image& image_; |
109 const bool left_arrow_; | 112 const bool left_arrow_; |
110 | 113 |
111 DISALLOW_COPY_AND_ASSIGN(ArrowLayerDelegate); | 114 DISALLOW_COPY_AND_ASSIGN(ArrowLayerDelegate); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 clip_layer_->SetBounds(window->layer()->bounds()); | 227 clip_layer_->SetBounds(window->layer()->bounds()); |
225 clip_layer_->SetMasksToBounds(true); | 228 clip_layer_->SetMasksToBounds(true); |
226 clip_layer_->Add(arrow_.get()); | 229 clip_layer_->Add(arrow_.get()); |
227 | 230 |
228 ui::Layer* parent = window->layer()->parent(); | 231 ui::Layer* parent = window->layer()->parent(); |
229 parent->Add(clip_layer_.get()); | 232 parent->Add(clip_layer_.get()); |
230 parent->StackAtTop(clip_layer_.get()); | 233 parent->StackAtTop(clip_layer_.get()); |
231 } | 234 } |
232 | 235 |
233 } // namespace content | 236 } // namespace content |
OLD | NEW |