Chromium Code Reviews| 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 SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 // NOTE: callback is run synchronously if Embed() is not allowed on this | 224 // NOTE: callback is run synchronously if Embed() is not allowed on this |
| 225 // Window. | 225 // Window. |
| 226 void Embed(ui::mojom::WindowTreeClientPtr client, | 226 void Embed(ui::mojom::WindowTreeClientPtr client, |
| 227 const EmbedCallback& callback, | 227 const EmbedCallback& callback, |
| 228 uint32_t flags = 0); | 228 uint32_t flags = 0); |
| 229 | 229 |
| 230 // TODO(sky): this API is only applicable to the WindowManager. Move it | 230 // TODO(sky): this API is only applicable to the WindowManager. Move it |
| 231 // to a better place. | 231 // to a better place. |
| 232 void RequestClose(); | 232 void RequestClose(); |
| 233 | 233 |
| 234 // Starts an inter-process drag and drop operation. | 234 // Starts an inter-process drag and drop operation. When this finishes, will |
| 235 // return the tuple [success, action_taken] to |callback|. | |
|
sky
2016/09/20 21:42:03
Document what action_take corresponds to.
Elliot Glaysher
2016/09/20 22:05:25
Done.
| |
| 235 void PerformDragDrop( | 236 void PerformDragDrop( |
| 236 int drag_pointer, | 237 int drag_pointer, |
| 237 const std::map<std::string, std::vector<uint8_t>>& drag_data, | 238 const std::map<std::string, std::vector<uint8_t>>& drag_data, |
| 238 int drag_operation, | 239 int drag_operation, |
| 239 const gfx::Point& cursor_location, | 240 const gfx::Point& cursor_location, |
| 240 const SkBitmap& bitmap, | 241 const SkBitmap& bitmap, |
| 241 const base::Callback<void(bool)>& callback); | 242 const base::Callback<void(bool, uint32_t)>& callback); |
| 242 | 243 |
| 243 // Tells the window manager to take control of moving the window. Returns | 244 // Tells the window manager to take control of moving the window. Returns |
| 244 // true if the move wasn't canceled. | 245 // true if the move wasn't canceled. |
| 245 void PerformWindowMove(mojom::MoveLoopSource source, | 246 void PerformWindowMove(mojom::MoveLoopSource source, |
| 246 const gfx::Point& cursor_location, | 247 const gfx::Point& cursor_location, |
| 247 const base::Callback<void(bool)>& callback); | 248 const base::Callback<void(bool)>& callback); |
| 248 | 249 |
| 249 // Tells the window manager to abort any current move initiated by | 250 // Tells the window manager to abort any current move initiated by |
| 250 // PerformWindowMove(). | 251 // PerformWindowMove(). |
| 251 void CancelWindowMove(); | 252 void CancelWindowMove(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 }; | 384 }; |
| 384 | 385 |
| 385 std::map<const void*, Value> prop_map_; | 386 std::map<const void*, Value> prop_map_; |
| 386 | 387 |
| 387 DISALLOW_COPY_AND_ASSIGN(Window); | 388 DISALLOW_COPY_AND_ASSIGN(Window); |
| 388 }; | 389 }; |
| 389 | 390 |
| 390 } // namespace ui | 391 } // namespace ui |
| 391 | 392 |
| 392 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 393 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |