Skip to content

Commit

Permalink
Declare //ui template instantiations so that all know about it
Browse files Browse the repository at this point in the history
There were code in ui/views that didn't know about the class
property type specialization for gfx::Insets* and Views* so they
got the default template implementation.

In jumbo builds the compiler noticed that there was code
using the default implementation before the specialization
appeared and it triggered a compilation error.

The fix is to declare the specialization so that all code uses it.

Bug: 773275
Change-Id: Ifa925a2002ba930af16dc6940a04b2a480721438
Reviewed-on: https://chromium-review.googlesource.com/786190
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521803}
  • Loading branch information
bratell-at-opera authored and Commit Bot committed Dec 5, 2017
1 parent b34b6d3 commit 0e33dbf
Show file tree
Hide file tree
Showing 49 changed files with 135 additions and 102 deletions.
2 changes: 1 addition & 1 deletion ash/disconnected_app_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::DisconnectedAppHandler*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::DisconnectedAppHandler*);

namespace ash {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion ash/display/display_configuration_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "ui/display/display_layout.h"
#include "ui/display/manager/display_manager.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::ScreenRotationAnimator*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::ScreenRotationAnimator*);

namespace {

Expand Down
2 changes: 1 addition & 1 deletion ash/frame/detached_title_area_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ui/views/widget/native_widget_aura.h"
#include "ui/views/widget/widget.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::DetachedTitleAreaRendererForClient*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::DetachedTitleAreaRendererForClient*);

namespace ash {
namespace {
Expand Down
8 changes: 4 additions & 4 deletions ash/public/cpp/window_properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include "ash/public/interfaces/window_pin_type.mojom.h"
#include "ash/public/interfaces/window_state_type.mojom.h"

DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_PUBLIC_EXPORT,
ash::mojom::WindowPinType)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_PUBLIC_EXPORT,
ash::mojom::WindowStateType)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_PUBLIC_EXPORT,
ash::mojom::WindowPinType)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_PUBLIC_EXPORT,
ash::mojom::WindowStateType)

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/root_window_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ui/base/class_property.h"
#include "ui/display/types/display_constants.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::RootWindowSettings*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::RootWindowSettings*);

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/test/ui_controls_factory_ash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "ui/base/test/ui_controls_aura.h"
#include "ui/display/screen.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ui_controls::UIControlsAura*)
DEFINE_UI_CLASS_PROPERTY_TYPE(ui_controls::UIControlsAura*)

namespace ash {
namespace test {
Expand Down
2 changes: 1 addition & 1 deletion ash/touch/touch_uma.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(WindowTouchDetails,
NULL);
}

DECLARE_UI_CLASS_PROPERTY_TYPE(WindowTouchDetails*);
DEFINE_UI_CLASS_PROPERTY_TYPE(WindowTouchDetails*);

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/wm/move_event_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "ui/base/hit_test.h"
#include "ui/events/event.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::MoveEventHandler*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::MoveEventHandler*);

namespace {

Expand Down
2 changes: 1 addition & 1 deletion ash/wm/non_client_frame_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "ui/views/widget/widget.h"
#include "ui/wm/core/coordinate_conversion.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::NonClientFrameController*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::NonClientFrameController*);

namespace ash {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions ash/wm/window_properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "ash/wm/window_state.h"
#include "ui/gfx/geometry/rect.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::wm::WindowState*);
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_EXPORT, ash::WidgetCreationType);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::wm::WindowState*);
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(ASH_EXPORT, ash::WidgetCreationType);

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/wm/workspace/workspace_event_handler_mash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(ash::WorkspaceEventHandlerMash*);
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::WorkspaceEventHandlerMash*);

