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

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

Issue 2381753002: Use mojo SystemTray interfaces for both mash and classic ash (Closed)
Patch Set: rebase again Created 4 years, 2 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/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "chrome/common/pref_names.h" 66 #include "chrome/common/pref_names.h"
67 #include "chrome/grit/chromium_strings.h" 67 #include "chrome/grit/chromium_strings.h"
68 #include "chrome/grit/generated_resources.h" 68 #include "chrome/grit/generated_resources.h"
69 #include "chrome/grit/theme_resources.h" 69 #include "chrome/grit/theme_resources.h"
70 #include "chromeos/chromeos_switches.h" 70 #include "chromeos/chromeos_switches.h"
71 #include "components/prefs/pref_service.h" 71 #include "components/prefs/pref_service.h"
72 #include "components/user_manager/user.h" 72 #include "components/user_manager/user.h"
73 #include "components/user_manager/user_manager.h" 73 #include "components/user_manager/user_manager.h"
74 #include "content/public/browser/notification_service.h" 74 #include "content/public/browser/notification_service.h"
75 #include "content/public/browser/user_metrics.h" 75 #include "content/public/browser/user_metrics.h"
76 #include "content/public/common/mojo_shell_connection.h"
76 #include "ui/app_list/presenter/app_list_presenter.h" 77 #include "ui/app_list/presenter/app_list_presenter.h"
77 #include "ui/aura/window.h" 78 #include "ui/aura/window.h"
78 #include "ui/base/ime/chromeos/input_method_manager.h" 79 #include "ui/base/ime/chromeos/input_method_manager.h"
79 #include "ui/base/l10n/l10n_util.h" 80 #include "ui/base/l10n/l10n_util.h"
80 #include "ui/base/resource/resource_bundle.h" 81 #include "ui/base/resource/resource_bundle.h"
81 82
82 using chromeos::AccessibilityManager; 83 using chromeos::AccessibilityManager;
83 84
84 namespace { 85 namespace {
85 86
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } // namespace 318 } // namespace
318 319
319 ChromeShellDelegate::ChromeShellDelegate() 320 ChromeShellDelegate::ChromeShellDelegate()
320 : shelf_delegate_(NULL) { 321 : shelf_delegate_(NULL) {
321 PlatformInit(); 322 PlatformInit();
322 } 323 }
323 324
324 ChromeShellDelegate::~ChromeShellDelegate() { 325 ChromeShellDelegate::~ChromeShellDelegate() {
325 } 326 }
326 327
328 shell::Connector* ChromeShellDelegate::GetShellConnector() const {
329 return content::MojoShellConnection::GetForProcess()->GetConnector();
330 }
331
327 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { 332 bool ChromeShellDelegate::IsFirstRunAfterBoot() const {
328 return base::CommandLine::ForCurrentProcess()->HasSwitch( 333 return base::CommandLine::ForCurrentProcess()->HasSwitch(
329 chromeos::switches::kFirstExecAfterBoot); 334 chromeos::switches::kFirstExecAfterBoot);
330 } 335 }
331 336
332 bool ChromeShellDelegate::IsMultiProfilesEnabled() const { 337 bool ChromeShellDelegate::IsMultiProfilesEnabled() const {
333 if (!profiles::IsMultipleProfilesEnabled()) 338 if (!profiles::IsMultipleProfilesEnabled())
334 return false; 339 return false;
335 // If there is a user manager, we need to see that we can at least have 2 340 // If there is a user manager, we need to see that we can at least have 2
336 // simultaneous users to allow this feature. 341 // simultaneous users to allow this feature.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 NOTREACHED() << "Unexpected notification " << type; 553 NOTREACHED() << "Unexpected notification " << type;
549 } 554 }
550 } 555 }
551 556
552 void ChromeShellDelegate::PlatformInit() { 557 void ChromeShellDelegate::PlatformInit() {
553 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 558 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
554 content::NotificationService::AllSources()); 559 content::NotificationService::AllSources());
555 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 560 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
556 content::NotificationService::AllSources()); 561 content::NotificationService::AllSources());
557 } 562 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698