Chromium Code Reviews

Side by Side Diff: chrome/browser/dom_ui/mediaplayer_ui.h

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_
6 #define CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_ 6 #define CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/singleton.h" 12 #include "base/singleton.h"
13 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 13 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
14 #include "chrome/browser/dom_ui/dom_ui.h" 14 #include "chrome/browser/dom_ui/dom_ui.h"
15 #include "chrome/common/notification_observer.h" 15 #include "chrome/common/notification_observer.h"
16 #include "chrome/common/notification_source.h" 16 #include "chrome/common/notification_source.h"
17 #include "chrome/common/notification_type.h" 17 #include "chrome/common/notification_type.h"
18 #include "chrome/common/notification_registrar.h" 18 #include "chrome/common/notification_registrar.h"
19 #include "net/base/directory_lister.h" 19 #include "net/base/directory_lister.h"
20 #include "net/url_request/url_request.h" 20 #include "net/url_request/url_request.h"
21 21
22 class GURL; 22 class GURL;
23 class MediaplayerHandler; 23 class MediaplayerHandler;
24 class Browser; 24 class Browser;
25 25
26 class MediaPlayer : public NotificationObserver, 26 class MediaPlayer : public NotificationObserver,
27 public URLRequest::Interceptor { 27 public net::URLRequest::Interceptor {
28 public: 28 public:
29 ~MediaPlayer(); 29 ~MediaPlayer();
30 30
31 // Enqueues this url into the current playlist. If the mediaplayer is 31 // Enqueues this url into the current playlist. If the mediaplayer is
32 // not currently visible, show it, and play the given url. 32 // not currently visible, show it, and play the given url.
33 void EnqueueMediaURL(const GURL& url, Browser* creator); 33 void EnqueueMediaURL(const GURL& url, Browser* creator);
34 34
35 // Clears out the current playlist, and start playback of the given url. 35 // Clears out the current playlist, and start playback of the given url.
36 // If there is no mediaplayer currently, show it, and play the given url. 36 // If there is no mediaplayer currently, show it, and play the given url.
37 void ForcePlayMediaURL(const GURL& url, Browser* creator); 37 void ForcePlayMediaURL(const GURL& url, Browser* creator);
(...skipping 29 matching lines...)
67 67
68 // Removes the playlist handler. 68 // Removes the playlist handler.
69 void RemovePlaylistHandler(MediaplayerHandler* handler); 69 void RemovePlaylistHandler(MediaplayerHandler* handler);
70 70
71 // Notfiys the mediaplayer that the playlist changed. This could be 71 // Notfiys the mediaplayer that the playlist changed. This could be
72 // called from the mediaplayer itself for example. 72 // called from the mediaplayer itself for example.
73 void NotifyPlaylistChanged(); 73 void NotifyPlaylistChanged();
74 74
75 // Always returns NULL because we don't want to attempt a redirect 75 // Always returns NULL because we don't want to attempt a redirect
76 // before seeing the detected mime type of the request. 76 // before seeing the detected mime type of the request.
77 // Implementation of URLRequest::Interceptor. 77 // Implementation of net::URLRequest::Interceptor.
78 virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request); 78 virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request);
79 79
80 // Determines if the requested document can be viewed by the 80 // Determines if the requested document can be viewed by the
81 // MediaPlayer. If it can, returns a URLRequestJob that 81 // MediaPlayer. If it can, returns a URLRequestJob that
82 // redirects the browser to the view URL. 82 // redirects the browser to the view URL.
83 // Implementation of URLRequest::Interceptor. 83 // Implementation of net::URLRequest::Interceptor.
84 virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request); 84 virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request);
85 85
86 // Used to detect when the mediaplayer is closed. 86 // Used to detect when the mediaplayer is closed.
87 void Observe(NotificationType type, 87 void Observe(NotificationType type,
88 const NotificationSource& source, 88 const NotificationSource& source,
89 const NotificationDetails& details); 89 const NotificationDetails& details);
90 90
91 // Getter for the singleton. 91 // Getter for the singleton.
92 static MediaPlayer* Get() { 92 static MediaPlayer* Get() {
93 return Singleton<MediaPlayer>::get(); 93 return Singleton<MediaPlayer>::get();
(...skipping 59 matching lines...)
153 153
154 class MediaplayerUI : public DOMUI { 154 class MediaplayerUI : public DOMUI {
155 public: 155 public:
156 explicit MediaplayerUI(TabContents* contents); 156 explicit MediaplayerUI(TabContents* contents);
157 157
158 private: 158 private:
159 DISALLOW_COPY_AND_ASSIGN(MediaplayerUI); 159 DISALLOW_COPY_AND_ASSIGN(MediaplayerUI);
160 }; 160 };
161 161
162 #endif // CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_ 162 #endif // CHROME_BROWSER_DOM_UI_MEDIAPLAYER_UI_H_
OLDNEW

Powered by Google App Engine