| 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 #include "content/browser/presentation/presentation_service_impl.h" | 5 #include "content/browser/presentation/presentation_service_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "content/browser/presentation/presentation_type_converters.h" | 14 #include "content/browser/presentation/presentation_type_converters.h" |
| 15 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
| 16 #include "content/public/browser/navigation_details.h" | 16 #include "content/public/browser/navigation_details.h" |
| 17 #include "content/public/browser/presentation_connection_message.h" | |
| 18 #include "content/public/browser/render_frame_host.h" | 17 #include "content/public/browser/render_frame_host.h" |
| 19 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
| 20 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 21 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 22 #include "content/public/common/frame_navigate_params.h" | 21 #include "content/public/common/frame_navigate_params.h" |
| 22 #include "content/public/common/presentation_connection_message.h" |
| 23 #include "content/public/common/presentation_constants.h" | 23 #include "content/public/common/presentation_constants.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const int kInvalidRequestSessionId = -1; | 29 const int kInvalidRequestSessionId = -1; |
| 30 | 30 |
| 31 int GetNextRequestSessionId() { | 31 int GetNextRequestSessionId() { |
| 32 static int next_request_session_id = 0; | 32 static int next_request_session_id = 0; |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 599 |
| 600 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( | 600 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( |
| 601 blink::mojom::PresentationSessionInfoPtr session, | 601 blink::mojom::PresentationSessionInfoPtr session, |
| 602 blink::mojom::PresentationErrorPtr error) { | 602 blink::mojom::PresentationErrorPtr error) { |
| 603 DCHECK(!callback_.is_null()); | 603 DCHECK(!callback_.is_null()); |
| 604 callback_.Run(std::move(session), std::move(error)); | 604 callback_.Run(std::move(session), std::move(error)); |
| 605 callback_.Reset(); | 605 callback_.Reset(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace content | 608 } // namespace content |
| OLD | NEW |