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

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

Issue 12212207: Support panel titles and Icons for v1 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 7 years, 10 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 "ash/launcher/launcher_util.h" 7 #include "ash/launcher/launcher_util.h"
8 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" 8 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" 9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
(...skipping 27 matching lines...) Expand all
38 : LauncherItemController(type, app_id, controller), 38 : LauncherItemController(type, app_id, controller),
39 app_launcher_id_(app_launcher_id) { 39 app_launcher_id_(app_launcher_id) {
40 } 40 }
41 41
42 ShellWindowLauncherItemController::~ShellWindowLauncherItemController() { 42 ShellWindowLauncherItemController::~ShellWindowLauncherItemController() {
43 } 43 }
44 44
45 void ShellWindowLauncherItemController::AddShellWindow( 45 void ShellWindowLauncherItemController::AddShellWindow(
46 ShellWindow* shell_window, 46 ShellWindow* shell_window,
47 ash::LauncherItemStatus status) { 47 ash::LauncherItemStatus status) {
48 if (shell_window->window_type() == ShellWindow::WINDOW_TYPE_PANEL && 48 if (shell_window->window_type_is_panel() && type() != TYPE_APP_PANEL) {
49 type() != TYPE_APP_PANEL) {
50 LOG(ERROR) << "ShellWindow of type Panel added to non-panel launcher item"; 49 LOG(ERROR) << "ShellWindow of type Panel added to non-panel launcher item";
51 } 50 }
52 if (status == ash::STATUS_ACTIVE) 51 if (status == ash::STATUS_ACTIVE)
53 shell_windows_.push_front(shell_window); 52 shell_windows_.push_front(shell_window);
54 else 53 else
55 shell_windows_.push_back(shell_window); 54 shell_windows_.push_back(shell_window);
56 } 55 }
57 56
58 void ShellWindowLauncherItemController::RemoveShellWindowForWindow( 57 void ShellWindowLauncherItemController::RemoveShellWindowForWindow(
59 aura::Window* window) { 58 aura::Window* window) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 189
191 void ShellWindowLauncherItemController::RestoreOrShow( 190 void ShellWindowLauncherItemController::RestoreOrShow(
192 ShellWindow* shell_window) { 191 ShellWindow* shell_window) {
193 if (shell_window->GetBaseWindow()->IsMinimized()) 192 if (shell_window->GetBaseWindow()->IsMinimized())
194 shell_window->GetBaseWindow()->Restore(); 193 shell_window->GetBaseWindow()->Restore();
195 else 194 else
196 shell_window->GetBaseWindow()->Show(); 195 shell_window->GetBaseWindow()->Show();
197 // Always activate windows when shown from the launcher. 196 // Always activate windows when shown from the launcher.
198 shell_window->GetBaseWindow()->Activate(); 197 shell_window->GetBaseWindow()->Activate();
199 } 198 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc ('k') | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698