| OLD | NEW |
| 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 #include "chrome/browser/ui/aura/native_window_tracker_aura.h" | 5 #include "chrome/browser/ui/aura/native_window_tracker_aura.h" |
| 6 | 6 |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 | 8 |
| 9 NativeWindowTrackerAura::NativeWindowTrackerAura( | 9 NativeWindowTrackerAura::NativeWindowTrackerAura( |
| 10 gfx::NativeWindow window) | 10 gfx::NativeWindow window) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 return window_ == nullptr; | 21 return window_ == nullptr; |
| 22 } | 22 } |
| 23 | 23 |
| 24 void NativeWindowTrackerAura::OnWindowDestroying( | 24 void NativeWindowTrackerAura::OnWindowDestroying( |
| 25 aura::Window* window) { | 25 aura::Window* window) { |
| 26 window_->RemoveObserver(this); | 26 window_->RemoveObserver(this); |
| 27 window_ = nullptr; | 27 window_ = nullptr; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // static | 30 // static |
| 31 scoped_ptr<NativeWindowTracker> NativeWindowTracker::Create( | 31 std::unique_ptr<NativeWindowTracker> NativeWindowTracker::Create( |
| 32 gfx::NativeWindow window) { | 32 gfx::NativeWindow window) { |
| 33 return scoped_ptr<NativeWindowTracker>(new NativeWindowTrackerAura(window)); | 33 return std::unique_ptr<NativeWindowTracker>( |
| 34 new NativeWindowTrackerAura(window)); |
| 34 } | 35 } |
| OLD | NEW |