OLD | NEW |
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_CACA_CACA_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_CACA_CACA_WINDOW_H_ |
6 #define UI_OZONE_PLATFORM_CACA_CACA_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_CACA_CACA_WINDOW_H_ |
7 | 7 |
8 #include <caca.h> | 8 #include <caca.h> |
9 | 9 |
10 #include "base/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 void OnCacaQuit(); | 40 void OnCacaQuit(); |
41 void OnCacaResize(); | 41 void OnCacaResize(); |
42 void OnCacaEvent(ui::Event* event); | 42 void OnCacaEvent(ui::Event* event); |
43 | 43 |
44 // This is the Caca canvas size. | 44 // This is the Caca canvas size. |
45 gfx::Size physical_size() const { return physical_size_; } | 45 gfx::Size physical_size() const { return physical_size_; } |
46 gfx::Size bitmap_size() const { return bitmap_size_; } | 46 gfx::Size bitmap_size() const { return bitmap_size_; } |
47 caca_display_t* display() const { return display_.get(); } | 47 caca_display_t* display() const { return display_.get(); } |
48 | 48 |
49 // PlatformWindow: | 49 // PlatformWindow: |
50 virtual gfx::Rect GetBounds() OVERRIDE; | 50 virtual gfx::Rect GetBounds() override; |
51 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 51 virtual void SetBounds(const gfx::Rect& bounds) override; |
52 virtual void Show() OVERRIDE; | 52 virtual void Show() override; |
53 virtual void Hide() OVERRIDE; | 53 virtual void Hide() override; |
54 virtual void Close() OVERRIDE; | 54 virtual void Close() override; |
55 virtual void SetCapture() OVERRIDE; | 55 virtual void SetCapture() override; |
56 virtual void ReleaseCapture() OVERRIDE; | 56 virtual void ReleaseCapture() override; |
57 virtual void ToggleFullscreen() OVERRIDE; | 57 virtual void ToggleFullscreen() override; |
58 virtual void Maximize() OVERRIDE; | 58 virtual void Maximize() override; |
59 virtual void Minimize() OVERRIDE; | 59 virtual void Minimize() override; |
60 virtual void Restore() OVERRIDE; | 60 virtual void Restore() override; |
61 virtual void SetCursor(PlatformCursor cursor) OVERRIDE; | 61 virtual void SetCursor(PlatformCursor cursor) override; |
62 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 62 virtual void MoveCursorTo(const gfx::Point& location) override; |
63 | 63 |
64 // PlatformEventDispatcher: | 64 // PlatformEventDispatcher: |
65 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; | 65 virtual bool CanDispatchEvent(const PlatformEvent& event) override; |
66 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; | 66 virtual uint32_t DispatchEvent(const PlatformEvent& event) override; |
67 | 67 |
68 private: | 68 private: |
69 // Event polling. | 69 // Event polling. |
70 void TryProcessingEvent(); | 70 void TryProcessingEvent(); |
71 | 71 |
72 // Sync sizes with libcaca. | 72 // Sync sizes with libcaca. |
73 void UpdateDisplaySize(); | 73 void UpdateDisplaySize(); |
74 | 74 |
75 PlatformWindowDelegate* delegate_; | 75 PlatformWindowDelegate* delegate_; |
76 CacaWindowManager* manager_; | 76 CacaWindowManager* manager_; |
(...skipping 11 matching lines...) Expand all Loading... |
88 gfx::Size bitmap_size_; | 88 gfx::Size bitmap_size_; |
89 | 89 |
90 base::WeakPtrFactory<CacaWindow> weak_ptr_factory_; | 90 base::WeakPtrFactory<CacaWindow> weak_ptr_factory_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(CacaWindow); | 92 DISALLOW_COPY_AND_ASSIGN(CacaWindow); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace ui | 95 } // namespace ui |
96 | 96 |
97 #endif // UI_OZONE_PLATFORM_CACA_CACA_WINDOW_H_ | 97 #endif // UI_OZONE_PLATFORM_CACA_CACA_WINDOW_H_ |
OLD | NEW |