OLD | NEW |
1 // Copyright (c) 2012 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_ROOT_WINDOW_HOST_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_H_ |
6 #define UI_AURA_ROOT_WINDOW_HOST_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <vector> |
| 10 |
9 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
10 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
11 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
12 | 14 |
13 namespace gfx { | 15 namespace gfx { |
14 class Point; | 16 class Point; |
15 class Rect; | 17 class Rect; |
16 class Size; | 18 class Size; |
17 } | 19 } |
18 | 20 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Clips the cursor to the bounds of the root window until UnConfineCursor(). | 83 // Clips the cursor to the bounds of the root window until UnConfineCursor(). |
82 virtual bool ConfineCursorToRootWindow() = 0; | 84 virtual bool ConfineCursorToRootWindow() = 0; |
83 virtual void UnConfineCursor() = 0; | 85 virtual void UnConfineCursor() = 0; |
84 | 86 |
85 // Moves the cursor to the specified location relative to the root window. | 87 // Moves the cursor to the specified location relative to the root window. |
86 virtual void MoveCursorTo(const gfx::Point& location) = 0; | 88 virtual void MoveCursorTo(const gfx::Point& location) = 0; |
87 | 89 |
88 // Sets if the window should be focused when shown. | 90 // Sets if the window should be focused when shown. |
89 virtual void SetFocusWhenShown(bool focus_when_shown) = 0; | 91 virtual void SetFocusWhenShown(bool focus_when_shown) = 0; |
90 | 92 |
| 93 // Grabs the snapshot of the root window by using the platform-dependent APIs. |
| 94 virtual bool GrabSnapshot( |
| 95 const gfx::Rect& snapshot_bounds, |
| 96 std::vector<unsigned char>* png_representation) = 0; |
| 97 |
91 // Posts |native_event| to the platform's event queue. | 98 // Posts |native_event| to the platform's event queue. |
92 #if !defined(OS_MACOSX) | 99 #if !defined(OS_MACOSX) |
93 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; | 100 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; |
94 #endif | 101 #endif |
95 }; | 102 }; |
96 | 103 |
97 } // namespace aura | 104 } // namespace aura |
98 | 105 |
99 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ | 106 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ |
OLD | NEW |