| 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/native_widget_mus.h" | 5 #include "ui/views/mus/native_widget_mus.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 mojo::Connector* connector, | 241 mojo::Connector* connector, |
| 242 mus::Window* window, | 242 mus::Window* window, |
| 243 mus::mojom::SurfaceType surface_type) | 243 mus::mojom::SurfaceType surface_type) |
| 244 : window_(window), | 244 : window_(window), |
| 245 native_widget_delegate_(delegate), | 245 native_widget_delegate_(delegate), |
| 246 surface_type_(surface_type), | 246 surface_type_(surface_type), |
| 247 show_state_before_fullscreen_(ui::PLATFORM_WINDOW_STATE_UNKNOWN), | 247 show_state_before_fullscreen_(ui::PLATFORM_WINDOW_STATE_UNKNOWN), |
| 248 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), | 248 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), |
| 249 content_(new aura::Window(this)), | 249 content_(new aura::Window(this)), |
| 250 close_widget_factory_(this) { | 250 close_widget_factory_(this) { |
| 251 LOG(ERROR) << "JAMES new NativeWidgetMus"; |
| 251 mus_window_observer_.reset(new MusWindowObserver(this)); | 252 mus_window_observer_.reset(new MusWindowObserver(this)); |
| 252 | 253 |
| 253 // TODO(fsamuel): Figure out lifetime of |window_|. | 254 // TODO(fsamuel): Figure out lifetime of |window_|. |
| 254 aura::SetMusWindow(content_, window_); | 255 aura::SetMusWindow(content_, window_); |
| 255 | 256 |
| 256 window->SetLocalProperty(kNativeWidgetMusKey, this); | 257 window->SetLocalProperty(kNativeWidgetMusKey, this); |
| 257 // WindowTreeHost creates the compositor using the ContextFactory from | 258 // WindowTreeHost creates the compositor using the ContextFactory from |
| 258 // aura::Env. Install |context_factory_| there so that |context_factory_| is | 259 // aura::Env. Install |context_factory_| there so that |context_factory_| is |
| 259 // picked up. | 260 // picked up. |
| 260 ui::ContextFactory* default_context_factory = | 261 ui::ContextFactory* default_context_factory = |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 window_tree_host_->Show(); | 1003 window_tree_host_->Show(); |
| 1003 GetNativeWindow()->Show(); | 1004 GetNativeWindow()->Show(); |
| 1004 } else { | 1005 } else { |
| 1005 window_tree_host_->Hide(); | 1006 window_tree_host_->Hide(); |
| 1006 GetNativeWindow()->Hide(); | 1007 GetNativeWindow()->Hide(); |
| 1007 } | 1008 } |
| 1008 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); | 1009 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); |
| 1009 } | 1010 } |
| 1010 | 1011 |
| 1011 } // namespace views | 1012 } // namespace views |
| OLD | NEW |