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

Side by Side Diff: ash/test/ui_controls_factory_ash.cc

Issue 2632543003: Refactor and push window properties up to class properties. (Closed)
Patch Set: More build fixes 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/wm/root_window_finder.h" 5 #include "ash/common/wm/root_window_finder.h"
6 #include "ash/common/wm_window.h" 6 #include "ash/common/wm_window.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_properties.h" 8 #include "ash/wm/window_properties.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
11 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
12 #include "ui/aura/test/ui_controls_factory_aura.h" 12 #include "ui/aura/test/ui_controls_factory_aura.h"
13 #include "ui/aura/window_property.h"
14 #include "ui/aura/window_tree_host.h" 13 #include "ui/aura/window_tree_host.h"
14 #include "ui/base/class_property.h"
15 #include "ui/base/test/ui_controls.h" 15 #include "ui/base/test/ui_controls.h"
16 #include "ui/base/test/ui_controls_aura.h" 16 #include "ui/base/test/ui_controls_aura.h"
17 #include "ui/display/screen.h" 17 #include "ui/display/screen.h"
18 18
19 DECLARE_WINDOW_PROPERTY_TYPE(ui_controls::UIControlsAura*) 19 DECLARE_UI_CLASS_PROPERTY_TYPE(ui_controls::UIControlsAura*)
20 20
21 namespace ash { 21 namespace ash {
22 namespace test { 22 namespace test {
23 namespace { 23 namespace {
24 24
25 using ui_controls::UIControlsAura; 25 using ui_controls::UIControlsAura;
26 using ui_controls::MouseButton; 26 using ui_controls::MouseButton;
27 27
28 DEFINE_OWNED_WINDOW_PROPERTY_KEY(UIControlsAura, kUIControlsKey, NULL); 28 DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(UIControlsAura, kUIControlsKey, NULL);
29 29
30 // Returns the UIControls object for RootWindow. 30 // Returns the UIControls object for RootWindow.
31 // kUIControlsKey is owned property and UIControls object 31 // kUIControlsKey is owned property and UIControls object
32 // will be deleted when the root window is deleted. 32 // will be deleted when the root window is deleted.
33 UIControlsAura* GetUIControlsForRootWindow(aura::Window* root_window) { 33 UIControlsAura* GetUIControlsForRootWindow(aura::Window* root_window) {
34 UIControlsAura* native_ui_control = root_window->GetProperty(kUIControlsKey); 34 UIControlsAura* native_ui_control = root_window->GetProperty(kUIControlsKey);
35 if (!native_ui_control) { 35 if (!native_ui_control) {
36 native_ui_control = 36 native_ui_control =
37 aura::test::CreateUIControlsAura(root_window->GetHost()); 37 aura::test::CreateUIControlsAura(root_window->GetHost());
38 // Pass the ownership to the |root_window|. 38 // Pass the ownership to the |root_window|.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 private: 128 private:
129 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); 129 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh);
130 }; 130 };
131 131
132 ui_controls::UIControlsAura* CreateAshUIControls() { 132 ui_controls::UIControlsAura* CreateAshUIControls() {
133 return new ash::test::UIControlsAsh(); 133 return new ash::test::UIControlsAsh();
134 } 134 }
135 135
136 } // namespace test 136 } // namespace test
137 } // namespace ash 137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_settings.cc ('k') | ash/touch/touch_uma.cc » ('j') | ui/base/class_property.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698