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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 2121303003: Remove the "Settings" packaged app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 (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/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // the launcher to open. 560 // the launcher to open.
561 // TODO(amistry): This only works on ChromeOS since Chrome hides the 561 // TODO(amistry): This only works on ChromeOS since Chrome hides the
562 // launcher instead of destroying it. Make this work on Chrome. 562 // launcher instead of destroying it. Make this work on Chrome.
563 if (hotword_service->IsAlwaysOnEnabled()) 563 if (hotword_service->IsAlwaysOnEnabled())
564 hotword_service->RequestHotwordSession(nullptr); 564 hotword_service->RequestHotwordSession(nullptr);
565 } 565 }
566 } 566 }
567 } 567 }
568 } 568 }
569 569
570 void AppListViewDelegate::OpenSettings() {
571 const extensions::Extension* extension =
572 extensions::ExtensionRegistry::Get(profile_)->GetExtensionById(
573 extension_misc::kSettingsAppId,
574 extensions::ExtensionRegistry::EVERYTHING);
575 DCHECK(extension);
576 controller_->ActivateApp(profile_,
577 extension,
578 AppListControllerDelegate::LAUNCH_FROM_UNKNOWN,
579 0);
580 }
581
582 void AppListViewDelegate::OpenHelp() { 570 void AppListViewDelegate::OpenHelp() {
583 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); 571 chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
584 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), 572 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL),
585 content::Referrer(), 573 content::Referrer(),
586 NEW_FOREGROUND_TAB, 574 NEW_FOREGROUND_TAB,
587 ui::PAGE_TRANSITION_LINK, 575 ui::PAGE_TRANSITION_LINK,
588 false); 576 false);
589 displayer.browser()->OpenURL(params); 577 displayer.browser()->OpenURL(params);
590 } 578 }
591 579
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 FOR_EACH_OBSERVER(app_list::AppListViewDelegateObserver, observers_, 837 FOR_EACH_OBSERVER(app_list::AppListViewDelegateObserver, observers_,
850 OnShutdown()); 838 OnShutdown());
851 839
852 SetProfile(nullptr); // Ensures launcher page web contents are torn down. 840 SetProfile(nullptr); // Ensures launcher page web contents are torn down.
853 841
854 // SigninManagerFactory is not a leaky singleton (unlike this class), and 842 // SigninManagerFactory is not a leaky singleton (unlike this class), and
855 // its destructor will check that it has no remaining observers. 843 // its destructor will check that it has no remaining observers.
856 scoped_observer_.RemoveAll(); 844 scoped_observer_.RemoveAll();
857 SigninManagerFactory::GetInstance()->RemoveObserver(this); 845 SigninManagerFactory::GetInstance()->RemoveObserver(this);
858 } 846 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698