Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2906403002: Disable back button when stack is empty (Closed)
Patch Set: nit Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 451 }
452 452
453 void UiSceneManager::SetIsExiting() { 453 void UiSceneManager::SetIsExiting() {
454 if (scene_->is_exiting()) 454 if (scene_->is_exiting())
455 return; 455 return;
456 scene_->set_is_exiting(); 456 scene_->set_is_exiting();
457 ConfigureScene(); 457 ConfigureScene();
458 } 458 }
459 459
460 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, 460 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back,
461 bool can_go_forward) {} 461 bool can_go_forward) {
462 url_bar_->SetHistoryButtonsEnabled(can_go_back);
463 }
462 464
463 void UiSceneManager::OnCloseButtonClicked() { 465 void UiSceneManager::OnCloseButtonClicked() {
464 browser_->ExitCct(); 466 browser_->ExitCct();
465 } 467 }
466 468
467 void UiSceneManager::OnUnsupportedMode(UiUnsupportedMode mode) { 469 void UiSceneManager::OnUnsupportedMode(UiUnsupportedMode mode) {
468 browser_->OnUnsupportedMode(mode); 470 browser_->OnUnsupportedMode(mode);
469 } 471 }
470 472
471 int UiSceneManager::AllocateId() { 473 int UiSceneManager::AllocateId() {
472 return next_available_id_++; 474 return next_available_id_++;
473 } 475 }
474 476
475 ColorScheme::Mode UiSceneManager::mode() const { 477 ColorScheme::Mode UiSceneManager::mode() const {
476 if (incognito_) 478 if (incognito_)
477 return ColorScheme::kModeIncognito; 479 return ColorScheme::kModeIncognito;
478 if (fullscreen_) 480 if (fullscreen_)
479 return ColorScheme::kModeFullscreen; 481 return ColorScheme::kModeFullscreen;
480 return ColorScheme::kModeNormal; 482 return ColorScheme::kModeNormal;
481 } 483 }
482 484
483 const ColorScheme& UiSceneManager::color_scheme() const { 485 const ColorScheme& UiSceneManager::color_scheme() const {
484 return ColorScheme::GetColorScheme(mode()); 486 return ColorScheme::GetColorScheme(mode());
485 } 487 }
486 488
487 } // namespace vr_shell 489 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/url_bar.cc ('k') | chrome/browser/android/vr_shell/vr_gl_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698