Commit 80dbf61e authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

VR: Separate UI export defines in preparation for a library split

BUG=
R=tiborg

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I145aba4f83b9e15b7de055380f45c6ea1ca89c85
Reviewed-on: https://chromium-review.googlesource.com/1135646Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574915}
parent ba563dc0
......@@ -275,7 +275,10 @@ component("vr_common") {
"//ui/gl/init",
]
defines = [ "VR_IMPLEMENTATION" ]
defines = [
"VR_IMPLEMENTATION",
"VR_UI_IMPLEMENTATION",
]
}
test("vr_common_unittests") {
......
......@@ -11,7 +11,7 @@
#include "base/macros.h"
#include "cc/animation/keyframe_model.h"
#include "chrome/browser/vr/transition.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace cc {
......@@ -32,7 +32,7 @@ namespace vr {
// TODO(vollick): if cc::KeyframeModel and friends move into gfx/, then this
// class should follow suit. As such, it should not absorb any vr-specific
// functionality.
class VR_EXPORT Animation final {
class VR_UI_EXPORT Animation final {
public:
static int GetNextKeyframeModelId();
static int GetNextGroupId();
......
......@@ -12,7 +12,7 @@
#include "chrome/browser/vr/elements/draw_phase.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/model/color_scheme.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace gfx {
class PointF;
......@@ -27,7 +27,7 @@ class Rect;
// axis. This matches the Daydream disk-style button. Subclasses may add
// arbitrary non-hit-testable elements as children of the background, if
// desired.
class VR_EXPORT Button : public UiElement {
class VR_UI_EXPORT Button : public UiElement {
public:
explicit Button(base::RepeatingCallback<void()> click_handler,
AudioDelegate* audio_delegate);
......
......@@ -8,7 +8,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/platform_ui_element.h"
#include "chrome/browser/vr/ui_element_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
......@@ -22,7 +22,7 @@ class TextInputDelegate;
// If quad layer is set, it stops surface frames of web page but instead draws
// transparent in UI. So the web page in quad layer can be later composited to
// the UI.
class VR_EXPORT ContentElement : public PlatformUiElement {
class VR_UI_EXPORT ContentElement : public PlatformUiElement {
public:
typedef typename base::RepeatingCallback<void(const gfx::SizeF&)>
ScreenBoundsChangedCallback;
......
......@@ -10,7 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "chrome/browser/vr/elements/vector_icon_button.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/vector_icon_types.h"
namespace vr {
......@@ -20,7 +20,7 @@ class VectorIcon;
// A disc button has a circle as the background and a vector icon as the
// foreground. When hovered, background and foreground both move forward on Z
// axis. This matches the Daydream disc-style button.
class VR_EXPORT DiscButton : public VectorIconButton {
class VR_UI_EXPORT DiscButton : public VectorIconButton {
public:
DiscButton(base::RepeatingCallback<void()> click_handler,
const gfx::VectorIcon& icon,
......
......@@ -9,12 +9,12 @@
#include "chrome/browser/vr/elements/ui_element_name.h"
#include "chrome/browser/vr/model/capturing_state_model.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/vector_icon_types.h"
namespace vr {
struct VR_EXPORT IndicatorSpec {
struct VR_UI_EXPORT IndicatorSpec {
IndicatorSpec(UiElementName name,
UiElementName webvr_name,
const gfx::VectorIcon& icon,
......@@ -40,7 +40,7 @@ struct VR_EXPORT IndicatorSpec {
bool is_url;
};
VR_EXPORT std::vector<IndicatorSpec> GetIndicatorSpecs();
VR_UI_EXPORT std::vector<IndicatorSpec> GetIndicatorSpecs();
} // namespace vr
......
......@@ -9,13 +9,13 @@
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/keyboard_delegate.h"
#include "chrome/browser/vr/renderers/base_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
// Represents the virtual keyboard. This element is a proxy to the
// platform-specific keyboard implementation.
class VR_EXPORT Keyboard : public UiElement {
class VR_UI_EXPORT Keyboard : public UiElement {
public:
Keyboard();
~Keyboard() override;
......
......@@ -6,11 +6,11 @@
#define CHROME_BROWSER_VR_ELEMENTS_LINEAR_LAYOUT_H_
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
class VR_EXPORT LinearLayout : public UiElement {
class VR_UI_EXPORT LinearLayout : public UiElement {
public:
enum Direction { kUp, kDown, kLeft, kRight };
......
......@@ -9,7 +9,7 @@
#include "chrome/browser/vr/elements/text.h"
#include "chrome/browser/vr/model/color_scheme.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "components/omnibox/browser/autocomplete_match.h"
namespace gfx {
......@@ -19,12 +19,12 @@ class RenderText;
namespace vr {
// Convert Autocomplete's suggestion formatting to generic VR text formatting.
VR_EXPORT TextFormatting
VR_UI_EXPORT TextFormatting
ConvertClassification(const ACMatchClassifications& classifications,
size_t text_length,
const ColorScheme& color_scheme);
VR_EXPORT url_formatter::FormatUrlTypes GetVrFormatUrlTypes();
VR_UI_EXPORT url_formatter::FormatUrlTypes GetVrFormatUrlTypes();
struct ElisionParameters {
// The horizontal pixel offset to be applied to URL text, such that the right
......@@ -42,15 +42,16 @@ struct ElisionParameters {
// elision parameters. This means computing an offset such that the rightmost
// portion of the TLD is visible (along with a small part of the path), and
// fading either edge if they overflow available space.
VR_EXPORT ElisionParameters GetElisionParameters(const GURL& gurl,
const url::Parsed& parsed,
gfx::RenderText* render_text,
int min_path_pixels);
VR_UI_EXPORT ElisionParameters
GetElisionParameters(const GURL& gurl,
const url::Parsed& parsed,
gfx::RenderText* render_text,
int min_path_pixels);
// Given a formatted URL and associated Parsed data, generates a VR-specific
// text formatting description that can be applied to a RenderText. This mainly
// handles emphasis of hosts, etc., but could also include color.
VR_EXPORT TextFormatting
VR_UI_EXPORT TextFormatting
CreateUrlFormatting(const base::string16& formatted_url,
const url::Parsed& parsed,
SkColor emphasized_color,
......
......@@ -10,11 +10,11 @@
#include "chrome/browser/vr/elements/text_input.h"
#include "chrome/browser/vr/model/omnibox_suggestions.h"
#include "chrome/browser/vr/model/text_input_info.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
class VR_EXPORT OmniboxTextField : public TextInput {
class VR_UI_EXPORT OmniboxTextField : public TextInput {
public:
OmniboxTextField(float font_height_meters,
OnInputEditedCallback input_edit_callback,
......
......@@ -6,13 +6,13 @@
#define CHROME_BROWSER_VR_ELEMENTS_OVAL_H_
#include "chrome/browser/vr/elements/rect.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
// An oval behaves like a rect save for the fact that it manages its own corner
// radii to ensure circular right and left end caps.
class VR_EXPORT Oval : public Rect {
class VR_UI_EXPORT Oval : public Rect {
public:
Oval();
~Oval() override;
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
......@@ -21,7 +21,7 @@ namespace vr {
// follows the alphabetical ordering pictured above.
//
// NOTE: it is assumed that each child view has the same dimensions.
class VR_EXPORT PagedGridLayout : public UiElement {
class VR_UI_EXPORT PagedGridLayout : public UiElement {
public:
enum PageState { kNone, kActive, kInactive, kHidden };
......
......@@ -6,7 +6,7 @@
#define CHROME_BROWSER_VR_ELEMENTS_RECT_H_
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/point_f.h"
......@@ -18,7 +18,7 @@ namespace vr {
// two colors. This radial gradient is not aspect correct; it will be elliptical
// if the rect is stretched. This is intended to serve as a background to be put
// behind other elements.
class VR_EXPORT Rect : public UiElement {
class VR_UI_EXPORT Rect : public UiElement {
public:
Rect();
~Rect() override;
......
......@@ -6,14 +6,14 @@
#define CHROME_BROWSER_VR_ELEMENTS_RENDER_TEXT_WRAPPER_H_
#include "base/macros.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/render_text.h"
namespace vr {
// A minimal, mockable wrapper around gfx::RenderText, to facilitate testing of
// RenderText users.
class VR_EXPORT RenderTextWrapper {
class VR_UI_EXPORT RenderTextWrapper {
public:
explicit RenderTextWrapper(gfx::RenderText* render_text);
virtual ~RenderTextWrapper();
......
......@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/transform.h"
namespace vr {
......@@ -21,7 +21,7 @@ namespace vr {
// adjusting the up vector of the content so that it aligns with the head's up
// vector. As the window is being repositioned, we rotate it so that it remains
// pointing upward.
class VR_EXPORT Repositioner : public UiElement {
class VR_UI_EXPORT Repositioner : public UiElement {
public:
Repositioner();
~Repositioner() override;
......
......@@ -9,14 +9,14 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/transform.h"
namespace vr {
// When enabled, a resizer scales its descendant elements in response to
// trackpad use.
class VR_EXPORT Resizer : public UiElement {
class VR_UI_EXPORT Resizer : public UiElement {
public:
Resizer();
~Resizer() override;
......
......@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/transform.h"
namespace vr {
......@@ -18,7 +18,7 @@ namespace vr {
// permits dimensions in the subtree to be expressed in DM directly. Its main
// contribution is a tailored local transform that accounts for adjustments made
// by other ScaledDepthAdjuster elements on its ancestor chain.
class VR_EXPORT ScaledDepthAdjuster : public UiElement {
class VR_UI_EXPORT ScaledDepthAdjuster : public UiElement {
public:
explicit ScaledDepthAdjuster(float delta_z);
~ScaledDepthAdjuster() override;
......
......@@ -6,7 +6,7 @@
#define CHROME_BROWSER_VR_ELEMENTS_SCROLLABLE_ELEMENT_H_
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
......@@ -15,7 +15,7 @@ namespace vr {
// It is required that none of its descendants define any rotation. A good use
// case for this element is the creation of menus, for which you can place a
// LinearLayout as its only scrolling.
class VR_EXPORT ScrollableElement : public UiElement {
class VR_UI_EXPORT ScrollableElement : public UiElement {
public:
enum Orientation { kVertical, kHorizontal };
......
......@@ -8,7 +8,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/renderers/base_quad_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace vr {
......@@ -17,7 +17,7 @@ namespace vr {
// applied. The shadow is applied across its padding.
// By default the direct child is used as the shadow caster. This behavior can
// be changed by manually setting a shadow caster.
class VR_EXPORT Shadow : public UiElement {
class VR_UI_EXPORT Shadow : public UiElement {
public:
Shadow();
~Shadow() override;
......
......@@ -9,14 +9,14 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/textured_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace vr {
class SpinnerTexture;
class VR_EXPORT Spinner : public TexturedElement {
class VR_UI_EXPORT Spinner : public TexturedElement {
public:
explicit Spinner(int texture_width);
~Spinner() override;
......
......@@ -10,7 +10,7 @@
#include "chrome/browser/vr/elements/textured_element.h"
#include "chrome/browser/vr/elements/ui_texture.h"
#include "chrome/browser/vr/model/color_scheme.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRect.h"
#include "ui/gfx/font.h"
......@@ -35,7 +35,7 @@ enum TextLayoutMode {
// This class describes a formatting attribute, applicable to a Text element.
// Attributes are applied in order, and may override previous attributes.
// Formatting may be applied only to non-wrapping text.
class VR_EXPORT TextFormattingAttribute {
class VR_UI_EXPORT TextFormattingAttribute {
public:
enum Type {
COLOR,
......@@ -93,7 +93,7 @@ struct TextRenderParameters {
float shadow_size = 10.0f;
};
class VR_EXPORT Text : public TexturedElement {
class VR_UI_EXPORT Text : public TexturedElement {
public:
explicit Text(float font_height_dmms);
~Text() override;
......
......@@ -12,7 +12,7 @@
#include "chrome/browser/vr/model/color_scheme.h"
#include "chrome/browser/vr/model/text_input_info.h"
#include "chrome/browser/vr/text_input_delegate.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace vr {
......@@ -20,7 +20,7 @@ namespace vr {
class Rect;
class Text;
class VR_EXPORT TextInput : public UiElement {
class VR_UI_EXPORT TextInput : public UiElement {
public:
// Called when this element receives focus.
typedef base::RepeatingCallback<void(bool)> OnFocusChangedCallback;
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_bindings.h"
......@@ -18,7 +18,7 @@ namespace vr {
class UiTexture;
class VR_EXPORT TexturedElement : public UiElement {
class VR_UI_EXPORT TexturedElement : public UiElement {
public:
TexturedElement();
......
......@@ -7,13 +7,13 @@
#include "cc/animation/transform_operation.h"
#include "chrome/browser/vr/elements/rect.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
// A throbber renders a fading and pulsing rect through animating element's
// scale and opacity.
class VR_EXPORT Throbber : public Rect {
class VR_UI_EXPORT Throbber : public Rect {
public:
Throbber();
~Throbber() override;
......
......@@ -7,13 +7,13 @@
#include "base/callback.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
// Base class for a transient element that automatically hides itself after some
// point in time. The exacly transience behavior depends on the subclass.
class VR_EXPORT TransientElement : public UiElement {
class VR_UI_EXPORT TransientElement : public UiElement {
public:
~TransientElement() override;
......@@ -40,7 +40,7 @@ class VR_EXPORT TransientElement : public UiElement {
};
// An element that hides itself after after a set timeout.
class VR_EXPORT SimpleTransientElement : public TransientElement {
class VR_UI_EXPORT SimpleTransientElement : public TransientElement {
public:
explicit SimpleTransientElement(const base::TimeDelta& timeout);
~SimpleTransientElement() override;
......
......@@ -26,7 +26,7 @@
#include "chrome/browser/vr/model/reticle_model.h"
#include "chrome/browser/vr/model/sounds.h"
#include "chrome/browser/vr/target_property.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/geometry/point3_f.h"
#include "ui/gfx/geometry/quaternion.h"
#include "ui/gfx/geometry/rect_f.h"
......@@ -55,7 +55,7 @@ enum LayoutAlignment {
BOTTOM,
};
struct VR_EXPORT EventHandlers {
struct VR_UI_EXPORT EventHandlers {
EventHandlers();
EventHandlers(const EventHandlers& other);
~EventHandlers();
......@@ -96,7 +96,7 @@ struct HitTestResult {
float distance_to_plane;
};
class VR_EXPORT UiElement : public cc::AnimationTarget {
class VR_UI_EXPORT UiElement : public cc::AnimationTarget {
public:
UiElement();
~UiElement() override;
......
......@@ -7,7 +7,7 @@
#include <string>
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
......@@ -154,7 +154,7 @@ enum UiElementName {
kNumUiElementNames,
};
VR_EXPORT std::string UiElementNameToString(UiElementName name);
VR_UI_EXPORT std::string UiElementNameToString(UiElementName name);
} // namespace vr
......
......@@ -7,7 +7,7 @@
#include <string>
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
......@@ -54,7 +54,7 @@ enum UiElementType {
kNumUiElementTypes,
};
VR_EXPORT std::string UiElementTypeToString(UiElementType type);
VR_UI_EXPORT std::string UiElementTypeToString(UiElementType type);
} // namespace vr
......
......@@ -12,14 +12,14 @@
#include "chrome/browser/vr/elements/omnibox_formatting.h"
#include "chrome/browser/vr/elements/text.h"
#include "chrome/browser/vr/ui_unsupported_mode.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/render_text.h"
#include "url/gurl.h"
#include "url/third_party/mozilla/url_parse.h"
namespace vr {
class VR_EXPORT UrlText : public Text {
class VR_UI_EXPORT UrlText : public Text {
public:
UrlText(float font_height_dmm,
const base::RepeatingCallback<void()>& unhandled_codepoint_callback);
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/textured_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace gfx {
......@@ -20,7 +20,7 @@ namespace vr {
class VectorIconTexture;
class VR_EXPORT VectorIcon : public TexturedElement {
class VR_UI_EXPORT VectorIcon : public TexturedElement {
public:
explicit VectorIcon(int texture_width);
~VectorIcon() override;
......
......@@ -10,7 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "chrome/browser/vr/elements/button.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/vector_icon_types.h"
namespace vr {
......@@ -20,7 +20,7 @@ class VectorIcon;
// A vector button has rect as a background and a vector icon as the
// foreground. When hovered, background and foreground both move forward on Z
// axis.
class VR_EXPORT VectorIconButton : public Button {
class VR_UI_EXPORT VectorIconButton : public Button {
public:
VectorIconButton(base::RepeatingCallback<void()> click_handler,
const gfx::VectorIcon& icon,
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/elements/ui_element.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/transform.h"
namespace vr {
......@@ -15,7 +15,7 @@ namespace vr {
// This class is the root of all viewport aware elements. It calcuates the
// yaw rotation which all elements need to apply to be visible in current
// viewport.
class VR_EXPORT ViewportAwareRoot : public UiElement {
class VR_UI_EXPORT ViewportAwareRoot : public UiElement {
public:
static const float kViewportRotationTriggerDegrees;
......
......@@ -6,12 +6,12 @@
#define CHROME_BROWSER_VR_INPUT_EVENT_H_
#include "base/time/time.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/geometry/point_f.h"
namespace vr {
class VR_EXPORT InputEvent {
class VR_UI_EXPORT InputEvent {
public:
enum Type {
kTypeUndefined = -1,
......
......@@ -6,12 +6,12 @@
#define CHROME_BROWSER_VR_MODEL_COLOR_SCHEME_H_
#include "base/version.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace vr {
struct ButtonColors {
struct VR_UI_EXPORT ButtonColors {
bool operator==(const ButtonColors& other) const;
bool operator!=(const ButtonColors& other) const;
......@@ -25,7 +25,7 @@ struct ButtonColors {
SkColor foreground_disabled = SK_ColorBLACK;
};
struct TextSelectionColors {
struct VR_UI_EXPORT TextSelectionColors {
bool operator==(const TextSelectionColors& other) const;
bool operator!=(const TextSelectionColors& other) const;
SkColor cursor = SK_ColorBLACK;
......@@ -33,7 +33,7 @@ struct TextSelectionColors {
SkColor foreground = SK_ColorBLACK;
};
struct VR_EXPORT ColorScheme {
struct VR_UI_EXPORT ColorScheme {
enum Mode : int {
kModeNormal = 0,
kModeFullscreen,
......
......@@ -22,12 +22,12 @@
#include "chrome/browser/vr/model/ui_mode.h"
#include "chrome/browser/vr/model/web_vr_model.h"
#include "chrome/browser/vr/ui_element_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/transform.h"
namespace vr {
struct VR_EXPORT Model {
struct VR_UI_EXPORT Model {
Model();
~Model();
......
......@@ -7,7 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/vr/renderers/base_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace gfx {
class Transform;
......@@ -20,7 +20,7 @@ class BaseQuadRenderer : public BaseRenderer {
BaseQuadRenderer(const char* vertex_src, const char* fragment_src);
~BaseQuadRenderer() override;
VR_EXPORT static void CreateBuffers();
VR_UI_EXPORT static void CreateBuffers();
static int NumQuadIndices();
protected:
......
......@@ -7,12 +7,12 @@
#include "base/macros.h"
#include "chrome/browser/vr/renderers/base_quad_renderer.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
// Renders a page-generated stereo VR view.
class VR_EXPORT WebVrRenderer : public BaseQuadRenderer {
class VR_UI_EXPORT WebVrRenderer : public BaseQuadRenderer {
public:
WebVrRenderer();
~WebVrRenderer() override;
......
......@@ -8,11 +8,11 @@
#include <set>
#include "base/time/time.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
namespace vr {
struct VR_EXPORT Transition {
struct VR_UI_EXPORT Transition {
Transition();
~Transition();
......
......@@ -9,7 +9,7 @@
#include <vector>
#include "base/time/time.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/geometry/point3_f.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/vector3d_f.h"
......@@ -29,7 +29,7 @@ using InputEventList = std::vector<std::unique_ptr<InputEvent>>;
// Based on controller input finds the hit UI element and determines the
// interaction with UI elements and the web contents.
class VR_EXPORT UiInputManager {
class VR_UI_EXPORT UiInputManager {
public:
enum ButtonState {
UP, // The button is released.
......
......@@ -7,7 +7,7 @@
#include "chrome/browser/vr/model/camera_model.h"
#include "chrome/browser/vr/ui_input_manager.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/transform.h"
......@@ -27,7 +27,7 @@ struct RenderInfo {
};
// Renders a UI scene.
class VR_EXPORT UiRenderer {
class VR_UI_EXPORT UiRenderer {
public:
UiRenderer(UiScene* scene, UiElementRenderer* ui_element_renderer);
~UiRenderer();
......
......@@ -14,7 +14,7 @@
#include "chrome/browser/vr/elements/ui_element_name.h"
#include "chrome/browser/vr/keyboard_delegate.h"
#include "chrome/browser/vr/sequence.h"
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
namespace base {
......@@ -29,7 +29,7 @@ namespace vr {
class UiElement;
class VR_EXPORT UiScene {
class VR_UI_EXPORT UiScene {
public:
typedef base::RepeatingCallback<void()> PerFrameCallback;
......
......@@ -8,7 +8,7 @@
#include <array>
#include <string>
#include "chrome/browser/vr/vr_export.h"
#include "chrome/browser/vr/vr_ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gl/gl_bindings.h"
......@@ -29,8 +29,8 @@ namespace vr {
std::array<float, 16> MatrixToGLArray(const gfx::Transform& matrix);
VR_EXPORT gfx::Rect CalculatePixelSpaceRect(const gfx::Size& texture_size,
const gfx::RectF& texture_rect);
VR_UI_EXPORT gfx::Rect CalculatePixelSpaceRect(const gfx::Size& texture_size,
const gfx::RectF& texture_rect);
// Compile a shader.
GLuint CompileShader(GLenum shader_type,
......@@ -44,9 +44,9 @@ GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
// Returns the normalized size of the element projected into screen space.
// If (1, 1) the element fills the entire buffer.
VR_EXPORT gfx::SizeF CalculateScreenSize(const gfx::Transform& proj_matrix,
float distance,
const gfx::SizeF& size);
VR_UI_EXPORT gfx::SizeF CalculateScreenSize(const gfx::Transform& proj_matrix,
float distance,
const gfx::SizeF& size);
// Sets default texture parameters given a texture type.
void SetTexParameters(GLenum texture_type);
......
// Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_VR_VR_UI_EXPORT_H_
#define CHROME_BROWSER_VR_VR_UI_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(VR_UI_IMPLEMENTATION)
#define VR_UI_EXPORT __declspec(dllexport)
#else
#define VR_UI_EXPORT __declspec(dllimport)
#endif // defined(VR_UI_IMPLEMENTATION)
#else // defined(WIN32)
#if defined(VR_UI_IMPLEMENTATION)
#define VR_UI_EXPORT __attribute__((visibility("default")))
#else
#define VR_UI_EXPORT
#endif // defined(VR_UI_IMPLEMENTATION)
#endif
#else // defined(COMPONENT_BUILD)
#define VR_UI_EXPORT
#endif
#endif // CHROME_BROWSER_VR_VR_UI_EXPORT_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment