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

Side by Side Diff: services/ui/public/cpp/lib/scoped_window_ptr.cc

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/public/cpp/scoped_window_ptr.h" 5 #include "services/ui/public/cpp/scoped_window_ptr.h"
6 6
7 #include "components/mus/public/cpp/window.h" 7 #include "services/ui/public/cpp/window.h"
8 #include "components/mus/public/cpp/window_observer.h" 8 #include "services/ui/public/cpp/window_observer.h"
9 #include "components/mus/public/cpp/window_tree_client.h" 9 #include "services/ui/public/cpp/window_tree_client.h"
10 10
11 namespace mus { 11 namespace mus {
12 12
13 ScopedWindowPtr::ScopedWindowPtr(Window* window) : window_(window) { 13 ScopedWindowPtr::ScopedWindowPtr(Window* window) : window_(window) {
14 window_->AddObserver(this); 14 window_->AddObserver(this);
15 } 15 }
16 16
17 ScopedWindowPtr::~ScopedWindowPtr() { 17 ScopedWindowPtr::~ScopedWindowPtr() {
18 if (window_) 18 if (window_)
19 DeleteWindowOrWindowManager(window_); 19 DeleteWindowOrWindowManager(window_);
(...skipping 15 matching lines...) Expand all
35 window_->RemoveObserver(this); 35 window_->RemoveObserver(this);
36 window_ = nullptr; 36 window_ = nullptr;
37 } 37 }
38 38
39 void ScopedWindowPtr::OnWindowDestroying(Window* window) { 39 void ScopedWindowPtr::OnWindowDestroying(Window* window) {
40 DCHECK_EQ(window_, window); 40 DCHECK_EQ(window_, window);
41 DetachFromWindow(); 41 DetachFromWindow();
42 } 42 }
43 43
44 } // namespace mus 44 } // namespace mus
OLDNEW
« no previous file with comments | « services/ui/public/cpp/lib/property_type_converters.cc ('k') | services/ui/public/cpp/lib/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698