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

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

Issue 1416313004: arc-bridge: Start ArcBridgeService on session start (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Moved all ARC-related initialization to ChromeShellDelegate Created 5 years, 1 month 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 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/shelf/shelf_item_types.h" 10 #include "ash/shelf/shelf_item_types.h"
11 #include "ash/shell_delegate.h" 11 #include "ash/shell_delegate.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" 16 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 19
20 #if defined(OS_CHROMEOS)
21 #include "ash/shell_observer.h"
22 #endif
23
20 class Browser; 24 class Browser;
21 25
22 namespace ash { 26 namespace ash {
23 class ShelfItemDelegate; 27 class ShelfItemDelegate;
24 } 28 }
25 29
26 namespace content { 30 namespace content {
27 class WebContents; 31 class WebContents;
28 } 32 }
29 33
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 100
97 base::ObserverList<ash::VirtualKeyboardStateObserver> 101 base::ObserverList<ash::VirtualKeyboardStateObserver>
98 keyboard_state_observer_list_; 102 keyboard_state_observer_list_;
99 103
100 // Proxies events from chrome/browser to ash::UserMetricsRecorder. 104 // Proxies events from chrome/browser to ash::UserMetricsRecorder.
101 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_; 105 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_;
102 106
103 #if defined(OS_CHROMEOS) 107 #if defined(OS_CHROMEOS)
104 scoped_ptr<chromeos::DisplayConfigurationObserver> 108 scoped_ptr<chromeos::DisplayConfigurationObserver>
105 display_configuration_observer_; 109 display_configuration_observer_;
110
111 // An Observer to track session state and start/stop ARC accordingly.
112 class ArcSessionObserver : public ash::ShellObserver {
oshima 2015/11/11 22:07:38 move the class definition in .cc file.
Luis Héctor Chávez 2015/11/11 22:11:12 I tried to do that, but if I put it in chrome_shel
oshima 2015/11/11 22:55:30 you can do this chrome_shell_delegate.h: class C
Luis Héctor Chávez 2015/11/11 23:41:07 That's what I tried. Compilation fails in chrome_s
oshima 2015/11/12 19:09:51 I see. Too bad given that this will soon be chrome
sky 2015/11/12 22:06:53 Move this above other fields. That is, keep all fi
Luis Héctor Chávez 2015/11/12 22:21:38 Done.
113 public:
114 ArcSessionObserver();
115 ~ArcSessionObserver() override;
116
117 // ash::ShellObserver overrides:
118 void OnLoginStateChanged(ash::user::LoginStatus status) override;
119
120 private:
121 DISALLOW_COPY_AND_ASSIGN(ArcSessionObserver);
122 };
123
124 // An Observer to track session state and start/stop ARC accordingly.
125 scoped_ptr<ArcSessionObserver> arc_session_observer_;
106 #endif 126 #endif
107 127
108 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); 128 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate);
109 }; 129 };
110 130
111 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ 131 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698