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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h

Issue 2957173002: Update toast behavior and apperance according to UX requirement (Closed)
Patch Set: review Created 3 years, 5 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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 class SimpleTexturedElement : public TexturedElement { 23 class SimpleTexturedElement : public TexturedElement {
24 public: 24 public:
25 // |preferred_width| is the element's desired width in meters. Constraints 25 // |preferred_width| is the element's desired width in meters. Constraints
26 // implied by the texture being rendered may or may not allow it to be 26 // implied by the texture being rendered may or may not allow it to be
27 // rendered exactly at the preferred width. 27 // rendered exactly at the preferred width.
28 explicit SimpleTexturedElement(int maximum_width) 28 explicit SimpleTexturedElement(int maximum_width)
29 : TexturedElement(maximum_width), texture_(base::MakeUnique<T>()) {} 29 : TexturedElement(maximum_width), texture_(base::MakeUnique<T>()) {}
30 ~SimpleTexturedElement() override {} 30 ~SimpleTexturedElement() override {}
31 T* GetDerivedTexture() { return texture_.get(); } 31 T* GetDerivedTexture() { return texture_.get(); }
32 32
33 protected:
34 UiTexture* GetTexture() const override { return texture_.get(); }
35
33 private: 36 private:
34 UiTexture* GetTexture() const override { return texture_.get(); }
35 std::unique_ptr<T> texture_; 37 std::unique_ptr<T> texture_;
36 38
37 DISALLOW_COPY_AND_ASSIGN(SimpleTexturedElement); 39 DISALLOW_COPY_AND_ASSIGN(SimpleTexturedElement);
38 }; 40 };
39 41
40 typedef SimpleTexturedElement<ExitWarningTexture> ExitWarning; 42 typedef SimpleTexturedElement<ExitWarningTexture> ExitWarning;
41 typedef SimpleTexturedElement<InsecureContentPermanentTexture> 43 typedef SimpleTexturedElement<InsecureContentPermanentTexture>
42 PermanentSecurityWarning; 44 PermanentSecurityWarning;
43 typedef SimpleTexturedElement<InsecureContentTransientTexture> 45 typedef SimpleTexturedElement<InsecureContentTransientTexture>
44 TransientSecurityWarning; 46 TransientSecurityWarning;
45 typedef SimpleTexturedElement<ExclusiveScreenToastTexture> ExclusiveScreenToast;
46 typedef SimpleTexturedElement<SplashScreenIconTexture> SplashScreenIcon; 47 typedef SimpleTexturedElement<SplashScreenIconTexture> SplashScreenIcon;
47 48
48 } // namespace vr_shell 49 } // namespace vr_shell
49 50
50 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H _ 51 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_SIMPLE_TEXTURED_ELEMENT_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698