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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_VR_UI_SCENE_CREATOR_H_ 6 #define CHROME_BROWSER_VR_UI_SCENE_CREATOR_H_ 7 8 #include "base/macros.h" 9 #include "build/build_config.h" 10 #include "chrome/browser/vr/elements/content_element.h" 11 #include "chrome/browser/vr/elements/text_input.h" 12 #include "chrome/browser/vr/elements/ui_element_name.h" 13 #include "chrome/browser/vr/keyboard_delegate.h" 14 #include "ui/gfx/geometry/size_f.h" 15 16 namespace vr { 17 18 class ContentInputDelegate; 19 class Ui; 20 class UiBrowserInterface; 21 class UiScene; 22 struct Model; 23 24 // The scene manager creates our scene hierarchy. 25 class UiSceneCreator { 26 public: 27 UiSceneCreator(UiBrowserInterface* browser, 28 UiScene* scene, 29 Ui* ui, 30 ContentInputDelegate* content_input_delegate, 31 KeyboardDelegate* keyboard_delegate, 32 TextInputDelegate* text_input_delegate, 33 AudioDelegate* audio_delegate, 34 Model* model); 35 ~UiSceneCreator(); 36 37 void CreateScene(); 38 39 private: 40 void Create2dBrowsingSubtreeRoots(); 41 void CreateWebVrRoot(); 42 void CreateSystemIndicators(); 43 void CreateContentQuad(); 44 void CreateBackground(); 45 void CreateViewportAwareRoot(); 46 void CreateUrlBar(); 47 void CreateOverflowMenu(); 48 void CreateOmnibox(); 49 void CreateCloseButton(); 50 void CreatePrompts(); 51 void CreateToasts(); 52 void CreateVoiceSearchUiGroup(); 53 void CreateContentRepositioningAffordance(); 54 void CreateWebVrSubtree(); 55 void CreateWebVrOverlayElements(); 56 void CreateWebVrTimeoutScreen(); 57 void CreateControllers(); 58 void CreateKeyboard(); 59 void Create2dBrowsingHostedUi(); 60 void CreateExternalPromptNotifcationOverlay(); 61 62 UiBrowserInterface* browser_; 63 UiScene* scene_; 64 Ui* ui_; 65 ContentInputDelegate* content_input_delegate_; 66 KeyboardDelegate* keyboard_delegate_; 67 TextInputDelegate* text_input_delegate_; 68 AudioDelegate* audio_delegate_; 69 Model* model_; 70 71 DISALLOW_COPY_AND_ASSIGN(UiSceneCreator); 72 }; 73 74 } // namespace vr 75 76 #endif // CHROME_BROWSER_VR_UI_SCENE_CREATOR_H_ 77