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

Unified Diff: content/browser/broadcast_channel/broadcast_channel_provider.h

Issue 2158913006: Move BroadcastChannel browser code from components/ to content/browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: content/browser/broadcast_channel/broadcast_channel_provider.h
diff --git a/components/webmessaging/broadcast_channel_provider.h b/content/browser/broadcast_channel/broadcast_channel_provider.h
similarity index 54%
rename from components/webmessaging/broadcast_channel_provider.h
rename to content/browser/broadcast_channel/broadcast_channel_provider.h
index 1b4904bc6aac0d75e73275bef966de4da9223b36..7d704ce57142766161a21c481b77f101640df2e9 100644
--- a/components/webmessaging/broadcast_channel_provider.h
+++ b/content/browser/broadcast_channel/broadcast_channel_provider.h
@@ -2,30 +2,32 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_WEBMESSAGING_BROADCAST_CHANNEL_PROVIDER_H_
-#define COMPONENTS_WEBMESSAGING_BROADCAST_CHANNEL_PROVIDER_H_
+#ifndef CONTENT_BROWSER_BROADCAST_CHANNEL_BROADCAST_CHANNEL_PROVIDER_H_
+#define CONTENT_BROWSER_BROADCAST_CHANNEL_BROADCAST_CHANNEL_PROVIDER_H_
#include <map>
#include "base/memory/ref_counted.h"
-#include "components/webmessaging/public/interfaces/broadcast_channel.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
+#include "third_party/WebKit/public/platform/modules/broadcastchannel/broadcast_channel.mojom.h"
#include "url/origin.h"
-namespace webmessaging {
+namespace content {
class BroadcastChannelProvider
: public base::RefCountedThreadSafe<BroadcastChannelProvider>,
- public mojom::BroadcastChannelProvider {
+ public blink::mojom::BroadcastChannelProvider {
public:
BroadcastChannelProvider();
- void Connect(mojo::InterfaceRequest<mojom::BroadcastChannelProvider> request);
+ void Connect(
+ mojo::InterfaceRequest<blink::mojom::BroadcastChannelProvider> request);
void ConnectToChannel(
const url::Origin& origin,
const mojo::String& name,
- mojom::BroadcastChannelClientAssociatedPtrInfo client,
- mojom::BroadcastChannelClientAssociatedRequest connection) override;
+ blink::mojom::BroadcastChannelClientAssociatedPtrInfo client,
+ blink::mojom::BroadcastChannelClientAssociatedRequest connection)
+ override;
private:
friend class base::RefCountedThreadSafe<BroadcastChannelProvider>;
@@ -36,11 +38,11 @@ class BroadcastChannelProvider
void UnregisterConnection(Connection*);
void ReceivedMessageOnConnection(Connection*, const mojo::String& message);
- mojo::BindingSet<mojom::BroadcastChannelProvider> bindings_;
+ mojo::BindingSet<blink::mojom::BroadcastChannelProvider> bindings_;
std::map<url::Origin, std::multimap<std::string, std::unique_ptr<Connection>>>
connections_;
};
-} // namespace webmessaging
+} // namespace content
-#endif // COMPONENTS_WEBMESSAGING_BROADCAST_CHANNEL_PROVIDER_H_
+#endif // CONTENT_BROWSER_BROADCAST_CHANNEL_BROADCAST_CHANNEL_PROVIDER_H_
« no previous file with comments | « content/browser/broadcast_channel/OWNERS ('k') | content/browser/broadcast_channel/broadcast_channel_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698