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

Side by Side Diff: cc/input/browser_controls_offset_manager_unittest.cc

Issue 2417783005: [Master/Overview CL] Make PageScaleFactor work for oopif subframe.
Patch Set: Rebase to master@{#429656}. Created 4 years, 1 month 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
« no previous file with comments | « cc/blimp/compositor_state_deserializer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/input/browser_controls_offset_manager.h" 5 #include "cc/input/browser_controls_offset_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 20 matching lines...) Expand all
31 : host_impl_(&task_runner_provider_, 31 : host_impl_(&task_runner_provider_,
32 &task_graph_runner_), 32 &task_graph_runner_),
33 redraw_needed_(false), 33 redraw_needed_(false),
34 update_draw_properties_needed_(false), 34 update_draw_properties_needed_(false),
35 bottom_controls_height_(0.f), 35 bottom_controls_height_(0.f),
36 top_controls_shown_ratio_(1.f), 36 top_controls_shown_ratio_(1.f),
37 top_controls_height_(top_controls_height), 37 top_controls_height_(top_controls_height),
38 browser_controls_show_threshold_(browser_controls_show_threshold), 38 browser_controls_show_threshold_(browser_controls_show_threshold),
39 browser_controls_hide_threshold_(browser_controls_hide_threshold) { 39 browser_controls_hide_threshold_(browser_controls_hide_threshold) {
40 active_tree_ = base::MakeUnique<LayerTreeImpl>( 40 active_tree_ = base::MakeUnique<LayerTreeImpl>(
41 &host_impl_, new SyncedProperty<ScaleGroup>, new SyncedBrowserControls, 41 &host_impl_, new SyncedProperty<ScaleGroup>,
42 new SyncedProperty<ScaleGroup>, new SyncedBrowserControls,
42 new SyncedElasticOverscroll); 43 new SyncedElasticOverscroll);
43 root_scroll_layer_ = LayerImpl::Create(active_tree_.get(), 1); 44 root_scroll_layer_ = LayerImpl::Create(active_tree_.get(), 1);
44 } 45 }
45 46
46 ~MockBrowserControlsOffsetManagerClient() override {} 47 ~MockBrowserControlsOffsetManagerClient() override {}
47 48
48 void DidChangeBrowserControlsPosition() override { 49 void DidChangeBrowserControlsPosition() override {
49 redraw_needed_ = true; 50 redraw_needed_ = true;
50 update_draw_properties_needed_ = true; 51 update_draw_properties_needed_ = true;
51 } 52 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 EXPECT_TRUE(manager->has_animation()); 527 EXPECT_TRUE(manager->has_animation());
527 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); 528 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio());
528 529
529 manager->UpdateBrowserControlsState(BOTH, SHOWN, true); 530 manager->UpdateBrowserControlsState(BOTH, SHOWN, true);
530 EXPECT_FALSE(manager->has_animation()); 531 EXPECT_FALSE(manager->has_animation());
531 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); 532 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio());
532 } 533 }
533 534
534 } // namespace 535 } // namespace
535 } // namespace cc 536 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blimp/compositor_state_deserializer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698