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

Side by Side Diff: services/ui/public/cpp/window.h

Issue 2610723002: Unify SurfaceInfo (Closed)
Patch Set: Cleanup offscreen canvas Created 3 years, 11 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
« no previous file with comments | « services/ui/public/cpp/surface_id_handler.h ('k') | services/ui/public/cpp/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 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
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "cc/surfaces/surface_info.h"
14 #include "mojo/public/cpp/bindings/array.h" 15 #include "mojo/public/cpp/bindings/array.h"
15 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" 16 #include "services/service_manager/public/interfaces/interface_provider.mojom.h"
16 #include "services/ui/common/types.h" 17 #include "services/ui/common/types.h"
17 #include "services/ui/public/cpp/surface_id_handler.h" 18 #include "services/ui/public/cpp/surface_id_handler.h"
18 #include "services/ui/public/cpp/window_compositor_frame_sink.h" 19 #include "services/ui/public/cpp/window_compositor_frame_sink.h"
19 #include "services/ui/public/interfaces/mus_constants.mojom.h" 20 #include "services/ui/public/interfaces/mus_constants.mojom.h"
20 #include "services/ui/public/interfaces/window_tree.mojom.h" 21 #include "services/ui/public/interfaces/window_tree.mojom.h"
21 #include "ui/gfx/geometry/insets.h" 22 #include "ui/gfx/geometry/insets.h"
22 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
23 24
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 void LocalSetClientArea( 313 void LocalSetClientArea(
313 const gfx::Insets& new_client_area, 314 const gfx::Insets& new_client_area,
314 const std::vector<gfx::Rect>& additional_client_areas); 315 const std::vector<gfx::Rect>& additional_client_areas);
315 void LocalSetParentDrawn(bool drawn); 316 void LocalSetParentDrawn(bool drawn);
316 void LocalSetDisplay(int64_t display_id); 317 void LocalSetDisplay(int64_t display_id);
317 void LocalSetVisible(bool visible); 318 void LocalSetVisible(bool visible);
318 void LocalSetOpacity(float opacity); 319 void LocalSetOpacity(float opacity);
319 void LocalSetPredefinedCursor(mojom::Cursor cursor_id); 320 void LocalSetPredefinedCursor(mojom::Cursor cursor_id);
320 void LocalSetSharedProperty(const std::string& name, 321 void LocalSetSharedProperty(const std::string& name,
321 const std::vector<uint8_t>* data); 322 const std::vector<uint8_t>* data);
322 void LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info); 323 void LocalSetSurfaceInfo(const cc::SurfaceInfo& surface_info);
323 324
324 // Notifies this winodw that its stacking position has changed. 325 // Notifies this winodw that its stacking position has changed.
325 void NotifyWindowStackingChanged(); 326 void NotifyWindowStackingChanged();
326 // Methods implementing visibility change notifications. See WindowObserver 327 // Methods implementing visibility change notifications. See WindowObserver
327 // for more details. 328 // for more details.
328 void NotifyWindowVisibilityChanged(Window* target, bool visible); 329 void NotifyWindowVisibilityChanged(Window* target, bool visible);
329 // Notifies this window's observers. Returns false if |this| was deleted 330 // Notifies this window's observers. Returns false if |this| was deleted
330 // during the call (by an observer), otherwise true. 331 // during the call (by an observer), otherwise true.
331 bool NotifyWindowVisibilityChangedAtReceiver(Window* target, bool visible); 332 bool NotifyWindowVisibilityChangedAtReceiver(Window* target, bool visible);
332 // Notifies this window and its child hierarchy. Returns false if |this| was 333 // Notifies this window and its child hierarchy. Returns false if |this| was
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Key cannot be used for this purpose because it can be char* or 399 // Key cannot be used for this purpose because it can be char* or
399 // WindowProperty<>. 400 // WindowProperty<>.
400 struct Value { 401 struct Value {
401 const char* name; 402 const char* name;
402 int64_t value; 403 int64_t value;
403 PropertyDeallocator deallocator; 404 PropertyDeallocator deallocator;
404 }; 405 };
405 406
406 std::map<const void*, Value> prop_map_; 407 std::map<const void*, Value> prop_map_;
407 408
408 std::unique_ptr<SurfaceInfo> surface_info_; 409 cc::SurfaceInfo surface_info_;
409 410
410 DISALLOW_COPY_AND_ASSIGN(Window); 411 DISALLOW_COPY_AND_ASSIGN(Window);
411 }; 412 };
412 413
413 } // namespace ui 414 } // namespace ui
414 415
415 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ 416 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/surface_id_handler.h ('k') | services/ui/public/cpp/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698