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: extensions/browser/api/display_source/display_source_api.h

Issue 1410093008: Introduce chrome.displaySource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from Antony 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
(Empty)
1 // Copyright 2015 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 EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_API_H_
6 #define EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_API_H_
7
8 #include "base/macros.h"
9 #include "extensions/browser/api/display_source/display_source_connection_delega te.h"
10 #include "extensions/browser/extension_function.h"
11
12 namespace extensions {
13
14 class DisplaySourceGetAvailableSinksFunction
15 : public UIThreadExtensionFunction {
16 public:
17 DECLARE_EXTENSION_FUNCTION("displaySource.getAvailableSinks",
18 DISPLAYSOURCE_GETAVAILABLESINKS);
19 DisplaySourceGetAvailableSinksFunction() = default;
20
21 protected:
22 ~DisplaySourceGetAvailableSinksFunction() override;
23 ResponseAction Run() final;
24
25 private:
26 void OnGetSinksCompleted(const DisplaySourceSinkInfoList& sinks);
27 void OnGetSinksFailed(const std::string& reason);
28
29 DISALLOW_COPY_AND_ASSIGN(DisplaySourceGetAvailableSinksFunction);
30 };
31
32 class DisplaySourceRequestAuthenticationFunction
33 : public UIThreadExtensionFunction {
34 public:
35 DECLARE_EXTENSION_FUNCTION("displaySource.requestAuthentication",
36 DISPLAYSOURCE_REQUESTAUTHENTICATION);
37 DisplaySourceRequestAuthenticationFunction() = default;
38
39 protected:
40 ~DisplaySourceRequestAuthenticationFunction() override;
41 ResponseAction Run() final;
42
43 private:
44 void OnRequestAuthCompleted(const DisplaySourceAuthInfo& auth_info);
45 void OnRequestAuthFailed(const std::string& reason);
46
47 DISALLOW_COPY_AND_ASSIGN(DisplaySourceRequestAuthenticationFunction);
48 };
49
50 } // namespace extensions
51
52 #endif // EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/display_source/OWNERS ('k') | extensions/browser/api/display_source/display_source_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698