Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: content/browser/web_contents/aura/gesture_nav_simple.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest DCHECK OOPS Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 clip_layer_->SetBounds(window->layer()->bounds()); 226 clip_layer_->SetBounds(window->layer()->bounds());
224 clip_layer_->SetMasksToBounds(true); 227 clip_layer_->SetMasksToBounds(true);
225 clip_layer_->Add(arrow_.get()); 228 clip_layer_->Add(arrow_.get());
226 229
227 ui::Layer* parent = window->layer()->parent(); 230 ui::Layer* parent = window->layer()->parent();
228 parent->Add(clip_layer_.get()); 231 parent->Add(clip_layer_.get());
229 parent->StackAtTop(clip_layer_.get()); 232 parent->StackAtTop(clip_layer_.get());
230 } 233 }
231 234
232 } // namespace content 235 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698