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

Side by Side Diff: ash/shell/window_watcher_shelf_item_delegate.cc

Issue 2502413005: Use aura::WindowProperty for title and name strings. (Closed)
Patch Set: Update comment Created 4 years, 1 month 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/display/window_tree_host_manager_unittest.cc ('k') | ash/touch/touch_uma.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 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/shell/window_watcher_shelf_item_delegate.h" 5 #include "ash/shell/window_watcher_shelf_item_delegate.h"
6 6
7 #include "ash/shell/window_watcher.h" 7 #include "ash/shell/window_watcher.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 10
(...skipping 14 matching lines...) Expand all
25 const ui::Event& event) { 25 const ui::Event& event) {
26 aura::Window* window = watcher_->GetWindowByID(id_); 26 aura::Window* window = watcher_->GetWindowByID(id_);
27 if (window->type() == ui::wm::WINDOW_TYPE_PANEL) 27 if (window->type() == ui::wm::WINDOW_TYPE_PANEL)
28 wm::MoveWindowToEventRoot(window, event); 28 wm::MoveWindowToEventRoot(window, event);
29 window->Show(); 29 window->Show();
30 wm::ActivateWindow(window); 30 wm::ActivateWindow(window);
31 return kExistingWindowActivated; 31 return kExistingWindowActivated;
32 } 32 }
33 33
34 base::string16 WindowWatcherShelfItemDelegate::GetTitle() { 34 base::string16 WindowWatcherShelfItemDelegate::GetTitle() {
35 return watcher_->GetWindowByID(id_)->title(); 35 return watcher_->GetWindowByID(id_)->GetTitle();
36 } 36 }
37 37
38 ShelfMenuModel* WindowWatcherShelfItemDelegate::CreateApplicationMenu( 38 ShelfMenuModel* WindowWatcherShelfItemDelegate::CreateApplicationMenu(
39 int event_flags) { 39 int event_flags) {
40 return nullptr; 40 return nullptr;
41 } 41 }
42 42
43 bool WindowWatcherShelfItemDelegate::IsDraggable() { 43 bool WindowWatcherShelfItemDelegate::IsDraggable() {
44 return true; 44 return true;
45 } 45 }
46 46
47 bool WindowWatcherShelfItemDelegate::CanPin() const { 47 bool WindowWatcherShelfItemDelegate::CanPin() const {
48 return true; 48 return true;
49 } 49 }
50 50
51 bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() { 51 bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() {
52 return true; 52 return true;
53 } 53 }
54 54
55 void WindowWatcherShelfItemDelegate::Close() {} 55 void WindowWatcherShelfItemDelegate::Close() {}
56 56
57 } // namespace shell 57 } // namespace shell
58 } // namespace ash 58 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | ash/touch/touch_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698