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

Side by Side Diff: mojo/services/view_manager/server_view.h

Issue 745743002: Makes views be initially hidden (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: feedback Created 6 years, 1 month 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
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 MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 void SetProperty(const std::string& name, const std::vector<uint8_t>* value); 69 void SetProperty(const std::string& name, const std::vector<uint8_t>* value);
70 70
71 // Returns true if this view is attached to |root| and all ancestors are 71 // Returns true if this view is attached to |root| and all ancestors are
72 // visible. 72 // visible.
73 bool IsDrawn(const ServerView* root) const; 73 bool IsDrawn(const ServerView* root) const;
74 74
75 void SetSurfaceId(cc::SurfaceId surface_id); 75 void SetSurfaceId(cc::SurfaceId surface_id);
76 const cc::SurfaceId surface_id() const { return surface_id_; } 76 const cc::SurfaceId surface_id() const { return surface_id_; }
77 77
78 #if !defined(NDEBUG)
79 std::string GetDebugWindowHierarchy() const;
80 void BuildDebugInfo(const std::string& depth, std::string* result) const;
81 #endif
82
78 private: 83 private:
79 typedef std::vector<ServerView*> Views; 84 typedef std::vector<ServerView*> Views;
80 85
81 // Implementation of removing a view. Doesn't send any notification. 86 // Implementation of removing a view. Doesn't send any notification.
82 void RemoveImpl(ServerView* view); 87 void RemoveImpl(ServerView* view);
83 88
84 ServerViewDelegate* delegate_; 89 ServerViewDelegate* delegate_;
85 const ViewId id_; 90 const ViewId id_;
86 ServerView* parent_; 91 ServerView* parent_;
87 Views children_; 92 Views children_;
88 bool visible_; 93 bool visible_;
89 gfx::Rect bounds_; 94 gfx::Rect bounds_;
90 cc::SurfaceId surface_id_; 95 cc::SurfaceId surface_id_;
91 float opacity_; 96 float opacity_;
92 97
93 std::map<std::string, std::vector<uint8_t>> properties_; 98 std::map<std::string, std::vector<uint8_t>> properties_;
94 99
95 DISALLOW_COPY_AND_ASSIGN(ServerView); 100 DISALLOW_COPY_AND_ASSIGN(ServerView);
96 }; 101 };
97 102
98 } // namespace service 103 } // namespace service
99 } // namespace mojo 104 } // namespace mojo
100 105
101 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ 106 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/connection_manager.cc ('k') | mojo/services/view_manager/server_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698