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

Side by Side Diff: components/mus/public/cpp/lib/scoped_view_ptr.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
« no previous file with comments | « components/mus/public/cpp/lib/args.cc ('k') | components/mus/public/cpp/lib/view.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 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/public/cpp/scoped_view_ptr.h" 5 #include "components/mus/public/cpp/scoped_view_ptr.h"
6 6
7 #include "components/mus/public/cpp/view.h" 7 #include "components/mus/public/cpp/view.h"
8 #include "components/mus/public/cpp/view_observer.h" 8 #include "components/mus/public/cpp/view_observer.h"
9 #include "components/mus/public/cpp/view_tree_connection.h" 9 #include "components/mus/public/cpp/view_tree_connection.h"
10 10
11 namespace mojo { 11 namespace mus {
12 12
13 ScopedViewPtr::ScopedViewPtr(View* view) : view_(view) { 13 ScopedViewPtr::ScopedViewPtr(View* view) : view_(view) {
14 view_->AddObserver(this); 14 view_->AddObserver(this);
15 } 15 }
16 16
17 ScopedViewPtr::~ScopedViewPtr() { 17 ScopedViewPtr::~ScopedViewPtr() {
18 if (view_) 18 if (view_)
19 DeleteViewOrViewManager(view_); 19 DeleteViewOrViewManager(view_);
20 DetachFromView(); 20 DetachFromView();
21 } 21 }
(...skipping 12 matching lines...) Expand all
34 34
35 view_->RemoveObserver(this); 35 view_->RemoveObserver(this);
36 view_ = nullptr; 36 view_ = nullptr;
37 } 37 }
38 38
39 void ScopedViewPtr::OnViewDestroying(View* view) { 39 void ScopedViewPtr::OnViewDestroying(View* view) {
40 DCHECK_EQ(view_, view); 40 DCHECK_EQ(view_, view);
41 DetachFromView(); 41 DetachFromView();
42 } 42 }
43 43
44 } // namespace mojo 44 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/args.cc ('k') | components/mus/public/cpp/lib/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698