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

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

Issue 2801153003: [Contextual Search] Add a handle to the bar when Chrome Home is enabled (Closed)
Patch Set: Revert changes to OverlayPanelBase#initializeUiState() Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/reader_mode_layer.h" 5 #include "chrome/browser/android/compositor/layer/reader_mode_layer.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/resources/scoped_ui_resource.h" 8 #include "cc/resources/scoped_ui_resource.h"
9 #include "content/public/browser/android/compositor.h" 9 #include "content/public/browser/android/compositor.h"
10 #include "ui/android/resources/resource_manager.h" 10 #include "ui/android/resources/resource_manager.h"
(...skipping 17 matching lines...) Expand all
28 float bar_height, 28 float bar_height,
29 float text_opacity, 29 float text_opacity,
30 bool bar_border_visible, 30 bool bar_border_visible,
31 float bar_border_height, 31 float bar_border_height,
32 bool bar_shadow_visible, 32 bool bar_shadow_visible,
33 float bar_shadow_opacity) { 33 float bar_shadow_opacity) {
34 // Round values to avoid pixel gap between layers. 34 // Round values to avoid pixel gap between layers.
35 bar_height = floor(bar_height); 35 bar_height = floor(bar_height);
36 36
37 OverlayPanelLayer::SetProperties( 37 OverlayPanelLayer::SetProperties(
38 dp_to_px, 38 dp_to_px, content_layer, bar_height, panel_x, panel_y, panel_width,
39 content_layer, 39 panel_height, bar_margin_side, bar_height, 0.0f, text_opacity,
40 bar_height, 40 bar_border_visible, bar_border_height, bar_shadow_visible,
41 panel_x, 41 bar_shadow_opacity, 1.0f, 0, 0);
42 panel_y,
43 panel_width,
44 panel_height,
45 bar_margin_side,
46 bar_height,
47 0.0f,
48 text_opacity,
49 bar_border_visible,
50 bar_border_height,
51 bar_shadow_visible,
52 bar_shadow_opacity,
53 1.0f);
54 } 42 }
55 43
56 ReaderModeLayer::ReaderModeLayer( 44 ReaderModeLayer::ReaderModeLayer(
57 ui::ResourceManager* resource_manager) 45 ui::ResourceManager* resource_manager)
58 : OverlayPanelLayer(resource_manager) { 46 : OverlayPanelLayer(resource_manager) {
59 } 47 }
60 48
61 ReaderModeLayer::~ReaderModeLayer() { 49 ReaderModeLayer::~ReaderModeLayer() {
62 } 50 }
63 51
64 } // namespace android 52 } // namespace android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698