summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-10 17:04:44 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-10 17:04:44 +0000
commit33190c88674bc70d431bafe9eba88cbe05652b60 (patch)
treeaab802f64f2b76ccb910a5c622045211bbffee4e /ui
parent6207714a83210aabc7f64af0a9e95378b1f05f37 (diff)
downloadchromium_src-33190c88674bc70d431bafe9eba88cbe05652b60.zip
chromium_src-33190c88674bc70d431bafe9eba88cbe05652b60.tar.gz
chromium_src-33190c88674bc70d431bafe9eba88cbe05652b60.tar.bz2
Move auto-hiding desktop bar computation from PanelManager to DisplaySettingsProvider
BUG=none TEST=existing tests due to no new functionality Review URL: https://chromiumcodereview.appspot.com/9689035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/work_area_watcher_observer.h26
-rw-r--r--ui/base/x/work_area_watcher_x.cc10
-rw-r--r--ui/base/x/work_area_watcher_x.h10
-rw-r--r--ui/base/x/work_area_watcher_x_observer.h23
-rw-r--r--ui/ui.gyp4
5 files changed, 38 insertions, 35 deletions
diff --git a/ui/base/work_area_watcher_observer.h b/ui/base/work_area_watcher_observer.h
new file mode 100644
index 0000000..dda2cf3
--- /dev/null
+++ b/ui/base/work_area_watcher_observer.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 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 UI_BASE_WORK_AREA_WATCHER_OBSERVER_H_
+#define UI_BASE_WORK_AREA_WATCHER_OBSERVER_H_
+#pragma once
+
+#include "ui/base/ui_export.h"
+
+namespace ui {
+
+// This interface should be implemented by classes that want to be notified
+// when the work area has changed due to something like screen resolution or
+// taskbar changes.
+class UI_EXPORT WorkAreaWatcherObserver {
+ public:
+ virtual void WorkAreaChanged() = 0;
+
+ protected:
+ virtual ~WorkAreaWatcherObserver() {}
+};
+
+} // namespace ui
+
+#endif // UI_BASE_WORK_AREA_WATCHER_OBSERVER_H_
diff --git a/ui/base/x/work_area_watcher_x.cc b/ui/base/x/work_area_watcher_x.cc
index 4fd98c9..0e2aaa2 100644
--- a/ui/base/x/work_area_watcher_x.cc
+++ b/ui/base/x/work_area_watcher_x.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
#include "ui/base/x/work_area_watcher_x.h"
+#include "ui/base/work_area_watcher_observer.h"
#include "ui/base/x/root_window_property_watcher_x.h"
-#include "ui/base/x/work_area_watcher_x_observer.h"
#include "ui/base/x/x11_util.h"
namespace ui {
@@ -18,14 +18,14 @@ WorkAreaWatcherX* WorkAreaWatcherX::GetInstance() {
}
// static
-void WorkAreaWatcherX::AddObserver(WorkAreaWatcherXObserver* observer) {
+void WorkAreaWatcherX::AddObserver(WorkAreaWatcherObserver* observer) {
// Ensure that RootWindowPropertyWatcherX exists.
internal::RootWindowPropertyWatcherX::GetInstance();
GetInstance()->observers_.AddObserver(observer);
}
// static
-void WorkAreaWatcherX::RemoveObserver(WorkAreaWatcherXObserver* observer) {
+void WorkAreaWatcherX::RemoveObserver(WorkAreaWatcherObserver* observer) {
GetInstance()->observers_.RemoveObserver(observer);
}
@@ -46,7 +46,7 @@ WorkAreaWatcherX::~WorkAreaWatcherX() {
}
void WorkAreaWatcherX::NotifyWorkAreaChanged() {
- FOR_EACH_OBSERVER(WorkAreaWatcherXObserver, observers_, WorkAreaChanged());
+ FOR_EACH_OBSERVER(WorkAreaWatcherObserver, observers_, WorkAreaChanged());
}
} // namespace ui
diff --git a/ui/base/x/work_area_watcher_x.h b/ui/base/x/work_area_watcher_x.h
index 22fcb76..6412693 100644
--- a/ui/base/x/work_area_watcher_x.h
+++ b/ui/base/x/work_area_watcher_x.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -14,7 +14,7 @@
namespace ui {
-class WorkAreaWatcherXObserver;
+class WorkAreaWatcherObserver;
namespace internal {
class RootWindowPropertyWatcherX;
@@ -25,8 +25,8 @@ class RootWindowPropertyWatcherX;
class UI_EXPORT WorkAreaWatcherX {
public:
static WorkAreaWatcherX* GetInstance();
- static void AddObserver(WorkAreaWatcherXObserver* observer);
- static void RemoveObserver(WorkAreaWatcherXObserver* observer);
+ static void AddObserver(WorkAreaWatcherObserver* observer);
+ static void RemoveObserver(WorkAreaWatcherObserver* observer);
private:
friend struct DefaultSingletonTraits<WorkAreaWatcherX>;
@@ -45,7 +45,7 @@ class UI_EXPORT WorkAreaWatcherX {
// Instance method that implements Notify().
void NotifyWorkAreaChanged();
- ObserverList<WorkAreaWatcherXObserver> observers_;
+ ObserverList<WorkAreaWatcherObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(WorkAreaWatcherX);
};
diff --git a/ui/base/x/work_area_watcher_x_observer.h b/ui/base/x/work_area_watcher_x_observer.h
deleted file mode 100644
index b0c562b..0000000
--- a/ui/base/x/work_area_watcher_x_observer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2011 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 UI_BASE_X_WORK_AREA_WATCHER_X_OBSERVER_H_
-#define UI_BASE_X_WORK_AREA_WATCHER_X_OBSERVER_H_
-#pragma once
-
-#include "ui/base/ui_export.h"
-
-namespace ui {
-
-class UI_EXPORT WorkAreaWatcherXObserver {
- public:
- virtual void WorkAreaChanged() = 0;
-
- protected:
- virtual ~WorkAreaWatcherXObserver() {}
-};
-
-} // namespace ui
-
-#endif // UI_BASE_X_WORK_AREA_WATCHER_X_OBSERVER_H_
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 3dc7f14..6606033 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -263,6 +263,7 @@
'base/win/singleton_hwnd.h',
'base/win/window_impl.cc',
'base/win/window_impl.h',
+ 'base/work_area_watcher_observer.h',
'base/x/active_window_watcher_x.cc',
'base/x/active_window_watcher_x.h',
'base/x/active_window_watcher_x_observer.h',
@@ -271,7 +272,6 @@
'base/x/root_window_property_watcher_x.h',
'base/x/work_area_watcher_x.cc',
'base/x/work_area_watcher_x.h',
- 'base/x/work_area_watcher_x_observer.h',
'base/x/x11_util.cc',
'base/x/x11_util.h',
'base/x/x11_util_internal.h',
@@ -417,6 +417,7 @@
['exclude', 'base/view_prop.h'],
['exclude', 'base/win/mouse_wheel_util.cc'],
['exclude', 'base/win/mouse_wheel_util.h'],
+ ['exclude', 'base/work_area_watcher_observer.h'],
['exclude', 'base/x/active_window_watcher_x.cc'],
['exclude', 'base/x/active_window_watcher_x.h'],
['exclude', 'base/x/active_window_watcher_x_observer.h'],
@@ -424,7 +425,6 @@
['exclude', 'base/x/root_window_property_watcher_x.h'],
['exclude', 'base/x/work_area_watcher_x.cc'],
['exclude', 'base/x/work_area_watcher_x.h'],
- ['exclude', 'base/x/work_area_watcher_x_observer.h'],
['exclude', 'ui_controls_win.cc'],
],
}, { # use_aura!=1