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_PRIVATE_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_PRIVATE_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_PRIVATE_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_PRIVATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "mojo/public/cpp/bindings/array.h" | |
14 #include "services/ui/public/cpp/window.h" | 13 #include "services/ui/public/cpp/window.h" |
15 | 14 |
16 namespace ui { | 15 namespace ui { |
17 | 16 |
18 // This class is a friend of a Window and contains functions to mutate internal | 17 // This class is a friend of a Window and contains functions to mutate internal |
19 // state of Window. | 18 // state of Window. |
20 class WindowPrivate { | 19 class WindowPrivate { |
21 public: | 20 public: |
22 explicit WindowPrivate(Window* window); | 21 explicit WindowPrivate(Window* window); |
23 ~WindowPrivate(); | 22 ~WindowPrivate(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const std::vector<gfx::Rect>& additional_client_areas) { | 74 const std::vector<gfx::Rect>& additional_client_areas) { |
76 window_->LocalSetClientArea(client_area, additional_client_areas); | 75 window_->LocalSetClientArea(client_area, additional_client_areas); |
77 } | 76 } |
78 void LocalSetParentDrawn(bool drawn) { window_->LocalSetParentDrawn(drawn); } | 77 void LocalSetParentDrawn(bool drawn) { window_->LocalSetParentDrawn(drawn); } |
79 void LocalSetVisible(bool visible) { window_->LocalSetVisible(visible); } | 78 void LocalSetVisible(bool visible) { window_->LocalSetVisible(visible); } |
80 void LocalSetOpacity(float opacity) { window_->LocalSetOpacity(opacity); } | 79 void LocalSetOpacity(float opacity) { window_->LocalSetOpacity(opacity); } |
81 void LocalSetPredefinedCursor(mojom::Cursor cursor) { | 80 void LocalSetPredefinedCursor(mojom::Cursor cursor) { |
82 window_->LocalSetPredefinedCursor(cursor); | 81 window_->LocalSetPredefinedCursor(cursor); |
83 } | 82 } |
84 void LocalSetSharedProperty(const std::string& name, | 83 void LocalSetSharedProperty(const std::string& name, |
85 mojo::Array<uint8_t> new_data); | |
86 void LocalSetSharedProperty(const std::string& name, | |
87 const std::vector<uint8_t>* data) { | 84 const std::vector<uint8_t>* data) { |
88 window_->LocalSetSharedProperty(name, data); | 85 window_->LocalSetSharedProperty(name, data); |
89 } | 86 } |
90 void LocalSetSurfaceInfo(const cc::SurfaceInfo& surface_info) { | 87 void LocalSetSurfaceInfo(const cc::SurfaceInfo& surface_info) { |
91 window_->LocalSetSurfaceInfo(surface_info); | 88 window_->LocalSetSurfaceInfo(surface_info); |
92 } | 89 } |
93 | 90 |
94 void NotifyWindowStackingChanged() { window_->NotifyWindowStackingChanged(); } | 91 void NotifyWindowStackingChanged() { window_->NotifyWindowStackingChanged(); } |
95 | 92 |
96 private: | 93 private: |
97 Window* window_; | 94 Window* window_; |
98 | 95 |
99 DISALLOW_COPY_AND_ASSIGN(WindowPrivate); | 96 DISALLOW_COPY_AND_ASSIGN(WindowPrivate); |
100 }; | 97 }; |
101 | 98 |
102 } // namespace ui | 99 } // namespace ui |
103 | 100 |
104 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_PRIVATE_H_ | 101 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_PRIVATE_H_ |
OLD | NEW |