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

Side by Side Diff: components/view_manager/public/cpp/lib/view_private.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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 | « components/view_manager/animation_runner.h ('k') | components/view_manager/public/cpp/view.h » ('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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
7 7
8 #include "components/view_manager/public/cpp/view.h" 8 #include "components/view_manager/public/cpp/view.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 11
12 // This class is a friend of a View and contains functions to mutate internal 12 // This class is a friend of a View and contains functions to mutate internal
13 // state of View. 13 // state of View.
14 class ViewPrivate { 14 class ViewPrivate {
15 public: 15 public:
16 explicit ViewPrivate(View* view); 16 explicit ViewPrivate(View* view);
17 ~ViewPrivate(); 17 ~ViewPrivate();
18 18
19 // Creates and returns a new View. Caller owns the return value. 19 // Creates and returns a new View. Caller owns the return value.
20 static View* LocalCreate(); 20 static View* LocalCreate();
21 21
22 ObserverList<ViewObserver>* observers() { return &view_->observers_; } 22 base::ObserverList<ViewObserver>* observers() { return &view_->observers_; }
23 23
24 void ClearParent() { view_->parent_ = NULL; } 24 void ClearParent() { view_->parent_ = NULL; }
25 25
26 void set_visible(bool visible) { view_->visible_ = visible; } 26 void set_visible(bool visible) { view_->visible_ = visible; }
27 27
28 void set_drawn(bool drawn) { view_->drawn_ = drawn; } 28 void set_drawn(bool drawn) { view_->drawn_ = drawn; }
29 29
30 void set_id(Id id) { view_->id_ = id; } 30 void set_id(Id id) { view_->id_ = id; }
31 31
32 void set_view_manager(ViewManager* manager) { 32 void set_view_manager(ViewManager* manager) {
(...skipping 30 matching lines...) Expand all
63 63
64 private: 64 private:
65 View* view_; 65 View* view_;
66 66
67 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewPrivate); 67 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewPrivate);
68 }; 68 };
69 69
70 } // namespace mojo 70 } // namespace mojo
71 71
72 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 72 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
OLDNEW
« no previous file with comments | « components/view_manager/animation_runner.h ('k') | components/view_manager/public/cpp/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698