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

Side by Side Diff: ash/shelf/shelf_util.cc

Issue 1996563002: Add ImeMenuTray element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change SetWindowState() with SetImeWindow(). Created 4 years, 5 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/shelf/shelf_util.h" 5 #include "ash/shelf/shelf_util.h"
6 6
7 #include "ash/common/shelf/shelf_constants.h" 7 #include "ash/common/shelf/shelf_constants.h"
8 #include "ui/aura/window_property.h" 8 #include "ui/aura/window_property.h"
9 9
10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*); 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*);
11 11
12 namespace ash { 12 namespace ash {
13 13
14 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID); 14 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID);
15 15
16 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window 16 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window
17 // and will be freed automatically. 17 // and will be freed automatically.
18 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails, kShelfItemDetailsKey, NULL); 18 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails, kShelfItemDetailsKey, NULL);
19 19
20 DEFINE_WINDOW_PROPERTY_KEY(bool, kShelfItemOnTrayForImeMenu, false);
21
20 void SetShelfIDForWindow(ShelfID id, aura::Window* window) { 22 void SetShelfIDForWindow(ShelfID id, aura::Window* window) {
21 if (!window) 23 if (!window)
22 return; 24 return;
23 25
24 window->SetProperty(kShelfID, id); 26 window->SetProperty(kShelfID, id);
25 } 27 }
26 28
27 ShelfID GetShelfIDForWindow(const aura::Window* window) { 29 ShelfID GetShelfIDForWindow(const aura::Window* window) {
28 DCHECK(window); 30 DCHECK(window);
29 return window->GetProperty(kShelfID); 31 return window->GetProperty(kShelfID);
(...skipping 19 matching lines...) Expand all
49 51
50 void ClearShelfItemDetailsForWindow(aura::Window* window) { 52 void ClearShelfItemDetailsForWindow(aura::Window* window) {
51 window->ClearProperty(kShelfItemDetailsKey); 53 window->ClearProperty(kShelfItemDetailsKey);
52 } 54 }
53 55
54 const ShelfItemDetails* GetShelfItemDetailsForWindow(aura::Window* window) { 56 const ShelfItemDetails* GetShelfItemDetailsForWindow(aura::Window* window) {
55 return window->GetProperty(kShelfItemDetailsKey); 57 return window->GetProperty(kShelfItemDetailsKey);
56 } 58 }
57 59
58 } // namespace ash 60 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698