| Index: ash/monitor/multi_monitor_manager_unittest.cc
|
| diff --git a/ash/monitor/multi_monitor_manager_unittest.cc b/ash/monitor/multi_monitor_manager_unittest.cc
|
| index afd0013721c5746a872d01b880a6cbbf58f5d549..12f3489b4e96b7549504de9cc717c48bf632eec2 100644
|
| --- a/ash/monitor/multi_monitor_manager_unittest.cc
|
| +++ b/ash/monitor/multi_monitor_manager_unittest.cc
|
| @@ -11,22 +11,23 @@
|
| #include "base/string_split.h"
|
| #include "base/stringprintf.h"
|
| #include "ui/aura/env.h"
|
| -#include "ui/aura/monitor.h"
|
| +#include "ui/aura/monitor_aura.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/window_observer.h"
|
| +#include "ui/gfx/monitor_observer.h"
|
|
|
| namespace ash {
|
| namespace test {
|
|
|
| using std::vector;
|
| using std::string;
|
| -using aura::Monitor;
|
| +using aura::MonitorAura;
|
|
|
| namespace {
|
|
|
| -vector<const aura::Monitor*> CreateMonitorsFromString(
|
| +vector<const MonitorAura*> CreateMonitorsFromString(
|
| const std::string specs) {
|
| - vector<const aura::Monitor*> monitors;
|
| + vector<const MonitorAura*> monitors;
|
| vector<string> parts;
|
| base::SplitString(specs, ',', &parts);
|
| for (vector<string>::const_iterator iter = parts.begin();
|
| @@ -39,7 +40,7 @@ vector<const aura::Monitor*> CreateMonitorsFromString(
|
| } // namespace
|
|
|
| class MultiMonitorManagerTest : public test::AshTestBase,
|
| - public aura::MonitorObserver,
|
| + public gfx::MonitorObserver,
|
| public aura::WindowObserver {
|
| public:
|
| MultiMonitorManagerTest()
|
| @@ -62,8 +63,8 @@ class MultiMonitorManagerTest : public test::AshTestBase,
|
| aura::MonitorManager* monitor_manager() {
|
| return aura::Env::GetInstance()->monitor_manager();
|
| }
|
| - const vector<const Monitor*>& changed() const { return changed_; }
|
| - const vector<const Monitor*>& added() const { return added_; }
|
| + const vector<const MonitorAura*>& changed() const { return changed_; }
|
| + const vector<const MonitorAura*>& added() const { return added_; }
|
|
|
| string GetCountSummary() const {
|
| return StringPrintf("%"PRIuS" %"PRIuS" %"PRIuS,
|
| @@ -81,14 +82,14 @@ class MultiMonitorManagerTest : public test::AshTestBase,
|
| return root_window_destroyed_;
|
| }
|
|
|
| - // aura::MonitorObserver overrides:
|
| - virtual void OnMonitorBoundsChanged(const Monitor* monitor) OVERRIDE {
|
| - changed_.push_back(monitor);
|
| + // gfx::MonitorObserver overrides:
|
| + virtual void OnMonitorBoundsChanged(const gfx::Monitor* monitor) OVERRIDE {
|
| + changed_.push_back(static_cast<const MonitorAura*>(monitor));
|
| }
|
| - virtual void OnMonitorAdded(Monitor* new_monitor) OVERRIDE {
|
| - added_.push_back(new_monitor);
|
| + virtual void OnMonitorAdded(gfx::Monitor* new_monitor) OVERRIDE {
|
| + added_.push_back(static_cast<MonitorAura*>(new_monitor));
|
| }
|
| - virtual void OnMonitorRemoved(const Monitor* old_monitor) OVERRIDE {
|
| + virtual void OnMonitorRemoved(const gfx::Monitor* old_monitor) OVERRIDE {
|
| ++removed_count_;
|
| }
|
|
|
| @@ -99,14 +100,14 @@ class MultiMonitorManagerTest : public test::AshTestBase,
|
| }
|
|
|
| void UpdateMonitor(const std::string str) {
|
| - vector<const aura::Monitor*> monitors = CreateMonitorsFromString(str);
|
| + vector<const MonitorAura*> monitors = CreateMonitorsFromString(str);
|
| monitor_manager()->OnNativeMonitorsChanged(monitors);
|
| STLDeleteContainerPointers(monitors.begin(), monitors.end());
|
| }
|
|
|
| private:
|
| - vector<const Monitor*> changed_;
|
| - vector<const Monitor*> added_;
|
| + vector<const MonitorAura*> changed_;
|
| + vector<const MonitorAura*> added_;
|
| size_t removed_count_;
|
| bool root_window_destroyed_;
|
|
|
| @@ -157,7 +158,7 @@ TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
|
| reset();
|
|
|
| // # of monitor can go to zero when screen is off.
|
| - const vector<const Monitor*> empty;
|
| + const vector<const MonitorAura*> empty;
|
| monitor_manager()->OnNativeMonitorsChanged(empty);
|
| EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
|
| EXPECT_EQ("0 0 0", GetCountSummary());
|
|
|