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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 12077055: Made launcher hidden when kicking off chrome in app mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/host/root_window_host_factory.h" 7 #include "ash/host/root_window_host_factory.h"
8 #include "ash/launcher/launcher_types.h" 8 #include "ash/launcher/launcher_types.h"
9 #include "ash/magnifier/magnifier_constants.h" 9 #include "ash/magnifier/magnifier_constants.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 if (chromeos::MagnificationManager::Get()) { 577 if (chromeos::MagnificationManager::Get()) {
578 return chromeos::MagnificationManager::Get()-> 578 return chromeos::MagnificationManager::Get()->
579 GetSavedScreenMagnifierScale(); 579 GetSavedScreenMagnifierScale();
580 } 580 }
581 #endif 581 #endif
582 return std::numeric_limits<double>::min(); 582 return std::numeric_limits<double>::min();
583 } 583 }
584 584
585 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { 585 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) {
586 DCHECK(launcher_delegate_); 586 DCHECK(launcher_delegate_);
587 // Don't show context menu for exclusive app runtime mode.
588 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceAppMode) &&
589 CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppId)) {
590 return NULL;
591 }
592
587 return new LauncherContextMenu(launcher_delegate_, root); 593 return new LauncherContextMenu(launcher_delegate_, root);
588 } 594 }
589 595
590 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() { 596 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() {
591 return ash::RootWindowHostFactory::Create(); 597 return ash::RootWindowHostFactory::Create();
592 } 598 }
593 599
594 void ChromeShellDelegate::Observe(int type, 600 void ChromeShellDelegate::Observe(int type,
595 const content::NotificationSource& source, 601 const content::NotificationSource& source,
596 const content::NotificationDetails& details) { 602 const content::NotificationDetails& details) {
597 #if defined(OS_CHROMEOS) 603 #if defined(OS_CHROMEOS)
598 switch (type) { 604 switch (type) {
599 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 605 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
600 ash::Shell::GetInstance()->CreateLauncher(); 606 ash::Shell::GetInstance()->CreateLauncher();
601 break; 607 break;
602 case chrome::NOTIFICATION_SESSION_STARTED: 608 case chrome::NOTIFICATION_SESSION_STARTED:
603 ash::Shell::GetInstance()->ShowLauncher(); 609 ash::Shell::GetInstance()->ShowLauncher();
604 break; 610 break;
605 default: 611 default:
606 NOTREACHED() << "Unexpected notification " << type; 612 NOTREACHED() << "Unexpected notification " << type;
607 } 613 }
608 #else 614 #else
609 // MSVC++ warns about switch statements without any cases. 615 // MSVC++ warns about switch statements without any cases.
610 NOTREACHED() << "Unexpected notification " << type; 616 NOTREACHED() << "Unexpected notification " << type;
611 #endif 617 #endif
612 } 618 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698