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

Side by Side Diff: components/mus/server_view_drawn_tracker.cc

Issue 1340983002: Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "components/mus/server_view_drawn_tracker.h" 5 #include "components/mus/server_view_drawn_tracker.h"
6 6
7 #include "components/mus/server_view.h" 7 #include "components/mus/server_view.h"
8 #include "components/mus/server_view_drawn_tracker_observer.h" 8 #include "components/mus/server_view_drawn_tracker_observer.h"
9 9
10 namespace view_manager { 10 namespace mus {
11 11
12 ServerViewDrawnTracker::ServerViewDrawnTracker( 12 ServerViewDrawnTracker::ServerViewDrawnTracker(
13 ServerView* view, 13 ServerView* view,
14 ServerViewDrawnTrackerObserver* observer) 14 ServerViewDrawnTrackerObserver* observer)
15 : view_(view), observer_(observer), drawn_(view->IsDrawn()) { 15 : view_(view), observer_(observer), drawn_(view->IsDrawn()) {
16 AddObservers(); 16 AddObservers();
17 } 17 }
18 18
19 ServerViewDrawnTracker::~ServerViewDrawnTracker() { 19 ServerViewDrawnTracker::~ServerViewDrawnTracker() {
20 RemoveObservers(); 20 RemoveObservers();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 AddObservers(); 62 AddObservers();
63 const bool is_drawn = view_->IsDrawn(); 63 const bool is_drawn = view_->IsDrawn();
64 SetDrawn(is_drawn ? nullptr : old_parent, is_drawn); 64 SetDrawn(is_drawn ? nullptr : old_parent, is_drawn);
65 } 65 }
66 66
67 void ServerViewDrawnTracker::OnViewVisibilityChanged(ServerView* view) { 67 void ServerViewDrawnTracker::OnViewVisibilityChanged(ServerView* view) {
68 const bool is_drawn = view_->IsDrawn(); 68 const bool is_drawn = view_->IsDrawn();
69 SetDrawn(is_drawn ? nullptr : view->parent(), is_drawn); 69 SetDrawn(is_drawn ? nullptr : view->parent(), is_drawn);
70 } 70 }
71 71
72 } // namespace view_manager 72 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/server_view_drawn_tracker.h ('k') | components/mus/server_view_drawn_tracker_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698