| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); | 1369 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); |
| 1370 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); | 1370 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); |
| 1371 if (top_controls_manager_) { | 1371 if (top_controls_manager_) { |
| 1372 metadata.location_bar_offset = | 1372 metadata.location_bar_offset = |
| 1373 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); | 1373 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); |
| 1374 metadata.location_bar_content_translation = | 1374 metadata.location_bar_content_translation = |
| 1375 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); | 1375 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); |
| 1376 metadata.overdraw_bottom_height = overdraw_bottom_height_; | 1376 metadata.overdraw_bottom_height = overdraw_bottom_height_; |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 active_tree_->GetViewportSelection(&metadata.selection_anchor, | 1379 active_tree_->GetViewportSelection(&metadata.selection_start, |
| 1380 &metadata.selection_focus); | 1380 &metadata.selection_end); |
| 1381 | 1381 |
| 1382 if (!InnerViewportScrollLayer()) | 1382 if (!InnerViewportScrollLayer()) |
| 1383 return metadata; | 1383 return metadata; |
| 1384 | 1384 |
| 1385 metadata.root_scroll_offset = active_tree_->TotalScrollOffset(); | 1385 metadata.root_scroll_offset = active_tree_->TotalScrollOffset(); |
| 1386 | 1386 |
| 1387 return metadata; | 1387 return metadata; |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { | 1390 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3152 } | 3152 } |
| 3153 | 3153 |
| 3154 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3154 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3155 std::vector<PictureLayerImpl*>::iterator it = | 3155 std::vector<PictureLayerImpl*>::iterator it = |
| 3156 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3156 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3157 DCHECK(it != picture_layers_.end()); | 3157 DCHECK(it != picture_layers_.end()); |
| 3158 picture_layers_.erase(it); | 3158 picture_layers_.erase(it); |
| 3159 } | 3159 } |
| 3160 | 3160 |
| 3161 } // namespace cc | 3161 } // namespace cc |
| OLD | NEW |