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

Side by Side Diff: chrome/browser/android/compositor/layer/toolbar_layer.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 2 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
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 "chrome/browser/android/compositor/layer/toolbar_layer.h" 5 #include "chrome/browser/android/compositor/layer/toolbar_layer.h"
6 6
7 #include "cc/layers/solid_color_layer.h" 7 #include "cc/layers/solid_color_layer.h"
8 #include "cc/layers/ui_resource_layer.h" 8 #include "cc/layers/ui_resource_layer.h"
9 #include "content/public/browser/android/compositor.h" 9 #include "content/public/browser/android/compositor.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // This layer effectively draws over the space it takes for shadows. Set the 34 // This layer effectively draws over the space it takes for shadows. Set the
35 // bounds to the non-shadow size so that other things can properly line up. 35 // bounds to the non-shadow size so that other things can properly line up.
36 layer_->SetBounds(resource->padding.size()); 36 layer_->SetBounds(resource->padding.size());
37 37
38 bitmap_layer_->SetUIResourceId(resource->ui_resource->id()); 38 bitmap_layer_->SetUIResourceId(resource->ui_resource->id());
39 bitmap_layer_->SetBounds(resource->size); 39 bitmap_layer_->SetBounds(resource->size);
40 40
41 anonymize_layer_->SetHideLayerAndSubtree(!anonymize); 41 anonymize_layer_->SetHideLayerAndSubtree(!anonymize);
42 if (anonymize) { 42 if (anonymize) {
43 anonymize_layer_->SetPosition(resource->aperture.origin()); 43 anonymize_layer_->SetPosition(gfx::PointF(resource->aperture.origin()));
44 anonymize_layer_->SetBounds(resource->aperture.size()); 44 anonymize_layer_->SetBounds(resource->aperture.size());
45 anonymize_layer_->SetBackgroundColor(toolbar_textbox_background_color); 45 anonymize_layer_->SetBackgroundColor(toolbar_textbox_background_color);
46 } 46 }
47 47
48 debug_layer_->SetBounds(resource->size); 48 debug_layer_->SetBounds(resource->size);
49 if (show_debug && !debug_layer_->parent()) 49 if (show_debug && !debug_layer_->parent())
50 layer_->AddChild(debug_layer_); 50 layer_->AddChild(debug_layer_);
51 else if (!show_debug && debug_layer_->parent()) 51 else if (!show_debug && debug_layer_->parent())
52 debug_layer_->RemoveFromParent(); 52 debug_layer_->RemoveFromParent();
53 53
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 debug_layer_->SetIsDrawable(true); 126 debug_layer_->SetIsDrawable(true);
127 debug_layer_->SetBackgroundColor(SK_ColorGREEN); 127 debug_layer_->SetBackgroundColor(SK_ColorGREEN);
128 debug_layer_->SetOpacity(0.5f); 128 debug_layer_->SetOpacity(0.5f);
129 } 129 }
130 130
131 ToolbarLayer::~ToolbarLayer() { 131 ToolbarLayer::~ToolbarLayer() {
132 } 132 }
133 133
134 } // namespace android 134 } // namespace android
135 } // namespace chrome 135 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698