Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "ui/views/mus/window_manager_connection.h" | 5 #include "ui/views/mus/window_manager_connection.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 void WindowManagerConnection::Create(mojo::Connector* connector) { | 34 void WindowManagerConnection::Create(mojo::Connector* connector) { |
| 35 DCHECK(!lazy_tls_ptr.Pointer()->Get()); | 35 DCHECK(!lazy_tls_ptr.Pointer()->Get()); |
| 36 lazy_tls_ptr.Pointer()->Set(new WindowManagerConnection(connector)); | 36 lazy_tls_ptr.Pointer()->Set(new WindowManagerConnection(connector)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 WindowManagerConnection* WindowManagerConnection::Get() { | 40 WindowManagerConnection* WindowManagerConnection::Get() { |
| 41 WindowManagerConnection* connection = lazy_tls_ptr.Pointer()->Get(); | 41 WindowManagerConnection* connection = lazy_tls_ptr.Pointer()->Get(); |
| 42 DCHECK(connection); | 42 // DCHECK(connection); |
|
sky
2016/03/16 15:24:01
Did you intend to comment this out?
| |
| 43 return connection; | 43 return connection; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 void WindowManagerConnection::Reset() { | 47 void WindowManagerConnection::Reset() { |
| 48 delete Get(); | 48 delete Get(); |
| 49 lazy_tls_ptr.Pointer()->Set(nullptr); | 49 lazy_tls_ptr.Pointer()->Set(nullptr); |
| 50 } | 50 } |
| 51 | 51 |
| 52 mus::Window* WindowManagerConnection::NewWindow( | 52 mus::Window* WindowManagerConnection::NewWindow( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 | 88 |
| 89 void WindowManagerConnection::OnConnectionLost( | 89 void WindowManagerConnection::OnConnectionLost( |
| 90 mus::WindowTreeConnection* connection) {} | 90 mus::WindowTreeConnection* connection) {} |
| 91 | 91 |
| 92 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { | 92 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { |
| 93 if (window_tree_connection_) | 93 if (window_tree_connection_) |
| 94 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); | 94 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace views | 97 } // namespace views |
| OLD | NEW |