summaryrefslogtreecommitdiffstats
path: root/athena
diff options
context:
space:
mode:
authormfomitchev <mfomitchev@chromium.org>2014-11-03 14:36:30 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-03 22:36:59 +0000
commit235ca91afbcc146c1d188b5de0f1c6070d745a8f (patch)
tree2f038ea33364698e9ea3f3ec280297965138e8d9 /athena
parent7eeb04782399c0a2097e65b9055dead45b1b7caa (diff)
downloadchromium_src-235ca91afbcc146c1d188b5de0f1c6070d745a8f.zip
chromium_src-235ca91afbcc146c1d188b5de0f1c6070d745a8f.tar.gz
chromium_src-235ca91afbcc146c1d188b5de0f1c6070d745a8f.tar.bz2
Creating default implementation for aura::client::ScreenPositionClient
Making all implementations except for ash's use the new default base class. I left the ash's implementation as is, since I am not sure if the display origin is always the same as the root window origin. My suspicion is that it's not.. BUG=NONE Review URL: https://codereview.chromium.org/686513004 Cr-Commit-Position: refs/heads/master@{#302502}
Diffstat (limited to 'athena')
-rw-r--r--athena/screen/screen_manager_impl.cc25
1 files changed, 4 insertions, 21 deletions
diff --git a/athena/screen/screen_manager_impl.cc b/athena/screen/screen_manager_impl.cc
index bb33212..471df3b 100644
--- a/athena/screen/screen_manager_impl.cc
+++ b/athena/screen/screen_manager_impl.cc
@@ -22,6 +22,7 @@
#include "ui/gfx/screen.h"
#include "ui/wm/core/base_focus_rules.h"
#include "ui/wm/core/capture_controller.h"
+#include "ui/wm/core/default_screen_position_client.h"
#include "ui/wm/core/focus_controller.h"
#include "ui/wm/core/window_util.h"
@@ -120,7 +121,7 @@ class AthenaFocusRules : public wm::BaseFocusRules {
DISALLOW_COPY_AND_ASSIGN(AthenaFocusRules);
};
-class AthenaScreenPositionClient : public aura::client::ScreenPositionClient {
+class AthenaScreenPositionClient : public wm::DefaultScreenPositionClient {
public:
AthenaScreenPositionClient() {
}
@@ -128,30 +129,12 @@ class AthenaScreenPositionClient : public aura::client::ScreenPositionClient {
private:
// aura::client::ScreenPositionClient:
- virtual void ConvertPointToScreen(const aura::Window* window,
- gfx::Point* point) override {
- const aura::Window* root = window->GetRootWindow();
- aura::Window::ConvertPointToTarget(window, root, point);
- }
-
- virtual void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point) override {
- const aura::Window* root = window->GetRootWindow();
- aura::Window::ConvertPointToTarget(root, window, point);
- }
-
- virtual void ConvertHostPointToScreen(aura::Window* window,
- gfx::Point* point) override {
+ void ConvertHostPointToScreen(aura::Window* window,
+ gfx::Point* point) override {
// TODO(oshima): Implement this when adding multiple display support.
NOTREACHED();
}
- virtual void SetBounds(aura::Window* window,
- const gfx::Rect& bounds,
- const gfx::Display& display) override {
- window->SetBounds(bounds);
- }
-
DISALLOW_COPY_AND_ASSIGN(AthenaScreenPositionClient);
};