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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2910773002: cros: CustomFrameViewAsh avatar icon from a window prop (Closed)
Patch Set: add test Created 3 years, 6 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
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/session/session_state_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits>
9 #include <utility> 10 #include <utility>
10 11
11 #include "ash/drag_drop/drag_image_view.h" 12 #include "ash/drag_drop/drag_image_view.h"
12 #include "ash/mus/accelerators/accelerator_handler.h" 13 #include "ash/mus/accelerators/accelerator_handler.h"
13 #include "ash/mus/accelerators/accelerator_ids.h" 14 #include "ash/mus/accelerators/accelerator_ids.h"
14 #include "ash/mus/bridge/shell_port_mash.h" 15 #include "ash/mus/bridge/shell_port_mash.h"
15 #include "ash/mus/move_event_handler.h" 16 #include "ash/mus/move_event_handler.h"
16 #include "ash/mus/non_client_frame_controller.h" 17 #include "ash/mus/non_client_frame_controller.h"
17 #include "ash/mus/property_util.h" 18 #include "ash/mus/property_util.h"
18 #include "ash/mus/screen_mus.h" 19 #include "ash/mus/screen_mus.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 RootWindowController::RootWindowType::PRIMARY); 223 RootWindowController::RootWindowType::PRIMARY);
223 } 224 }
224 225
225 void WindowManager::CreateShell( 226 void WindowManager::CreateShell(
226 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { 227 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {
227 DCHECK(!created_shell_); 228 DCHECK(!created_shell_);
228 created_shell_ = true; 229 created_shell_ = true;
229 ShellInitParams init_params; 230 ShellInitParams init_params;
230 ShellPortMash* shell_port = 231 ShellPortMash* shell_port =
231 new ShellPortMash(window_tree_host ? window_tree_host->window() : nullptr, 232 new ShellPortMash(window_tree_host ? window_tree_host->window() : nullptr,
232 this, pointer_watcher_event_router_.get(), 233 this, pointer_watcher_event_router_.get());
233 create_session_state_delegate_stub_for_test_);
234 // Shell::CreateInstance() takes ownership of ShellDelegate. 234 // Shell::CreateInstance() takes ownership of ShellDelegate.
235 init_params.delegate = shell_delegate_ ? shell_delegate_.release() 235 init_params.delegate = shell_delegate_ ? shell_delegate_.release()
236 : new ShellDelegateMus(connector_); 236 : new ShellDelegateMus(connector_);
237 init_params.primary_window_tree_host = window_tree_host.release(); 237 init_params.primary_window_tree_host = window_tree_host.release();
238 init_params.shell_port = shell_port; 238 init_params.shell_port = shell_port;
239 init_params.blocking_pool = blocking_pool_.get(); 239 init_params.blocking_pool = blocking_pool_.get();
240 Shell::CreateInstance(init_params); 240 Shell::CreateInstance(init_params);
241 } 241 }
242 242
243 void WindowManager::CreateAndRegisterRootWindowController( 243 void WindowManager::CreateAndRegisterRootWindowController(
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool WindowManager::IsWindowActive(aura::Window* window) { 577 bool WindowManager::IsWindowActive(aura::Window* window) {
578 return Shell::Get()->activation_client()->GetActiveWindow() == window; 578 return Shell::Get()->activation_client()->GetActiveWindow() == window;
579 } 579 }
580 580
581 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 581 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
582 Shell::Get()->activation_client()->DeactivateWindow(window); 582 Shell::Get()->activation_client()->DeactivateWindow(window);
583 } 583 }
584 584
585 } // namespace mus 585 } // namespace mus
586 } // namespace ash 586 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/session/session_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698