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

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

Issue 2285703003: Moves WorkspaceEventHandler to ash/common (Closed)
Patch Set: merge 2 trunk Created 4 years, 3 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/bridge/workspace_event_handler_mus.h ('k') | ash/mus/move_event_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/mus/bridge/workspace_event_handler_mus.h"
6
7 #include "services/ui/public/cpp/window.h"
8 #include "services/ui/public/cpp/window_property.h"
9
10 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WorkspaceEventHandlerMus*);
11
12 namespace {
13
14 MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(ash::mus::WorkspaceEventHandlerMus*,
15 kWorkspaceEventHandlerProperty,
16 nullptr);
17
18 } // namespace
19
20 namespace ash {
21 namespace mus {
22
23 WorkspaceEventHandlerMus::WorkspaceEventHandlerMus(ui::Window* workspace_window)
24 : workspace_window_(workspace_window) {
25 workspace_window_->SetLocalProperty(kWorkspaceEventHandlerProperty, this);
26 }
27
28 WorkspaceEventHandlerMus::~WorkspaceEventHandlerMus() {
29 workspace_window_->ClearLocalProperty(kWorkspaceEventHandlerProperty);
30 }
31
32 // static
33 WorkspaceEventHandlerMus* WorkspaceEventHandlerMus::Get(ui::Window* window) {
34 return window->GetLocalProperty(kWorkspaceEventHandlerProperty);
35 }
36
37 } // namespace mus
38 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/workspace_event_handler_mus.h ('k') | ash/mus/move_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698