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

Side by Side Diff: ui/wm/core/default_screen_position_client.h

Issue 686513004: Creating default implementation for aura::client::ScreenPositionClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turning GetOrigin() into an object method. Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « ui/wm/BUILD.gn ('k') | ui/wm/core/default_screen_position_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_POSITION_CLIENT_H_ 5 #ifndef UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_POSITION_CLIENT_H_ 6 #define UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_
7 7
8 #include "ui/aura/client/screen_position_client.h" 8 #include "ui/aura/client/screen_position_client.h"
9 #include "ui/views/views_export.h" 9 #include "ui/wm/wm_export.h"
10 10
11 namespace views { 11 namespace wm {
12 12
13 // Client that always offsets by the toplevel RootWindow of the passed 13 // Client that always offsets by the toplevel RootWindow of the passed
14 // in child NativeWidgetAura. 14 // in child NativeWidgetAura.
15 class VIEWS_EXPORT DesktopScreenPositionClient 15 class WM_EXPORT DefaultScreenPositionClient
16 : public aura::client::ScreenPositionClient { 16 : public aura::client::ScreenPositionClient {
17 public: 17 public:
18 explicit DesktopScreenPositionClient(aura::Window* root_window); 18 DefaultScreenPositionClient();
19 ~DesktopScreenPositionClient() override; 19 ~DefaultScreenPositionClient() override;
20 20
21 // aura::client::ScreenPositionClient overrides: 21 // aura::client::ScreenPositionClient overrides:
22 void ConvertPointToScreen(const aura::Window* window, 22 void ConvertPointToScreen(const aura::Window* window,
23 gfx::Point* point) override; 23 gfx::Point* point) override;
24 void ConvertPointFromScreen(const aura::Window* window, 24 void ConvertPointFromScreen(const aura::Window* window,
25 gfx::Point* point) override; 25 gfx::Point* point) override;
26 void ConvertHostPointToScreen(aura::Window* window, 26 void ConvertHostPointToScreen(aura::Window* window,
27 gfx::Point* point) override; 27 gfx::Point* point) override;
28 void SetBounds(aura::Window* window, 28 void SetBounds(aura::Window* window,
29 const gfx::Rect& bounds, 29 const gfx::Rect& bounds,
30 const gfx::Display& display) override; 30 const gfx::Display& display) override;
31 31
32 protected:
33 virtual gfx::Point GetOrigin(const aura::Window* root_window);
sadrul 2014/11/03 16:57:22 This doesn't need to be virtual? Add a comment ex
mfomitchev 2014/11/03 18:25:07 Nope, it doesn't. I thought subclasses may want to
sadrul 2014/11/03 18:48:43 Yep, sounds good.
34
32 private: 35 private:
33 aura::Window* root_window_; 36 DISALLOW_COPY_AND_ASSIGN(DefaultScreenPositionClient);
34
35 DISALLOW_COPY_AND_ASSIGN(DesktopScreenPositionClient);
36 }; 37 };
37 38
38 } // namespace views 39 } // namespace wm
39 40
40 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_POSITION_CLIENT_H_ 41 #endif // UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/wm/BUILD.gn ('k') | ui/wm/core/default_screen_position_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698