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

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: 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
8 #include <string>
9
10 #include "base/bind.h"
Daniel Erat 2014/11/04 15:18:49 you probably don't need this include here, right?
dsodman 2014/11/04 16:35:04 Done.
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
13 #include "dbus/exported_object.h"
14 #include "dbus/message.h"
hashimoto 2014/11/04 08:57:44 nit: This include is not needed thanks to forward
dsodman 2014/11/04 16:35:04 Done.
15
16 namespace dbus {
17 class MethodCall;
18 class Response;
Daniel Erat 2014/11/04 15:18:50 it doesn't look like this forward declaration is u
dsodman 2014/11/04 16:35:05 Done.
19 }
20
21 namespace chromeos {
22
23 // This class provides an api for external apps to notify
Daniel Erat 2014/11/04 15:18:49 while we're providing comment nits: s/api/API/ on
dsodman 2014/11/04 16:35:05 Done.
24 // chrome that it should release control of the display server.
25 // The main client is the console application. This can
satorux1 2014/11/04 06:42:30 nit: three spaces -> one/two spaces?
dsodman 2014/11/04 16:35:05 Done.
26 // also be used by crouton to take over the display.
27 class ConsoleServiceProvider
28 : public CrosDBusService::ServiceProviderInterface {
29 public:
30 ConsoleServiceProvider();
31 ~ConsoleServiceProvider() override;
32
33 // CrosDBusService::ServiceProviderInterface overrides:
34 void Start(scoped_refptr<dbus::ExportedObject> exported_object) override;
35
36 private:
37 // This method will get called when a external process no longer needs
38 // control of the display and chrome can take ownership.
Daniel Erat 2014/11/04 15:18:50 nit: s/chrome/Chrome/
dsodman 2014/11/04 16:35:04 Done.
39 void TakeDisplayOwnership(
40 dbus::MethodCall* method_call,
41 dbus::ExportedObject::ResponseSender response_sender);
42
43 // This method will get called when a external process needs control of
44 // the display server and needs chrome to release ownership.
Daniel Erat 2014/11/04 15:18:50 nit: s/chrome/Chrome/, s/display server/display/ (
dsodman 2014/11/04 16:35:04 Done.
45 void ReleaseDisplayOwnership(
46 dbus::MethodCall* method_call,
47 dbus::ExportedObject::ResponseSender response_sender);
48
49 // This method is called when a dbus method is exported. If the export of the
50 // method is successful, |success| will be true. It will be false
51 // otherwise.
52 void OnExported(const std::string& interface_name,
53 const std::string& method_name,
54 bool success);
55
56 base::WeakPtrFactory<ConsoleServiceProvider> weak_ptr_factory_;
57
58 DISALLOW_COPY_AND_ASSIGN(ConsoleServiceProvider);
59 };
60
61 } // namespace chromeos
62
63 #endif // CHROME_BROWSER_CHROMEOS_DBUS_CONSOLE_SERVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698