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

Side by Side Diff: ui/ozone/platform/test/test_window.h

Issue 419993003: Adds a do-nothing ozone platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds a do-nothing ozone platform when --ozone-dump-file is not specified (rebased) Created 6 years, 4 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/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/platform/test/test_window.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 2014 The Chromium Authors. All rights reserved. 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 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_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ 5 #ifndef UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_
6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ 6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "ui/events/platform/platform_event_dispatcher.h"
10 #include "ui/gfx/geometry/rect.h" 9 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
12 #include "ui/platform_window/platform_window.h" 11 #include "ui/platform_window/platform_window.h"
13 12
14 namespace ui { 13 namespace ui {
15 14
16 class PlatformWindowDelegate; 15 class PlatformWindowDelegate;
17 class TestWindowManager; 16 class TestWindowManager;
18 17
19 class TestWindow : public PlatformWindow, public PlatformEventDispatcher { 18 class TestWindow : public PlatformWindow {
20 public: 19 public:
21 TestWindow(PlatformWindowDelegate* delegate, 20 TestWindow(PlatformWindowDelegate* delegate,
22 TestWindowManager* manager, 21 TestWindowManager* manager,
23 const gfx::Rect& bounds); 22 const gfx::Rect& bounds);
24 virtual ~TestWindow(); 23 virtual ~TestWindow();
25 24
26 // Path for image file for this window. 25 // Path for image file for this window.
27 base::FilePath path(); 26 base::FilePath path();
28 27
29 // PlatformWindow: 28 // PlatformWindow:
30 virtual gfx::Rect GetBounds() OVERRIDE; 29 virtual gfx::Rect GetBounds() OVERRIDE;
31 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 30 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
32 virtual void Show() OVERRIDE; 31 virtual void Show() OVERRIDE;
33 virtual void Hide() OVERRIDE; 32 virtual void Hide() OVERRIDE;
34 virtual void Close() OVERRIDE; 33 virtual void Close() OVERRIDE;
35 virtual void SetCapture() OVERRIDE; 34 virtual void SetCapture() OVERRIDE;
36 virtual void ReleaseCapture() OVERRIDE; 35 virtual void ReleaseCapture() OVERRIDE;
37 virtual void ToggleFullscreen() OVERRIDE; 36 virtual void ToggleFullscreen() OVERRIDE;
38 virtual void Maximize() OVERRIDE; 37 virtual void Maximize() OVERRIDE;
39 virtual void Minimize() OVERRIDE; 38 virtual void Minimize() OVERRIDE;
40 virtual void Restore() OVERRIDE; 39 virtual void Restore() OVERRIDE;
41 virtual void SetCursor(PlatformCursor cursor) OVERRIDE; 40 virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
42 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 41 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
43 42
44 // PlatformEventDispatcher:
45 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
46 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
47
48 private: 43 private:
49 PlatformWindowDelegate* delegate_; 44 PlatformWindowDelegate* delegate_;
50 TestWindowManager* manager_; 45 TestWindowManager* manager_;
51 gfx::Rect bounds_; 46 gfx::Rect bounds_;
52 gfx::AcceleratedWidget widget_; 47 gfx::AcceleratedWidget widget_;
53 48
54 DISALLOW_COPY_AND_ASSIGN(TestWindow); 49 DISALLOW_COPY_AND_ASSIGN(TestWindow);
55 }; 50 };
56 51
57 } // namespace ui 52 } // namespace ui
58 53
59 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ 54 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/platform/test/test_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698