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

Side by Side Diff: chrome/browser/chromeos/dbus/console_service_provider.h

Issue 697493002: Support transition between chrome and user mode console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upload again Created 6 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_CONSOLE_SERVICE_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_CONSOLE_SERVICE_PROVIDER_H_
7
stevenjb 2014/11/03 16:35:42 #Include <string>
dsodman 2014/11/04 05:19:40 Done.
8 #include "base/bind.h"
9 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
10 #include "dbus/exported_object.h"
11 #include "dbus/message.h"
stevenjb 2014/11/03 16:35:41 #include "base/memory/weak_ptr.h"
dsodman 2014/11/04 05:19:40 Done.
12
13 namespace dbus {
14 class MethodCall;
15 class Response;
16 }
17
18 namespace chromeos {
19
20 // This class provides an api for external apps to notify
21 // chrome that it should release control of the display server.
22 // The main client is the console application. This can
23 // also be used by crouton to take over the display.
24 class ConsoleServiceProvider
25 : public CrosDBusService::ServiceProviderInterface {
26 public:
27 ConsoleServiceProvider();
28 virtual ~ConsoleServiceProvider();
stevenjb 2014/11/03 16:35:42 ~ConsoleServiceProvider() override;
dsodman 2014/11/04 05:19:40 Done.
29
30 void Start(scoped_refptr<dbus::ExportedObject> exported_object) override;
stevenjb 2014/11/03 16:35:42 Comment above: // ServiceProviderInterface
dsodman 2014/11/04 05:19:40 Done.
31
32 private:
33 // This method will get called when a external process calls the dbus
34 // method LibCrosService.ActivateConsole. The method receives a boolean
35 // value which is true when chrome is being asked to release control
36 // of the display so that console can take over. It will be false
37 // otherwise.
38 void ActivateConsole(dbus::MethodCall* method_call,
39 dbus::ExportedObject::ResponseSender response_sender);
40
41 // This method is called when a dbus method is exported. If the export of the
42 // method is successful, |success| will be true. It will be false
43 // otherwise.
44 void OnExported(const std::string& interface_name,
45 const std::string& method_name,
46 bool success);
47
48 base::WeakPtrFactory<ConsoleServiceProvider> weak_ptr_factory_;
stevenjb 2014/11/03 16:35:41 nit: blank line
dsodman 2014/11/04 05:19:40 Done.
49 DISALLOW_COPY_AND_ASSIGN(ConsoleServiceProvider);
50 };
51
52 } // namespace chromeos
53
54 #endif // CHROME_BROWSER_CHROMEOS_DBUS_CONSOLE_SERVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698