| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "base/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
| 6 #include "cc/animation/scrollbar_animation_controller.h" | 6 #include "cc/animation/scrollbar_animation_controller.h" |
| 7 #include "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
| 8 #include "cc/layers/painted_scrollbar_layer.h" | 8 #include "cc/layers/painted_scrollbar_layer.h" |
| 9 #include "cc/layers/painted_scrollbar_layer_impl.h" | 9 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 10 #include "cc/layers/scrollbar_layer_interface.h" | 10 #include "cc/layers/scrollbar_layer_interface.h" |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 567 } |
| 568 | 568 |
| 569 class MockLayerTreeHost : public LayerTreeHost { | 569 class MockLayerTreeHost : public LayerTreeHost { |
| 570 public: | 570 public: |
| 571 MockLayerTreeHost(FakeLayerTreeHostClient* client, | 571 MockLayerTreeHost(FakeLayerTreeHostClient* client, |
| 572 const LayerTreeSettings& settings) | 572 const LayerTreeSettings& settings) |
| 573 : LayerTreeHost(client, NULL, settings), | 573 : LayerTreeHost(client, NULL, settings), |
| 574 next_id_(1), | 574 next_id_(1), |
| 575 total_ui_resource_created_(0), | 575 total_ui_resource_created_(0), |
| 576 total_ui_resource_deleted_(0) { | 576 total_ui_resource_deleted_(0) { |
| 577 InitializeSingleThreaded(client); | 577 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); |
| 578 } | 578 } |
| 579 | 579 |
| 580 virtual UIResourceId CreateUIResource(UIResourceClient* content) OVERRIDE { | 580 virtual UIResourceId CreateUIResource(UIResourceClient* content) OVERRIDE { |
| 581 total_ui_resource_created_++; | 581 total_ui_resource_created_++; |
| 582 UIResourceId nid = next_id_++; | 582 UIResourceId nid = next_id_++; |
| 583 ui_resource_bitmap_map_.insert( | 583 ui_resource_bitmap_map_.insert( |
| 584 std::make_pair(nid, content->GetBitmap(nid, false))); | 584 std::make_pair(nid, content->GetBitmap(nid, false))); |
| 585 return nid; | 585 return nid; |
| 586 } | 586 } |
| 587 | 587 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 893 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 894 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 894 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 895 | 895 |
| 896 // Horizontal Scrollbars. | 896 // Horizontal Scrollbars. |
| 897 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 897 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 898 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 898 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace | 901 } // namespace |
| 902 } // namespace cc | 902 } // namespace cc |
| OLD | NEW |