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

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

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) 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/top_level_window_factory.cc ('k') | ash/screen_util.cc » ('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 <limits>
10 #include <utility> 10 #include <utility>
(...skipping 15 matching lines...) Expand all
26 #include "ash/public/cpp/window_properties.h" 26 #include "ash/public/cpp/window_properties.h"
27 #include "ash/public/interfaces/window_pin_type.mojom.h" 27 #include "ash/public/interfaces/window_pin_type.mojom.h"
28 #include "ash/root_window_controller.h" 28 #include "ash/root_window_controller.h"
29 #include "ash/root_window_settings.h" 29 #include "ash/root_window_settings.h"
30 #include "ash/session/session_controller.h" 30 #include "ash/session/session_controller.h"
31 #include "ash/shell.h" 31 #include "ash/shell.h"
32 #include "ash/shell_init_params.h" 32 #include "ash/shell_init_params.h"
33 #include "ash/wm/ash_focus_rules.h" 33 #include "ash/wm/ash_focus_rules.h"
34 #include "ash/wm/container_finder.h" 34 #include "ash/wm/container_finder.h"
35 #include "ash/wm/window_state.h" 35 #include "ash/wm/window_state.h"
36 #include "ash/wm_window.h"
37 #include "base/memory/ptr_util.h" 36 #include "base/memory/ptr_util.h"
38 #include "base/threading/sequenced_worker_pool.h" 37 #include "base/threading/sequenced_worker_pool.h"
39 #include "services/service_manager/public/cpp/connector.h" 38 #include "services/service_manager/public/cpp/connector.h"
40 #include "services/ui/common/accelerator_util.h" 39 #include "services/ui/common/accelerator_util.h"
41 #include "services/ui/common/types.h" 40 #include "services/ui/common/types.h"
42 #include "services/ui/public/cpp/input_devices/input_device_client.h" 41 #include "services/ui/public/cpp/input_devices/input_device_client.h"
43 #include "services/ui/public/cpp/property_type_converters.h" 42 #include "services/ui/public/cpp/property_type_converters.h"
44 #include "services/ui/public/interfaces/constants.mojom.h" 43 #include "services/ui/public/interfaces/constants.mojom.h"
45 #include "services/ui/public/interfaces/window_manager.mojom.h" 44 #include "services/ui/public/interfaces/window_manager.mojom.h"
46 #include "ui/aura/client/aura_constants.h" 45 #include "ui/aura/client/aura_constants.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 CreateShell(nullptr); 345 CreateShell(nullptr);
347 if (show_primary_host_on_connect_) 346 if (show_primary_host_on_connect_)
348 Shell::GetPrimaryRootWindow()->GetHost()->Show(); 347 Shell::GetPrimaryRootWindow()->GetHost()->Show();
349 InstallFrameDecorationValues(); 348 InstallFrameDecorationValues();
350 } 349 }
351 350
352 void WindowManager::OnWmSetBounds(aura::Window* window, 351 void WindowManager::OnWmSetBounds(aura::Window* window,
353 const gfx::Rect& bounds) { 352 const gfx::Rect& bounds) {
354 // TODO(sky): this indirectly sets bounds, which is against what 353 // TODO(sky): this indirectly sets bounds, which is against what
355 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this. 354 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
356 WmWindow::Get(window)->SetBounds(bounds); 355 window->SetBounds(bounds);
357 } 356 }
358 357
359 bool WindowManager::OnWmSetProperty( 358 bool WindowManager::OnWmSetProperty(
360 aura::Window* window, 359 aura::Window* window,
361 const std::string& name, 360 const std::string& name,
362 std::unique_ptr<std::vector<uint8_t>>* new_data) { 361 std::unique_ptr<std::vector<uint8_t>>* new_data) {
363 if (property_converter_->IsTransportNameRegistered(name)) 362 if (property_converter_->IsTransportNameRegistered(name))
364 return true; 363 return true;
365 DVLOG(1) << "unknown property changed, ignoring " << name; 364 DVLOG(1) << "unknown property changed, ignoring " << name;
366 return false; 365 return false;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool WindowManager::IsWindowActive(aura::Window* window) { 576 bool WindowManager::IsWindowActive(aura::Window* window) {
578 return Shell::Get()->activation_client()->GetActiveWindow() == window; 577 return Shell::Get()->activation_client()->GetActiveWindow() == window;
579 } 578 }
580 579
581 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 580 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
582 Shell::Get()->activation_client()->DeactivateWindow(window); 581 Shell::Get()->activation_client()->DeactivateWindow(window);
583 } 582 }
584 583
585 } // namespace mus 584 } // namespace mus
586 } // namespace ash 585 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/top_level_window_factory.cc ('k') | ash/screen_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698