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