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

Unified Diff: components/exo/wayland/server.cc

Issue 1926523002: Rename gfx::Display/Screen to display::Display/Screen in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo.gypi ('k') | components/metrics.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index fe88b960f2989362887b7ac1de8c3cb4770d3e7b..5ad216ab722a4b423be576ccefb8e14432552185 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -21,7 +21,6 @@
#include "ash/display/display_info.h"
#include "ash/display/display_manager.h"
-#include "ash/display/screen_ash.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/cancelable_callback.h"
@@ -47,8 +46,9 @@
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/aura/window_property.h"
#include "ui/base/hit_test.h"
+#include "ui/display/display_observer.h"
+#include "ui/display/screen.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
-#include "ui/gfx/display_observer.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
@@ -939,37 +939,37 @@ void bind_shell(wl_client* client, void* data, uint32_t version, uint32_t id) {
////////////////////////////////////////////////////////////////////////////////
// wl_output_interface:
-wl_output_transform OutputTransform(gfx::Display::Rotation rotation) {
+wl_output_transform OutputTransform(display::Display::Rotation rotation) {
switch (rotation) {
- case gfx::Display::ROTATE_0:
+ case display::Display::ROTATE_0:
return WL_OUTPUT_TRANSFORM_NORMAL;
- case gfx::Display::ROTATE_90:
+ case display::Display::ROTATE_90:
return WL_OUTPUT_TRANSFORM_90;
- case gfx::Display::ROTATE_180:
+ case display::Display::ROTATE_180:
return WL_OUTPUT_TRANSFORM_180;
- case gfx::Display::ROTATE_270:
+ case display::Display::ROTATE_270:
return WL_OUTPUT_TRANSFORM_270;
}
NOTREACHED();
return WL_OUTPUT_TRANSFORM_NORMAL;
}
-class WaylandDisplayObserver : public gfx::DisplayObserver {
+class WaylandDisplayObserver : public display::DisplayObserver {
public:
- WaylandDisplayObserver(const gfx::Display& display,
+ WaylandDisplayObserver(const display::Display& display,
wl_resource* output_resource)
: display_id_(display.id()), output_resource_(output_resource) {
- gfx::Screen::GetScreen()->AddObserver(this);
+ display::Screen::GetScreen()->AddObserver(this);
SendDisplayMetrics(display);
}
~WaylandDisplayObserver() override {
- gfx::Screen::GetScreen()->RemoveObserver(this);
+ display::Screen::GetScreen()->RemoveObserver(this);
}
- // Overridden from gfx::DisplayObserver:
- void OnDisplayAdded(const gfx::Display& new_display) override {}
- void OnDisplayRemoved(const gfx::Display& new_display) override {}
- void OnDisplayMetricsChanged(const gfx::Display& display,
+ // Overridden from display::DisplayObserver:
+ void OnDisplayAdded(const display::Display& new_display) override {}
+ void OnDisplayRemoved(const display::Display& new_display) override {}
+ void OnDisplayMetricsChanged(const display::Display& display,
uint32_t changed_metrics) override {
if (display.id() != display_id_)
return;
@@ -982,7 +982,7 @@ class WaylandDisplayObserver : public gfx::DisplayObserver {
}
private:
- void SendDisplayMetrics(const gfx::Display& display) {
+ void SendDisplayMetrics(const display::Display& display) {
const ash::DisplayInfo& info =
ash::Shell::GetInstance()->display_manager()->GetDisplayInfo(
display.id());
@@ -1031,9 +1031,9 @@ void bind_output(wl_client* client, void* data, uint32_t version, uint32_t id) {
client, &wl_output_interface, std::min(version, output_version), id);
// TODO(reveman): Multi-display support.
- const gfx::Display& display = ash::Shell::GetInstance()
- ->display_manager()
- ->GetPrimaryDisplayCandidate();
+ const display::Display& display = ash::Shell::GetInstance()
+ ->display_manager()
+ ->GetPrimaryDisplayCandidate();
SetImplementation(
resource, nullptr,
« no previous file with comments | « components/exo.gypi ('k') | components/metrics.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698