Exclude TrayIMETest.PerformActionOnDetailedView under valgrind, where it crashes.
[chromium-blink-merge.git] / ui / wm / core / default_screen_position_client.h
blobb27c91f2c19ffac4facbc38b62e0a0ff907857bb
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_
6 #define UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_
8 #include "ui/aura/client/screen_position_client.h"
9 #include "ui/wm/wm_export.h"
11 namespace wm {
13 // Client that always offsets by the toplevel RootWindow of the passed
14 // in child NativeWidgetAura.
15 class WM_EXPORT DefaultScreenPositionClient
16 : public aura::client::ScreenPositionClient {
17 public:
18 DefaultScreenPositionClient();
19 ~DefaultScreenPositionClient() override;
21 // aura::client::ScreenPositionClient overrides:
22 void ConvertPointToScreen(const aura::Window* window,
23 gfx::Point* point) override;
24 void ConvertPointFromScreen(const aura::Window* window,
25 gfx::Point* point) override;
26 void ConvertHostPointToScreen(aura::Window* window,
27 gfx::Point* point) override;
28 void SetBounds(aura::Window* window,
29 const gfx::Rect& bounds,
30 const gfx::Display& display) override;
32 protected:
33 // Returns the origin of the host platform-window in system pixel coordinates.
34 gfx::Point GetOriginInScreen(const aura::Window* root_window);
36 private:
37 DISALLOW_COPY_AND_ASSIGN(DefaultScreenPositionClient);
40 } // namespace wm
42 #endif // UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_