| 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 "chrome/browser/media/router/media_router_dialog_controller.h" | 5 #include "chrome/browser/media/router/media_router_dialog_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/media/router/media_router_metrics.h" | 7 #include "chrome/browser/media/router/media_router_metrics.h" |
| 8 #include "chrome/common/features.h" |
| 8 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 10 #include "content/public/browser/web_contents_delegate.h" | 11 #include "content/public/browser/web_contents_delegate.h" |
| 11 | 12 |
| 12 #if defined(OS_ANDROID) | 13 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 13 #include "chrome/browser/media/android/router/media_router_dialog_controller_and
roid.h" | 14 #include "chrome/browser/media/android/router/media_router_dialog_controller_and
roid.h" |
| 14 #else | 15 #else |
| 15 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_im
pl.h" | 16 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_im
pl.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 namespace media_router { | 19 namespace media_router { |
| 19 | 20 |
| 20 // static | 21 // static |
| 21 MediaRouterDialogController* | 22 MediaRouterDialogController* |
| 22 MediaRouterDialogController::GetOrCreateForWebContents( | 23 MediaRouterDialogController::GetOrCreateForWebContents( |
| 23 content::WebContents* contents) { | 24 content::WebContents* contents) { |
| 24 #if defined(OS_ANDROID) | 25 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 25 return MediaRouterDialogControllerAndroid::GetOrCreateForWebContents( | 26 return MediaRouterDialogControllerAndroid::GetOrCreateForWebContents( |
| 26 contents); | 27 contents); |
| 27 #else | 28 #else |
| 28 return MediaRouterDialogControllerImpl::GetOrCreateForWebContents(contents); | 29 return MediaRouterDialogControllerImpl::GetOrCreateForWebContents(contents); |
| 29 #endif | 30 #endif |
| 30 } | 31 } |
| 31 | 32 |
| 32 class MediaRouterDialogController::InitiatorWebContentsObserver | 33 class MediaRouterDialogController::InitiatorWebContentsObserver |
| 33 : public content::WebContentsObserver { | 34 : public content::WebContentsObserver { |
| 34 public: | 35 public: |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 MediaRouterDialogController::TakeCreateConnectionRequest() { | 122 MediaRouterDialogController::TakeCreateConnectionRequest() { |
| 122 return create_connection_request_.Pass(); | 123 return create_connection_request_.Pass(); |
| 123 } | 124 } |
| 124 | 125 |
| 125 void MediaRouterDialogController::Reset() { | 126 void MediaRouterDialogController::Reset() { |
| 126 initiator_observer_.reset(); | 127 initiator_observer_.reset(); |
| 127 create_connection_request_.reset(); | 128 create_connection_request_.reset(); |
| 128 } | 129 } |
| 129 | 130 |
| 130 } // namespace media_router | 131 } // namespace media_router |
| OLD | NEW |