| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_manager.h" | 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "chrome/browser/android/vr_shell/textures/close_button_texture.h" | 9 #include "chrome/browser/android/vr_shell/textures/close_button_texture.h" |
| 10 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" | 10 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 445 } |
| 446 | 446 |
| 447 void UiSceneManager::SetIsExiting() { | 447 void UiSceneManager::SetIsExiting() { |
| 448 if (scene_->is_exiting()) | 448 if (scene_->is_exiting()) |
| 449 return; | 449 return; |
| 450 scene_->set_is_exiting(); | 450 scene_->set_is_exiting(); |
| 451 ConfigureScene(); | 451 ConfigureScene(); |
| 452 } | 452 } |
| 453 | 453 |
| 454 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, | 454 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, |
| 455 bool can_go_forward) {} | 455 bool can_go_forward) { |
| 456 url_bar_->SetHistoryButtonsEnabled(can_go_back); |
| 457 } |
| 456 | 458 |
| 457 void UiSceneManager::OnCloseButtonClicked() { | 459 void UiSceneManager::OnCloseButtonClicked() { |
| 458 browser_->ExitCct(); | 460 browser_->ExitCct(); |
| 459 } | 461 } |
| 460 | 462 |
| 461 void UiSceneManager::OnUnsupportedMode(UiUnsupportedMode mode) { | 463 void UiSceneManager::OnUnsupportedMode(UiUnsupportedMode mode) { |
| 462 browser_->OnUnsupportedMode(mode); | 464 browser_->OnUnsupportedMode(mode); |
| 463 } | 465 } |
| 464 | 466 |
| 465 int UiSceneManager::AllocateId() { | 467 int UiSceneManager::AllocateId() { |
| 466 return next_available_id_++; | 468 return next_available_id_++; |
| 467 } | 469 } |
| 468 | 470 |
| 469 ColorScheme::Mode UiSceneManager::mode() const { | 471 ColorScheme::Mode UiSceneManager::mode() const { |
| 470 if (incognito_) | 472 if (incognito_) |
| 471 return ColorScheme::kModeIncognito; | 473 return ColorScheme::kModeIncognito; |
| 472 if (fullscreen_) | 474 if (fullscreen_) |
| 473 return ColorScheme::kModeFullscreen; | 475 return ColorScheme::kModeFullscreen; |
| 474 return ColorScheme::kModeNormal; | 476 return ColorScheme::kModeNormal; |
| 475 } | 477 } |
| 476 | 478 |
| 477 const ColorScheme& UiSceneManager::color_scheme() const { | 479 const ColorScheme& UiSceneManager::color_scheme() const { |
| 478 return ColorScheme::GetColorScheme(mode()); | 480 return ColorScheme::GetColorScheme(mode()); |
| 479 } | 481 } |
| 480 | 482 |
| 481 } // namespace vr_shell | 483 } // namespace vr_shell |
| OLD | NEW |