Commit cd5a7400 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

views: make MusClient::screen() private

Only tests need access to it.

BUG=none
TEST=none

Change-Id: I968d84f1e677e00dfb181fa8140c72f265bc2aaa
Reviewed-on: https://chromium-review.googlesource.com/1161290Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580351}
parent f2124d1a
......@@ -22,6 +22,7 @@
#include "ui/events/event.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/mus/mus_client.h"
#include "ui/views/mus/mus_client_test_api.h"
#include "ui/views/mus/screen_mus.h"
#include "ui/views/mus/window_manager_frame_values.h"
#include "ui/views/test/views_test_base.h"
......@@ -402,7 +403,7 @@ TEST_F(DesktopWindowTreeHostMusTest, CreateFullscreenWidget) {
}
TEST_F(DesktopWindowTreeHostMusTest, GetWindowBoundsInScreen) {
ScreenMus* screen = MusClient::Get()->screen();
ScreenMus* screen = MusClientTestApi::screen();
// Add a second display to the right of the primary.
const int64_t kSecondDisplayId = 222;
......
......@@ -119,9 +119,6 @@ class VIEWS_MUS_EXPORT MusClient : public aura::WindowTreeClientDelegate,
AXRemoteHost* ax_remote_host() { return ax_remote_host_.get(); }
// Getter for type safety. Most code can use display::Screen::GetScreen().
ScreenMus* screen() { return screen_.get(); }
// Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
// set as the factory function used for creating NativeWidgets when a
// NativeWidget has not been explicitly set.
......
......@@ -9,6 +9,7 @@
#include <utility>
#include "base/macros.h"
#include "ui/views/mus/ax_remote_host.h"
#include "ui/views/mus/mus_client.h"
namespace views {
......@@ -21,6 +22,8 @@ class MusClientTestApi {
MusClient::Get()->ax_remote_host_ = std::move(client);
}
static ScreenMus* screen() { return MusClient::Get()->screen_.get(); }
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(MusClientTestApi);
};
......
......@@ -11,6 +11,7 @@
#include "ui/aura/test/mus/window_tree_client_private.h"
#include "ui/events/event.h"
#include "ui/views/mus/mus_client.h"
#include "ui/views/mus/mus_client_test_api.h"
#include "ui/views/mus/screen_mus.h"
#include "ui/views/pointer_watcher.h"
#include "ui/views/test/scoped_views_test_helper.h"
......@@ -250,7 +251,7 @@ TEST_F(PointerWatcherEventRouterTest, SecondaryDisplay) {
TestPointerWatcher watcher;
pointer_watcher_event_router->AddPointerWatcher(&watcher, false);
ScreenMus* screen = MusClient::Get()->screen();
ScreenMus* screen = MusClientTestApi::screen();
const uint64_t kFirstDisplayId = screen->GetPrimaryDisplay().id();
// The first display is at 0,0.
......
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