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

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

Issue 2668153002: Revert of Move more utility functions to arc_util. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "base/command_line.h" 22 #include "base/command_line.h"
23 #include "base/macros.h" 23 #include "base/macros.h"
24 #include "base/strings/pattern.h" 24 #include "base/strings/pattern.h"
25 #include "base/strings/string_util.h" 25 #include "base/strings/string_util.h"
26 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
27 #include "base/threading/thread_task_runner_handle.h" 27 #include "base/threading/thread_task_runner_handle.h"
28 #include "base/values.h" 28 #include "base/values.h"
29 #include "build/build_config.h" 29 #include "build/build_config.h"
30 #include "chrome/browser/browser_process.h" 30 #include "chrome/browser/browser_process.h"
31 #include "chrome/browser/chrome_notification_types.h" 31 #include "chrome/browser/chrome_notification_types.h"
32 #include "chrome/browser/chromeos/arc/arc_util.h"
33 #include "chrome/browser/defaults.h" 32 #include "chrome/browser/defaults.h"
34 #include "chrome/browser/extensions/extension_util.h" 33 #include "chrome/browser/extensions/extension_util.h"
35 #include "chrome/browser/prefs/incognito_mode_prefs.h" 34 #include "chrome/browser/prefs/incognito_mode_prefs.h"
36 #include "chrome/browser/prefs/pref_service_syncable_util.h" 35 #include "chrome/browser/prefs/pref_service_syncable_util.h"
37 #include "chrome/browser/profiles/profile.h" 36 #include "chrome/browser/profiles/profile.h"
38 #include "chrome/browser/profiles/profile_manager.h" 37 #include "chrome/browser/profiles/profile_manager.h"
39 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" 38 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
40 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" 39 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
41 #include "chrome/browser/ui/ash/app_sync_ui_state.h" 40 #include "chrome/browser/ui/ash/app_sync_ui_state.h"
42 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 41 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 195
197 app_sync_ui_state_ = AppSyncUIState::Get(profile); 196 app_sync_ui_state_ = AppSyncUIState::Get(profile);
198 if (app_sync_ui_state_) 197 if (app_sync_ui_state_)
199 app_sync_ui_state_->AddObserver(this); 198 app_sync_ui_state_->AddObserver(this);
200 } 199 }
201 200
202 // All profile relevant settings get bound to the current profile. 201 // All profile relevant settings get bound to the current profile.
203 AttachProfile(profile); 202 AttachProfile(profile);
204 model_->AddObserver(this); 203 model_->AddObserver(this);
205 204
206 if (arc::IsArcAllowedForProfile(this->profile())) 205 if (arc::ArcSessionManager::IsAllowedForProfile(this->profile()))
207 arc_deferred_launcher_.reset(new ArcAppDeferredLauncherController(this)); 206 arc_deferred_launcher_.reset(new ArcAppDeferredLauncherController(this));
208 207
209 // In multi profile mode we might have a window manager. We try to create it 208 // In multi profile mode we might have a window manager. We try to create it
210 // here. If the instantiation fails, the manager is not needed. 209 // here. If the instantiation fails, the manager is not needed.
211 chrome::MultiUserWindowManager::CreateInstance(); 210 chrome::MultiUserWindowManager::CreateInstance();
212 211
213 // On Chrome OS using multi profile we want to switch the content of the shelf 212 // On Chrome OS using multi profile we want to switch the content of the shelf
214 // with a user change. Note that for unit tests the instance can be NULL. 213 // with a user change. Note that for unit tests the instance can be NULL.
215 if (chrome::MultiUserWindowManager::GetMultiProfileMode() != 214 if (chrome::MultiUserWindowManager::GetMultiProfileMode() !=
216 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_OFF) { 215 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_OFF) {
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 pref_change_registrar_.Add( 799 pref_change_registrar_.Add(
801 prefs::kTouchVirtualKeyboardEnabled, 800 prefs::kTouchVirtualKeyboardEnabled,
802 base::Bind( 801 base::Bind(
803 &ChromeLauncherControllerImpl::SetVirtualKeyboardBehaviorFromPrefs, 802 &ChromeLauncherControllerImpl::SetVirtualKeyboardBehaviorFromPrefs,
804 base::Unretained(this))); 803 base::Unretained(this)));
805 804
806 std::unique_ptr<LauncherAppUpdater> extension_app_updater( 805 std::unique_ptr<LauncherAppUpdater> extension_app_updater(
807 new LauncherExtensionAppUpdater(this, profile())); 806 new LauncherExtensionAppUpdater(this, profile()));
808 app_updaters_.push_back(std::move(extension_app_updater)); 807 app_updaters_.push_back(std::move(extension_app_updater));
809 808
810 if (arc::IsArcAllowedForProfile(profile())) { 809 if (arc::ArcSessionManager::IsAllowedForProfile(profile())) {
811 std::unique_ptr<LauncherAppUpdater> arc_app_updater( 810 std::unique_ptr<LauncherAppUpdater> arc_app_updater(
812 new LauncherArcAppUpdater(this, profile())); 811 new LauncherArcAppUpdater(this, profile()));
813 app_updaters_.push_back(std::move(arc_app_updater)); 812 app_updaters_.push_back(std::move(arc_app_updater));
814 } 813 }
815 814
816 app_list::AppListSyncableService* app_service = 815 app_list::AppListSyncableService* app_service =
817 app_list::AppListSyncableServiceFactory::GetForProfile(profile()); 816 app_list::AppListSyncableServiceFactory::GetForProfile(profile());
818 if (app_service) 817 if (app_service)
819 app_service->AddObserverAndStart(this); 818 app_service->AddObserverAndStart(this);
820 819
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 LauncherItemController* controller = GetLauncherItemController(item.id); 1490 LauncherItemController* controller = GetLauncherItemController(item.id);
1492 if (!controller || controller->image_set_by_controller()) 1491 if (!controller || controller->image_set_by_controller())
1493 continue; 1492 continue;
1494 item.image = image; 1493 item.image = image;
1495 if (arc_deferred_launcher_) 1494 if (arc_deferred_launcher_)
1496 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); 1495 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image);
1497 model_->Set(index, item); 1496 model_->Set(index, item);
1498 // It's possible we're waiting on more than one item, so don't break. 1497 // It's possible we're waiting on more than one item, so don't break.
1499 } 1498 }
1500 } 1499 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698