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

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

Issue 22429004: Refactor LauncherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some comments Created 7 years, 4 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/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h" 9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h"
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser. h" 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser. h"
(...skipping 13 matching lines...) Expand all
24 instance_ = new ChromeLauncherControllerPerApp(profile, model); 24 instance_ = new ChromeLauncherControllerPerApp(profile, model);
25 else 25 else
26 instance_ = new ChromeLauncherControllerPerBrowser(profile, model); 26 instance_ = new ChromeLauncherControllerPerBrowser(profile, model);
27 return instance_; 27 return instance_;
28 } 28 }
29 29
30 ChromeLauncherController::~ChromeLauncherController() { 30 ChromeLauncherController::~ChromeLauncherController() {
31 if (instance_ == this) 31 if (instance_ == this)
32 instance_ = NULL; 32 instance_ = NULL;
33 } 33 }
34
35 bool ChromeLauncherController::IsPerAppLauncher() {
36 if (!instance_)
37 return false;
38 return instance_->GetPerAppInterface() != NULL;
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698