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_REMOTE_ROOT_WINDOW_HOST_WIN_H_ | 5 #ifndef UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
6 #define UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ | 6 #define UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds, | 159 virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds, |
160 const gfx::Point& dest_offset, | 160 const gfx::Point& dest_offset, |
161 SkCanvas* canvas) OVERRIDE; | 161 SkCanvas* canvas) OVERRIDE; |
162 virtual bool GrabSnapshot( | 162 virtual bool GrabSnapshot( |
163 const gfx::Rect& snapshot_bounds, | 163 const gfx::Rect& snapshot_bounds, |
164 std::vector<unsigned char>* png_representation) OVERRIDE; | 164 std::vector<unsigned char>* png_representation) OVERRIDE; |
165 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | 165 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; |
166 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 166 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
167 virtual void PrepareForShutdown() OVERRIDE; | 167 virtual void PrepareForShutdown() OVERRIDE; |
168 | 168 |
| 169 // Helper function to dispatch a keyboard message to the desired target. |
| 170 // The default target is the RootWindowHostDelegate. For nested message loop |
| 171 // invocations we post a synthetic keyboard message directly into the message |
| 172 // loop. The dispatcher for the nested loop would then decide how this |
| 173 // message is routed. |
| 174 void DispatchKeyboardMessage(ui::EventType type, |
| 175 uint32 vkey, |
| 176 uint32 repeat_count, |
| 177 uint32 scan_code, |
| 178 uint32 flags, |
| 179 bool is_character); |
| 180 |
169 RootWindowHostDelegate* delegate_; | 181 RootWindowHostDelegate* delegate_; |
170 IPC::Sender* host_; | 182 IPC::Sender* host_; |
171 scoped_ptr<ui::ViewProp> prop_; | 183 scoped_ptr<ui::ViewProp> prop_; |
172 | 184 |
173 // Saved callbacks which inform the caller about the result of the open file/ | 185 // Saved callbacks which inform the caller about the result of the open file/ |
174 // save file operations. | 186 // save file operations. |
175 OpenFileCompletion file_open_completion_callback_; | 187 OpenFileCompletion file_open_completion_callback_; |
176 OpenMultipleFilesCompletion multi_file_open_completion_callback_; | 188 OpenMultipleFilesCompletion multi_file_open_completion_callback_; |
177 SaveFileCompletion file_saveas_completion_callback_; | 189 SaveFileCompletion file_saveas_completion_callback_; |
178 | 190 |
179 DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin); | 191 DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin); |
180 }; | 192 }; |
181 | 193 |
182 } // namespace aura | 194 } // namespace aura |
183 | 195 |
184 #endif // UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ | 196 #endif // UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ |
OLD | NEW |