namespace {

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/theme_profile_key.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(Profile*);
DEFINE_UI_CLASS_PROPERTY_TYPE(Profile*);

namespace {

Expand Down
2 changes: 1 addition & 1 deletion components/exo/surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "ui/gfx/transform_util.h"
#include "ui/views/widget/widget.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(exo::Surface*);
DEFINE_UI_CLASS_PROPERTY_TYPE(exo::Surface*);

namespace exo {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion components/exo/wayland/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
#include "ui/events/keycodes/scoped_xkb.h" // nogncheck
#endif

DECLARE_UI_CLASS_PROPERTY_TYPE(wl_resource*);
DEFINE_UI_CLASS_PROPERTY_TYPE(wl_resource*);

namespace exo {
namespace wayland {
Expand Down
2 changes: 1 addition & 1 deletion ui/accessibility/platform/aura_window_properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "ui/base/class_property.h"

DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AX_EXPORT, AXRole)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AX_EXPORT, AXRole)

namespace ui {

Expand Down
36 changes: 18 additions & 18 deletions ui/aura/client/aura_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
#include "ui/base/class_property.h"
#include "ui/gfx/geometry/rect.h"

DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, bool)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, base::TimeDelta)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, base::string16*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::ModalType)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::ImageSkia*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::Rect*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::Size*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, std::string*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::WindowShowState)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::mojom::WindowType);
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, void*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, SkColor)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, int32_t)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, int64_t)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT,
aura::client::WindowEmbedType)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, aura::client::FocusClient*)
DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, aura::Window*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, bool)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, base::TimeDelta)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, base::string16*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::ModalType)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::ImageSkia*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::Rect*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, gfx::Size*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, std::string*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::WindowShowState)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, ui::mojom::WindowType);
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, void*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, SkColor)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, int32_t)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, int64_t)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT,
aura::client::WindowEmbedType)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, aura::client::FocusClient*)
DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(AURA_EXPORT, aura::Window*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/capture_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::CaptureClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::CaptureClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/cursor_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::CursorClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::CursorClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/drag_drop_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::DragDropClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::DragDropClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/drag_drop_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::DragDropDelegate*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::DragDropDelegate*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/event_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::EventClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::EventClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/focus_change_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::FocusChangeObserver*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::FocusChangeObserver*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/screen_position_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ui/base/class_property.h"
#include "ui/gfx/geometry/point_conversions.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::ScreenPositionClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::ScreenPositionClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/visibility_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::VisibilityClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::VisibilityClient*)

namespace aura {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion ui/aura/client/window_parenting_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/class_property.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::client::WindowParentingClient*)
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::client::WindowParentingClient*)

namespace aura {
namespace client {
Expand Down
10 changes: 5 additions & 5 deletions ui/aura/mus/property_converter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

// See aura_constants.cc for bool, int32_t, int64_t, std::string, gfx::Rect,
// base::string16, uint32_t (via SkColor), and gfx::ImageSkia.
DECLARE_UI_CLASS_PROPERTY_TYPE(uint8_t)
DECLARE_UI_CLASS_PROPERTY_TYPE(uint16_t)
DECLARE_UI_CLASS_PROPERTY_TYPE(uint64_t)
DECLARE_UI_CLASS_PROPERTY_TYPE(int8_t)
DECLARE_UI_CLASS_PROPERTY_TYPE(int16_t)
DEFINE_UI_CLASS_PROPERTY_TYPE(uint8_t)
DEFINE_UI_CLASS_PROPERTY_TYPE(uint16_t)
DEFINE_UI_CLASS_PROPERTY_TYPE(uint64_t)
DEFINE_UI_CLASS_PROPERTY_TYPE(int8_t)
DEFINE_UI_CLASS_PROPERTY_TYPE(int16_t)

namespace aura {

Expand Down
2 changes: 1 addition & 1 deletion ui/aura/mus/window_tree_host_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ui/events/event.h"
#include "ui/platform_window/stub/stub_window.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(aura::WindowTreeHostMus*);
DEFINE_UI_CLASS_PROPERTY_TYPE(aura::WindowTreeHostMus*);

namespace aura {

Expand Down
4 changes: 2 additions & 2 deletions ui/aura/window_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/skia_util.h"

DECLARE_UI_CLASS_PROPERTY_TYPE(const char*)
DEFINE_UI_CLASS_PROPERTY_TYPE(const char*)

namespace {

Expand Down Expand Up @@ -109,7 +109,7 @@ DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(DeletionTestProperty,

} // namespace

DECLARE_UI_CLASS_PROPERTY_TYPE(DeletionTestProperty*);
DEFINE_UI_CLASS_PROPERTY_TYPE(DeletionTestProperty*);

namespace aura {
namespace test {
Expand Down
Loading

0 comments on commit 0e33dbf

Please sign in to comment.