OLD | NEW |
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 "components/view_manager/public/cpp/view.h" | 5 #include "components/view_manager/public/cpp/view.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" | 10 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 } | 392 } |
393 } | 393 } |
394 | 394 |
395 //////////////////////////////////////////////////////////////////////////////// | 395 //////////////////////////////////////////////////////////////////////////////// |
396 // View, protected: | 396 // View, protected: |
397 | 397 |
398 namespace { | 398 namespace { |
399 | 399 |
400 ViewportMetricsPtr CreateEmptyViewportMetrics() { | 400 ViewportMetricsPtr CreateEmptyViewportMetrics() { |
401 ViewportMetricsPtr metrics = ViewportMetrics::New(); | 401 ViewportMetricsPtr metrics = ViewportMetrics::New(); |
402 metrics->size = Size::New(); | 402 metrics->size_in_pixels = Size::New(); |
403 // TODO(vtl): The |.Pass()| below is only needed due to an MSVS bug; remove it | 403 // TODO(vtl): The |.Pass()| below is only needed due to an MSVS bug; remove it |
404 // once that's fixed. | 404 // once that's fixed. |
405 return metrics.Pass(); | 405 return metrics.Pass(); |
406 } | 406 } |
407 | 407 |
408 } // namespace | 408 } // namespace |
409 | 409 |
410 View::View() | 410 View::View() |
411 : manager_(NULL), | 411 : manager_(NULL), |
412 id_(static_cast<Id>(-1)), | 412 id_(static_cast<Id>(-1)), |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { | 603 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { |
604 return false; | 604 return false; |
605 } | 605 } |
606 | 606 |
607 while (!children_.empty()) | 607 while (!children_.empty()) |
608 RemoveChild(children_[0]); | 608 RemoveChild(children_[0]); |
609 return true; | 609 return true; |
610 } | 610 } |
611 | 611 |
612 } // namespace mojo | 612 } // namespace mojo |
OLD | NEW |