| Index: extensions/renderer/display_source_custom_bindings.h
|
| diff --git a/extensions/renderer/display_source_custom_bindings.h b/extensions/renderer/display_source_custom_bindings.h
|
| index 199f199b4663e968a780d31738b54c93f1c704b9..a7a36ab977ab5552db5894e6c3e72b9816a036d3 100644
|
| --- a/extensions/renderer/display_source_custom_bindings.h
|
| +++ b/extensions/renderer/display_source_custom_bindings.h
|
| @@ -29,7 +29,16 @@ class DisplaySourceCustomBindings : public ObjectBackedNativeHandler {
|
| const v8::FunctionCallbackInfo<v8::Value>& args);
|
| void TerminateSession(
|
| const v8::FunctionCallbackInfo<v8::Value>& args);
|
| -
|
| + // Call completion callbacks.
|
| + void CallSessionStartedCallback(
|
| + int sink_id,
|
| + const std::string& error_message = std::string());
|
| + void CallSessionTerminatedCallback(
|
| + int sink_id,
|
| + const std::string& error_message = std::string());
|
| + void CallCompletionCallback(const v8::Global<v8::Function>& callback,
|
| + const std::string& error_message);
|
| + // Dispatch events
|
| void DispatchSessionStarted(int sink_id) const;
|
| void DispatchSessionTerminated(int sink_id) const;
|
| void DispatchSessionError(int sink_id,
|
| @@ -46,6 +55,8 @@ class DisplaySourceCustomBindings : public ObjectBackedNativeHandler {
|
| DisplaySourceSession* GetDisplaySession(int sink_id) const;
|
|
|
| std::map<int, scoped_ptr<DisplaySourceSession>> session_map_;
|
| + std::map<int, v8::Global<v8::Function>> session_started_cb_map_;
|
| + std::map<int, v8::Global<v8::Function>> session_finished_cb_map_;
|
| base::WeakPtrFactory<DisplaySourceCustomBindings> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DisplaySourceCustomBindings);
|
|
|