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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_ui.h

Issue 1363593003: [Media Router] Set timeout for route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Show host URL in issue. Created 5 years, 3 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/ui/webui/media_router/media_router_ui.h
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h
index 2cf09cd26be3e3e725922d815f11da31b5cfc480..cc2eace6ea377d2fbc6e8ca9ebe8998b89d4d714 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/timer/timer.h"
#include "chrome/browser/media/router/issue.h"
#include "chrome/browser/media/router/media_source.h"
#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
@@ -175,6 +176,9 @@ class MediaRouterUI
bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode);
+ // Creates and sends an issue if route creation times out.
+ void RouteCreationTimeout();
+
// Sets the source host name to be displayed in the UI.
// Gets cast modes from |query_result_manager_| and forwards it to UI.
// One of the Init* functions must have been called before.
@@ -232,6 +236,9 @@ class MediaRouterUI
// Pointer to the MediaRouter for this instance's BrowserContext.
MediaRouterMojoImpl* router_;
+ // Timer used to implement a timeout on a create route request.
+ base::OneShotTimer route_creation_timer_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
// Therefore |weak_factory_| must be placed at the end.
base::WeakPtrFactory<MediaRouterUI> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698