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

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2652043004: Remove persisted docked windows (Closed)
Patch Set: varkha's comments Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/desktop_window_tree_host_mus.h" 5 #include "ui/views/mus/desktop_window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // The cursor-client can be accessed during WindowTreeHostMus tear-down. So 195 // The cursor-client can be accessed during WindowTreeHostMus tear-down. So
196 // the cursor-client needs to be unset on the root-window before 196 // the cursor-client needs to be unset on the root-window before
197 // |cursor_manager_| is destroyed. 197 // |cursor_manager_| is destroyed.
198 aura::client::SetCursorClient(window(), nullptr); 198 aura::client::SetCursorClient(window(), nullptr);
199 native_widget_delegate_->AsWidget()->RemoveObserver(this); 199 native_widget_delegate_->AsWidget()->RemoveObserver(this);
200 MusClient::Get()->RemoveObserver(this); 200 MusClient::Get()->RemoveObserver(this);
201 aura::Env::GetInstance()->RemoveObserver(this); 201 aura::Env::GetInstance()->RemoveObserver(this);
202 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this); 202 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
203 } 203 }
204 204
205 // TODO(afakhry): Remove Docked Windows in M58.
205 bool DesktopWindowTreeHostMus::IsDocked() const { 206 bool DesktopWindowTreeHostMus::IsDocked() const {
206 return window()->GetProperty(aura::client::kShowStateKey) == 207 return window()->GetProperty(aura::client::kShowStateKey) ==
207 ui::SHOW_STATE_DOCKED; 208 ui::SHOW_STATE_DOCKED;
208 } 209 }
209 210
210 void DesktopWindowTreeHostMus::SendClientAreaToServer() { 211 void DesktopWindowTreeHostMus::SendClientAreaToServer() {
211 if (!ShouldSendClientAreaToServer()) 212 if (!ShouldSendClientAreaToServer())
212 return; 213 return;
213 214
214 NonClientView* non_client_view = 215 NonClientView* non_client_view =
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 349
349 DestroyCompositor(); 350 DestroyCompositor();
350 desktop_native_widget_aura_->OnHostClosed(); 351 desktop_native_widget_aura_->OnHostClosed();
351 } 352 }
352 353
353 aura::WindowTreeHost* DesktopWindowTreeHostMus::AsWindowTreeHost() { 354 aura::WindowTreeHost* DesktopWindowTreeHostMus::AsWindowTreeHost() {
354 return this; 355 return this;
355 } 356 }
356 357
357 void DesktopWindowTreeHostMus::ShowWindowWithState(ui::WindowShowState state) { 358 void DesktopWindowTreeHostMus::ShowWindowWithState(ui::WindowShowState state) {
359 // TODO(afakhry): Remove Docked Windows in M58.
358 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN || 360 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN ||
359 state == ui::SHOW_STATE_DOCKED) { 361 state == ui::SHOW_STATE_DOCKED) {
360 window()->SetProperty(aura::client::kShowStateKey, state); 362 window()->SetProperty(aura::client::kShowStateKey, state);
361 } 363 }
362 window()->Show(); 364 window()->Show();
363 if (compositor()) 365 if (compositor())
364 compositor()->SetVisible(true); 366 compositor()->SetVisible(true);
365 367
366 native_widget_delegate_->OnNativeWidgetVisibilityChanged(true); 368 native_widget_delegate_->OnNativeWidgetVisibilityChanged(true);
367 369
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 aura::client::FocusClient* focus_client, 734 aura::client::FocusClient* focus_client,
733 aura::Window* window) { 735 aura::Window* window) {
734 if (window == this->window()) { 736 if (window == this->window()) {
735 desktop_native_widget_aura_->HandleActivationChanged(true); 737 desktop_native_widget_aura_->HandleActivationChanged(true);
736 } else if (is_active_) { 738 } else if (is_active_) {
737 desktop_native_widget_aura_->HandleActivationChanged(false); 739 desktop_native_widget_aura_->HandleActivationChanged(false);
738 } 740 }
739 } 741 }
740 742
741 } // namespace views 743 } // namespace views
OLDNEW
« no previous file with comments | « components/sessions/core/session_service_commands.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698