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

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

Issue 494033002: Move AppWindow to extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded include in chrome_shell_delegate.cc Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/app_window_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
6 6
7 #include "apps/app_window.h"
8 #include "ash/shelf/shelf_model.h" 7 #include "ash/shelf/shelf_model.h"
9 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
11 #include "chrome/browser/extensions/webstore_install_with_prompt.h" 10 #include "chrome/browser/extensions/webstore_install_with_prompt.h"
12 #include "chrome/browser/favicon/favicon_tab_helper.h" 11 #include "chrome/browser/favicon/favicon_tab_helper.h"
13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" 13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
15 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
16 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h" 15 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
17 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 16 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
18 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" 17 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
19 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
19 #include "extensions/browser/app_window/app_window.h"
20 #include "extensions/browser/app_window/native_app_window.h" 20 #include "extensions/browser/app_window/native_app_window.h"
21 #include "skia/ext/image_operations.h" 21 #include "skia/ext/image_operations.h"
22 #include "ui/aura/client/aura_constants.h" 22 #include "ui/aura/client/aura_constants.h"
23 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
24 #include "ui/events/event.h" 24 #include "ui/events/event.h"
25 #include "ui/gfx/image/image_skia.h" 25 #include "ui/gfx/image/image_skia.h"
26 #include "ui/wm/core/window_animations.h" 26 #include "ui/wm/core/window_animations.h"
27 27
28 using apps::AppWindow; 28 using extensions::AppWindow;
29 29
30 namespace { 30 namespace {
31 31
32 // Size of the icon in the shelf launcher in display-independent pixels. 32 // Size of the icon in the shelf launcher in display-independent pixels.
33 const int kAppListIconSize = 24; 33 const int kAppListIconSize = 24;
34 34
35 // This will return a slightly smaller icon than the app icon to be used in 35 // This will return a slightly smaller icon than the app icon to be used in
36 // the application list menu. 36 // the application list menu.
37 gfx::Image GetAppListIcon(AppWindow* app_window) { 37 gfx::Image GetAppListIcon(AppWindow* app_window) {
38 // TODO(skuhne): We instead might want to use LoadImages in 38 // TODO(skuhne): We instead might want to use LoadImages in
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 if (window_to_show->GetBaseWindow()->IsActive()) { 329 if (window_to_show->GetBaseWindow()->IsActive()) {
330 // Coming here, only a single window is active. For keyboard activations 330 // Coming here, only a single window is active. For keyboard activations
331 // the window gets animated. 331 // the window gets animated.
332 AnimateWindow(window_to_show->GetNativeWindow(), 332 AnimateWindow(window_to_show->GetNativeWindow(),
333 wm::WINDOW_ANIMATION_TYPE_BOUNCE); 333 wm::WINDOW_ANIMATION_TYPE_BOUNCE);
334 } else { 334 } else {
335 ShowAndActivateOrMinimize(window_to_show); 335 ShowAndActivateOrMinimize(window_to_show);
336 } 336 }
337 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698