| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/android/vr_shell/ui_scene.h" | 5 #include "chrome/browser/android/vr_shell/ui_scene.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 animations.erase(it); | 283 animations.erase(it); |
| 284 return; | 284 return; |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 | 288 |
| 289 void UiScene::HandleCommands(std::unique_ptr<base::ListValue> commands, | 289 void UiScene::HandleCommands(std::unique_ptr<base::ListValue> commands, |
| 290 const base::TimeTicks& time) { | 290 const base::TimeTicks& time) { |
| 291 for (auto& item : *commands) { | 291 for (auto& item : *commands) { |
| 292 base::DictionaryValue* dict; | 292 base::DictionaryValue* dict; |
| 293 CHECK(item->GetAsDictionary(&dict)); | 293 CHECK(item.GetAsDictionary(&dict)); |
| 294 | 294 |
| 295 Command type; | 295 Command type; |
| 296 base::DictionaryValue* data; | 296 base::DictionaryValue* data; |
| 297 CHECK(ParseInt(*dict, "type", &type)); | 297 CHECK(ParseInt(*dict, "type", &type)); |
| 298 CHECK(dict->GetDictionary("data", &data)); | 298 CHECK(dict->GetDictionary("data", &data)); |
| 299 | 299 |
| 300 switch (type) { | 300 switch (type) { |
| 301 case Command::ADD_ELEMENT: | 301 case Command::ADD_ELEMENT: |
| 302 AddUiElementFromDict(*data); | 302 AddUiElementFromDict(*data); |
| 303 break; | 303 break; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 content_element_ = element; | 503 content_element_ = element; |
| 504 break; | 504 break; |
| 505 default: | 505 default: |
| 506 element->fill = Fill::NONE; | 506 element->fill = Fill::NONE; |
| 507 break; | 507 break; |
| 508 } | 508 } |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace vr_shell | 512 } // namespace vr_shell |
| OLD | NEW |