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

Side by Side Diff: ui/aura/test/test_screen.h

Issue 9696008: TestScreen shouldn't be marked aura export (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/test_screen.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_SCREEN_AURA_H_ 5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_
6 #define UI_AURA_SCREEN_AURA_H_ 6 #define UI_AURA_TEST_TEST_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/aura/aura_export.h"
11 #include "ui/gfx/insets.h" 10 #include "ui/gfx/insets.h"
12 #include "ui/gfx/screen.h" 11 #include "ui/gfx/screen.h"
13 12
14 namespace aura { 13 namespace aura {
15
16 class RootWindow; 14 class RootWindow;
17 15
18 // Aura implementation of gfx::Screen. Implemented here to avoid circular 16 // A minimal, testing Aura implementation of gfx::Screen.
19 // dependencies. 17 class TestScreen : public gfx::Screen {
20 class AURA_EXPORT ScreenAura : public gfx::Screen {
21 public: 18 public:
22 explicit ScreenAura(RootWindow* root_window); 19 explicit TestScreen(aura::RootWindow* root_window);
23 virtual ~ScreenAura(); 20 virtual ~TestScreen();
24
25 void set_work_area_insets(const gfx::Insets& insets) {
26 work_area_insets_ = insets;
27 }
28 const gfx::Insets& work_area_insets() const { return work_area_insets_; }
29 21
30 protected: 22 protected:
31 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; 23 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE;
32 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( 24 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl(
33 gfx::NativeView view) OVERRIDE; 25 gfx::NativeView view) OVERRIDE;
34 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( 26 virtual gfx::Rect GetMonitorAreaNearestWindowImpl(
35 gfx::NativeView view) OVERRIDE; 27 gfx::NativeView view) OVERRIDE;
36 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( 28 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl(
37 const gfx::Point& point) OVERRIDE; 29 const gfx::Point& point) OVERRIDE;
38 virtual gfx::Rect GetMonitorAreaNearestPointImpl( 30 virtual gfx::Rect GetMonitorAreaNearestPointImpl(
39 const gfx::Point& point) OVERRIDE; 31 const gfx::Point& point) OVERRIDE;
40 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; 32 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE;
41 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; 33 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE;
42 virtual int GetNumMonitorsImpl() OVERRIDE; 34 virtual int GetNumMonitorsImpl() OVERRIDE;
43 35
44 private: 36 private:
45 // We currently support only one monitor. These two methods return the bounds 37 // We currently support only one monitor. These two methods return the bounds
46 // and work area. 38 // and work area.
47 gfx::Rect GetBounds(); 39 gfx::Rect GetBounds();
48 gfx::Rect GetWorkAreaBounds();
49 40
50 // Insets for the work area. 41 aura::RootWindow* root_window_;
51 gfx::Insets work_area_insets_;
52 42
53 RootWindow* root_window_; 43 DISALLOW_COPY_AND_ASSIGN(TestScreen);
54
55 DISALLOW_COPY_AND_ASSIGN(ScreenAura);
56 }; 44 };
57 45
58 } // namespace aura 46 } // namespace aura
59 47
60 #endif // UI_AURA_SCREEN_AURA_H_ 48 #endif // UI_AURA_TEST_TEST_SCREEN_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698