| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 protected: | 38 protected: |
| 39 virtual ~Observer() {} | 39 virtual ~Observer() {} |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 using PresentationSessionSuccessCallback = | 42 using PresentationSessionSuccessCallback = |
| 43 base::Callback<void(const PresentationSessionInfo&)>; | 43 base::Callback<void(const PresentationSessionInfo&)>; |
| 44 using PresentationSessionErrorCallback = | 44 using PresentationSessionErrorCallback = |
| 45 base::Callback<void(const PresentationError&)>; | 45 base::Callback<void(const PresentationError&)>; |
| 46 using PresentationSessionMessageCallback = base::Callback<void( | 46 using PresentationSessionMessageCallback = base::Callback<void( |
| 47 scoped_ptr<ScopedVector<PresentationSessionMessage>>)>; | 47 scoped_ptr<ScopedVector<PresentationSessionMessage>>)>; |
| 48 using SendMessageCallback = base::Closure; | 48 using SendMessageCallback = base::Callback<void(bool)>; |
| 49 | 49 |
| 50 virtual ~PresentationServiceDelegate() {} | 50 virtual ~PresentationServiceDelegate() {} |
| 51 | 51 |
| 52 // Registers an observer associated with frame with |render_process_id| | 52 // Registers an observer associated with frame with |render_process_id| |
| 53 // and |render_frame_id| with this class to listen for updates. | 53 // and |render_frame_id| with this class to listen for updates. |
| 54 // This class does not own the observer. | 54 // This class does not own the observer. |
| 55 // It is an error to add an observer if there is already an observer for that | 55 // It is an error to add an observer if there is already an observer for that |
| 56 // frame. | 56 // frame. |
| 57 virtual void AddObserver(int render_process_id, | 57 virtual void AddObserver(int render_process_id, |
| 58 int render_frame_id, | 58 int render_frame_id, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 virtual void SendMessage( | 161 virtual void SendMessage( |
| 162 int render_process_id, | 162 int render_process_id, |
| 163 int render_frame_id, | 163 int render_frame_id, |
| 164 scoped_ptr<PresentationSessionMessage> message_request, | 164 scoped_ptr<PresentationSessionMessage> message_request, |
| 165 const SendMessageCallback& send_message_cb) = 0; | 165 const SendMessageCallback& send_message_cb) = 0; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace content | 168 } // namespace content |
| 169 | 169 |
| 170 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 170 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
| OLD | NEW |