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

Side by Side Diff: content/browser/media/media_internals_proxy.h

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_
6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ 6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/sequenced_task_runner_helpers.h" 9 #include "base/sequenced_task_runner_helpers.h"
10 #include "content/browser/media/media_internals.h" 10 #include "content/browser/media/media_internals.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Register a Handler and start receiving callbacks from MediaInternals. 42 // Register a Handler and start receiving callbacks from MediaInternals.
43 void Attach(MediaInternalsMessageHandler* handler); 43 void Attach(MediaInternalsMessageHandler* handler);
44 44
45 // Unregister the same and stop receiving callbacks. 45 // Unregister the same and stop receiving callbacks.
46 void Detach(); 46 void Detach();
47 47
48 // Have MediaInternals send all the data it has. 48 // Have MediaInternals send all the data it has.
49 void GetEverything(); 49 void GetEverything();
50 50
51 // MediaInternals callback. Called on the IO thread. 51 // MediaInternals callback. Called on the IO thread.
52 void OnUpdate(const string16& update); 52 void OnUpdate(const base::string16& update);
53 53
54 // net::NetLog::ThreadSafeObserver implementation. Callable from any thread: 54 // net::NetLog::ThreadSafeObserver implementation. Callable from any thread:
55 virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE; 55 virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
56 56
57 private: 57 private:
58 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 58 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
59 friend class base::DeleteHelper<MediaInternalsProxy>; 59 friend class base::DeleteHelper<MediaInternalsProxy>;
60 virtual ~MediaInternalsProxy(); 60 virtual ~MediaInternalsProxy();
61 61
62 // Build a dictionary mapping constant names to values. 62 // Build a dictionary mapping constant names to values.
63 base::Value* GetConstants(); 63 base::Value* GetConstants();
64 64
65 void ObserveMediaInternalsOnIOThread(); 65 void ObserveMediaInternalsOnIOThread();
66 void StopObservingMediaInternalsOnIOThread(); 66 void StopObservingMediaInternalsOnIOThread();
67 void GetEverythingOnIOThread(); 67 void GetEverythingOnIOThread();
68 void UpdateUIOnUIThread(const string16& update); 68 void UpdateUIOnUIThread(const base::string16& update);
69 69
70 // Put |entry| on a list of events to be sent to the page. 70 // Put |entry| on a list of events to be sent to the page.
71 void AddNetEventOnUIThread(base::Value* entry); 71 void AddNetEventOnUIThread(base::Value* entry);
72 72
73 // Send all pending events to the page. 73 // Send all pending events to the page.
74 void SendNetEventsOnUIThread(); 74 void SendNetEventsOnUIThread();
75 75
76 // Call a JavaScript function on the page. Takes ownership of |args|. 76 // Call a JavaScript function on the page. Takes ownership of |args|.
77 void CallJavaScriptFunctionOnUIThread(const std::string& function, 77 void CallJavaScriptFunctionOnUIThread(const std::string& function,
78 base::Value* args); 78 base::Value* args);
79 79
80 MediaInternalsMessageHandler* handler_; 80 MediaInternalsMessageHandler* handler_;
81 scoped_ptr<base::ListValue> pending_net_updates_; 81 scoped_ptr<base::ListValue> pending_net_updates_;
82 NotificationRegistrar registrar_; 82 NotificationRegistrar registrar_;
83 MediaInternals::UpdateCallback update_callback_; 83 MediaInternals::UpdateCallback update_callback_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(MediaInternalsProxy); 85 DISALLOW_COPY_AND_ASSIGN(MediaInternalsProxy);
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ 90 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_
OLDNEW
« no previous file with comments | « content/browser/media/media_internals_handler.cc ('k') | content/browser/media/media_internals_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698