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

Side by Side Diff: ash/mus/bridge/workspace_event_handler_mus.cc

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: add overrides Created 4 years 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/bridge/workspace_event_handler_mus.h ('k') | ash/mus/disconnected_app_handler.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 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 "ash/mus/bridge/workspace_event_handler_mus.h" 5 #include "ash/mus/bridge/workspace_event_handler_mus.h"
6 6
7 #include "services/ui/public/cpp/window.h" 7 #include "ui/aura/window.h"
8 #include "services/ui/public/cpp/window_property.h" 8 #include "ui/aura/window_property.h"
9 9
10 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WorkspaceEventHandlerMus*); 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WorkspaceEventHandlerMus*);
11 11
12 namespace { 12 namespace {
13 13
14 MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(ash::mus::WorkspaceEventHandlerMus*, 14 DEFINE_WINDOW_PROPERTY_KEY(ash::mus::WorkspaceEventHandlerMus*,
15 kWorkspaceEventHandlerProperty, 15 kWorkspaceEventHandlerProperty,
16 nullptr); 16 nullptr);
17 17
18 } // namespace 18 } // namespace
19 19
20 namespace ash { 20 namespace ash {
21 namespace mus { 21 namespace mus {
22 22
23 WorkspaceEventHandlerMus::WorkspaceEventHandlerMus(ui::Window* workspace_window) 23 WorkspaceEventHandlerMus::WorkspaceEventHandlerMus(
24 aura::Window* workspace_window)
24 : workspace_window_(workspace_window) { 25 : workspace_window_(workspace_window) {
25 workspace_window_->SetLocalProperty(kWorkspaceEventHandlerProperty, this); 26 workspace_window_->SetProperty(kWorkspaceEventHandlerProperty, this);
26 } 27 }
27 28
28 WorkspaceEventHandlerMus::~WorkspaceEventHandlerMus() { 29 WorkspaceEventHandlerMus::~WorkspaceEventHandlerMus() {
29 workspace_window_->ClearLocalProperty(kWorkspaceEventHandlerProperty); 30 workspace_window_->ClearProperty(kWorkspaceEventHandlerProperty);
30 } 31 }
31 32
32 // static 33 // static
33 WorkspaceEventHandlerMus* WorkspaceEventHandlerMus::Get(ui::Window* window) { 34 WorkspaceEventHandlerMus* WorkspaceEventHandlerMus::Get(aura::Window* window) {
34 return window->GetLocalProperty(kWorkspaceEventHandlerProperty); 35 return window->GetProperty(kWorkspaceEventHandlerProperty);
35 } 36 }
36 37
37 } // namespace mus 38 } // namespace mus
38 } // namespace ash 39 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/workspace_event_handler_mus.h ('k') | ash/mus/disconnected_app_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698