| 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 "mojo/services/view_manager/view_manager_service_impl.h" | 5 #include "mojo/services/view_manager/view_manager_service_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 10 #include "mojo/converters/input_events/input_events_type_converters.h" | 10 #include "mojo/converters/input_events/input_events_type_converters.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 void ViewManagerServiceImpl::NotifyDrawnStateChanged(const ServerView* view, | 359 void ViewManagerServiceImpl::NotifyDrawnStateChanged(const ServerView* view, |
| 360 bool new_drawn_value) { | 360 bool new_drawn_value) { |
| 361 // Even though we don't know about view, it may be an ancestor of our root, in | 361 // Even though we don't know about view, it may be an ancestor of our root, in |
| 362 // which case the change may effect our roots drawn state. | 362 // which case the change may effect our roots drawn state. |
| 363 if (!root_.get()) | 363 if (!root_.get()) |
| 364 return; | 364 return; |
| 365 | 365 |
| 366 const ServerView* root = GetView(*root_); | 366 const ServerView* root = GetView(*root_); |
| 367 DCHECK(root); | 367 // TODO(sky): Find out why this DCHECK gets hit when running |
| 368 // sky/tools/skydb sky/tests/lowlevel/iframe.sky |
| 369 // http://crbug.com/432658 |
| 370 // DCHECK(root); |
| 368 if (view->Contains(root) && | 371 if (view->Contains(root) && |
| 369 (new_drawn_value != root->IsDrawn(connection_manager_->root()))) { | 372 (new_drawn_value != root->IsDrawn(connection_manager_->root()))) { |
| 370 client()->OnViewDrawnStateChanged(ViewIdToTransportId(root->id()), | 373 client()->OnViewDrawnStateChanged(ViewIdToTransportId(root->id()), |
| 371 new_drawn_value); | 374 new_drawn_value); |
| 372 } | 375 } |
| 373 } | 376 } |
| 374 | 377 |
| 375 void ViewManagerServiceImpl::DestroyViews() { | 378 void ViewManagerServiceImpl::DestroyViews() { |
| 376 if (!view_map_.empty()) { | 379 if (!view_map_.empty()) { |
| 377 ConnectionManager::ScopedChange change(this, connection_manager_, true); | 380 ConnectionManager::ScopedChange change(this, connection_manager_, true); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 | 578 |
| 576 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy( | 579 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy( |
| 577 const ServerView* view) const { | 580 const ServerView* view) const { |
| 578 ViewManagerServiceImpl* connection = | 581 ViewManagerServiceImpl* connection = |
| 579 connection_manager_->GetConnectionWithRoot(view->id()); | 582 connection_manager_->GetConnectionWithRoot(view->id()); |
| 580 return connection && connection != this; | 583 return connection && connection != this; |
| 581 } | 584 } |
| 582 | 585 |
| 583 } // namespace service | 586 } // namespace service |
| 584 } // namespace mojo | 587 } // namespace mojo |
| OLD | NEW |