Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1563)

Unified Diff: chrome/browser/media/router/media_router_dialog_controller.h

Issue 1294133002: [Presentation API, MediaRouter] Routing from media sink selection to route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-router-discovery-2
Patch Set: Fixed comments and naming and DCHECKs Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/media_router_dialog_controller.h
diff --git a/chrome/browser/media/router/media_router_dialog_controller.h b/chrome/browser/media/router/media_router_dialog_controller.h
index 86e3620a5bc970d644939d8ce675d792e2847af8..aa7fddd27345d13b08d8b3a1ad57a306f419637f 100644
--- a/chrome/browser/media/router/media_router_dialog_controller.h
+++ b/chrome/browser/media/router/media_router_dialog_controller.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_
#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_
+#include <string>
+
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
@@ -54,10 +56,19 @@ class MediaRouterDialogController {
// instance.
explicit MediaRouterDialogController(content::WebContents* initiator);
+ // Activates the WebContents that initiated the dialog, e.g. focuses the tab.
void ActivateInitiatorWebContents();
- scoped_ptr<CreatePresentationSessionRequest> PassPresentationRequest();
+ // Passes the ownership of the CreatePresentationSessionRequest to the caller.
+ scoped_ptr<CreatePresentationSessionRequest> TakePresentationRequest();
+
+ // Returns the CreatePresentationSessionRequest to the caller but keeps the
+ // ownership with the MediaRouterDialogController.
+ const CreatePresentationSessionRequest* presentation_request() const {
+ return presentation_request_.get();
+ }
+ // Returns the WebContents that initiated showing the dialog.
content::WebContents* initiator() const { return initiator_; }
// Resets the state of the controller. Must be called from the overrides.

Powered by Google App Engine
This is Rietveld 408576698