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

Side by Side Diff: ui/aura/window.h

Issue 2610203002: Removes aura::Window::set_user_data() (Closed)
Patch Set: 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 | « no previous file | ui/aura/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 (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_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // the Window is contained in a hierarchy that does not have a dispatcher at 128 // the Window is contained in a hierarchy that does not have a dispatcher at
129 // its root. 129 // its root.
130 Window* GetRootWindow(); 130 Window* GetRootWindow();
131 const Window* GetRootWindow() const; 131 const Window* GetRootWindow() const;
132 132
133 WindowTreeHost* GetHost(); 133 WindowTreeHost* GetHost();
134 const WindowTreeHost* GetHost() const; 134 const WindowTreeHost* GetHost() const;
135 void set_host(WindowTreeHost* host) { host_ = host; } 135 void set_host(WindowTreeHost* host) { host_ = host; }
136 bool IsRootWindow() const { return !!host_; } 136 bool IsRootWindow() const { return !!host_; }
137 137
138 // The Window does not own this object.
139 void set_user_data(void* user_data) { user_data_ = user_data; }
140 void* user_data() const { return user_data_; }
141
142 // Changes the visibility of the window. 138 // Changes the visibility of the window.
143 void Show(); 139 void Show();
144 void Hide(); 140 void Hide();
145 // Returns true if this window and all its ancestors are visible. 141 // Returns true if this window and all its ancestors are visible.
146 bool IsVisible() const; 142 bool IsVisible() const;
147 // Returns the visibility requested by this window. IsVisible() takes into 143 // Returns the visibility requested by this window. IsVisible() takes into
148 // account the visibility of the layer and ancestors, where as this tracks 144 // account the visibility of the layer and ancestors, where as this tracks
149 // whether Show() without a Hide() has been invoked. 145 // whether Show() without a Hide() has been invoked.
150 bool TargetVisibility() const { return visible_; } 146 bool TargetVisibility() const { return visible_; }
151 147
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 bool visible_; 496 bool visible_;
501 497
502 int id_; 498 int id_;
503 499
504 // Whether layer is initialized as non-opaque. 500 // Whether layer is initialized as non-opaque.
505 bool transparent_; 501 bool transparent_;
506 502
507 std::unique_ptr<LayoutManager> layout_manager_; 503 std::unique_ptr<LayoutManager> layout_manager_;
508 std::unique_ptr<ui::EventTargeter> targeter_; 504 std::unique_ptr<ui::EventTargeter> targeter_;
509 505
510 void* user_data_;
511
512 // Makes the window pass all events through to any windows behind it. 506 // Makes the window pass all events through to any windows behind it.
513 bool ignore_events_; 507 bool ignore_events_;
514 508
515 // See set_hit_test_bounds_override_inner(). 509 // See set_hit_test_bounds_override_inner().
516 gfx::Insets hit_test_bounds_override_inner_; 510 gfx::Insets hit_test_bounds_override_inner_;
517 511
518 base::ObserverList<WindowObserver, true> observers_; 512 base::ObserverList<WindowObserver, true> observers_;
519 513
520 // Value struct to keep the name and deallocator for this property. 514 // Value struct to keep the name and deallocator for this property.
521 // Key cannot be used for this purpose because it can be char* or 515 // Key cannot be used for this purpose because it can be char* or
522 // WindowProperty<>. 516 // WindowProperty<>.
523 struct Value { 517 struct Value {
524 const char* name; 518 const char* name;
525 int64_t value; 519 int64_t value;
526 PropertyDeallocator deallocator; 520 PropertyDeallocator deallocator;
527 }; 521 };
528 522
529 std::map<const void*, Value> prop_map_; 523 std::map<const void*, Value> prop_map_;
530 524
531 DISALLOW_COPY_AND_ASSIGN(Window); 525 DISALLOW_COPY_AND_ASSIGN(Window);
532 }; 526 };
533 527
534 } // namespace aura 528 } // namespace aura
535 529
536 #endif // UI_AURA_WINDOW_H_ 530 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698