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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shelf/shelf_model.h" 9 #include "ash/shelf/shelf_model.h"
10 #include "ash/shelf/wm_shelf.h" 10 #include "ash/shelf/wm_shelf.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/shell_port.h"
12 #include "ash/strings/grit/ash_strings.h" 13 #include "ash/strings/grit/ash_strings.h"
13 #include "ash/wallpaper/wallpaper_delegate.h" 14 #include "ash/wallpaper/wallpaper_delegate.h"
14 #include "ash/wm_shell.h"
15 #include "ash/wm_window.h" 15 #include "ash/wm_window.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 17 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
18 #include "chrome/browser/fullscreen.h" 18 #include "chrome/browser/fullscreen.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 20 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
21 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" 21 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
22 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h" 22 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
24 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" 24 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 case MENU_CLOSE: 116 case MENU_CLOSE:
117 if (item_.type == ash::TYPE_DIALOG) { 117 if (item_.type == ash::TYPE_DIALOG) {
118 ash::ShelfItemDelegate* item_delegate = 118 ash::ShelfItemDelegate* item_delegate =
119 ash::Shell::Get()->shelf_model()->GetShelfItemDelegate(item_.id); 119 ash::Shell::Get()->shelf_model()->GetShelfItemDelegate(item_.id);
120 DCHECK(item_delegate); 120 DCHECK(item_delegate);
121 item_delegate->Close(); 121 item_delegate->Close();
122 } else { 122 } else {
123 // TODO(simonhong): Use ShelfItemDelegate::Close(). 123 // TODO(simonhong): Use ShelfItemDelegate::Close().
124 controller_->Close(item_.id); 124 controller_->Close(item_.id);
125 } 125 }
126 ash::WmShell::Get()->RecordUserMetricsAction( 126 ash::ShellPort::Get()->RecordUserMetricsAction(
127 ash::UMA_CLOSE_THROUGH_CONTEXT_MENU); 127 ash::UMA_CLOSE_THROUGH_CONTEXT_MENU);
128 break; 128 break;
129 case MENU_PIN: 129 case MENU_PIN:
130 if (controller_->IsAppPinned(item_.app_launch_id.app_id())) 130 if (controller_->IsAppPinned(item_.app_launch_id.app_id()))
131 controller_->UnpinAppWithID(item_.app_launch_id.app_id()); 131 controller_->UnpinAppWithID(item_.app_launch_id.app_id());
132 else 132 else
133 controller_->PinAppWithID(item_.app_launch_id.app_id()); 133 controller_->PinAppWithID(item_.app_launch_id.app_id());
134 break; 134 break;
135 case MENU_AUTO_HIDE: 135 case MENU_AUTO_HIDE:
136 wm_shelf_->SetAutoHideBehavior( 136 wm_shelf_->SetAutoHideBehavior(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 case MENU_PIN: 201 case MENU_PIN:
202 case MENU_AUTO_HIDE: 202 case MENU_AUTO_HIDE:
203 case MENU_ALIGNMENT_MENU: 203 case MENU_ALIGNMENT_MENU:
204 case MENU_CHANGE_WALLPAPER: 204 case MENU_CHANGE_WALLPAPER:
205 LauncherContextMenu::ExecuteCommand(command_id, event_flags); 205 LauncherContextMenu::ExecuteCommand(command_id, event_flags);
206 return true; 206 return true;
207 default: 207 default:
208 return false; 208 return false;
209 } 209 }
210 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698