1 // Copyright 2018 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_MODEL_HOSTED_PLATFORM_UI_H_
6 #define CHROME_BROWSER_VR_MODEL_HOSTED_PLATFORM_UI_H_
7 
8 #include "chrome/browser/vr/platform_ui_input_delegate.h"
9 #include "chrome/browser/vr/vr_base_export.h"
10 #include "ui/gfx/geometry/rect_f.h"
11 
12 namespace vr {
13 typedef PlatformUiInputDelegate* PlatformUiInputDelegatePtr;
14 struct VR_BASE_EXPORT HostedPlatformUi {
15   bool hosted_ui_enabled = false;
16   PlatformUiInputDelegatePtr delegate = nullptr;
17   unsigned int texture_id = 0;
18   bool floating = false;
19 
20   // Rectangle's x and y indicate the location of the hosted UI as a percentage
21   // of the main content quad size.
22   // Rectangle's width and height indicate the size of the hosted UI as a
23   // percentage of the main content quad width. If the content quad is not
24   // present then width and height are normalized numbers in range [0, 1].
25   gfx::RectF rect;
26 };
27 
28 }  // namespace vr
29 
30 #endif  // CHROME_BROWSER_VR_MODEL_HOSTED_PLATFORM_UI_H_
31