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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/shell_window_launcher_item_controller.h " 5 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h "
6 6
7 #include "apps/shell_window.h" 7 #include "apps/shell_window.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 if (shell_window->web_contents()) { 222 if (shell_window->web_contents()) {
223 string16 title = shell_window->web_contents()->GetTitle(); 223 string16 title = shell_window->web_contents()->GetTitle();
224 if (!title.empty()) 224 if (!title.empty())
225 return title; 225 return title;
226 } 226 }
227 } 227 }
228 return GetAppTitle(); 228 return GetAppTitle();
229 } 229 }
230 230
231 ui::MenuModel* ShellWindowLauncherItemController::CreateContextMenu( 231 ui::MenuModel* ShellWindowLauncherItemController::CreateContextMenu(
232 aura::RootWindow* root_window) { 232 aura::Window* root_window) {
233 ash::LauncherItem item = 233 ash::LauncherItem item =
234 *(launcher_controller()->model()->ItemByID(launcher_id())); 234 *(launcher_controller()->model()->ItemByID(launcher_id()));
235 return new LauncherContextMenu(launcher_controller(), &item, root_window); 235 return new LauncherContextMenu(launcher_controller(), &item, root_window);
236 } 236 }
237 237
238 ash::LauncherMenuModel* 238 ash::LauncherMenuModel*
239 ShellWindowLauncherItemController::CreateApplicationMenu(int event_flags) { 239 ShellWindowLauncherItemController::CreateApplicationMenu(int event_flags) {
240 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 240 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
241 } 241 }
242 242
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 if (window_to_show->GetBaseWindow()->IsActive()) { 292 if (window_to_show->GetBaseWindow()->IsActive()) {
293 // Coming here, only a single window is active. For keyboard activations 293 // Coming here, only a single window is active. For keyboard activations
294 // the window gets animated. 294 // the window gets animated.
295 AnimateWindow(window_to_show->GetNativeWindow(), 295 AnimateWindow(window_to_show->GetNativeWindow(),
296 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); 296 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE);
297 } else { 297 } else {
298 ShowAndActivateOrMinimize(window_to_show); 298 ShowAndActivateOrMinimize(window_to_show);
299 } 299 }
300 } 300 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h ('k') | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698