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

Unified Diff: extensions/browser/guest_view/extensions_guest_view_message_filter.h

Issue 1092853002: GuestView: Decouple extension IPCs from soon-to-be component IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_guest_view_registry_to_guest_view_manager
Patch Set: Updated Created 5 years, 8 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: extensions/browser/guest_view/extensions_guest_view_message_filter.h
diff --git a/extensions/browser/guest_view/guest_view_message_filter.h b/extensions/browser/guest_view/extensions_guest_view_message_filter.h
similarity index 65%
copy from extensions/browser/guest_view/guest_view_message_filter.h
copy to extensions/browser/guest_view/extensions_guest_view_message_filter.h
index 27e0d1b28bb96fc9abc86d94b8f0bef8c478e1ea..6e07d415901e40751d8250b2a48c6fbd6851b53b 100644
--- a/extensions/browser/guest_view/guest_view_message_filter.h
+++ b/extensions/browser/guest_view/extensions_guest_view_message_filter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MESSAGE_FILTER_H_
-#define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MESSAGE_FILTER_H_
+#ifndef EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_MESSAGE_FILTER_H_
+#define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_MESSAGE_FILTER_H_
#include <string>
@@ -11,10 +11,6 @@
#include "base/memory/weak_ptr.h"
#include "content/public/browser/browser_message_filter.h"
-namespace base {
-class DictionaryValue;
-}
-
namespace content {
class BrowserContext;
class WebContents;
@@ -26,21 +22,19 @@ class Size;
namespace extensions {
-// This class filters out incoming GuestView-specific IPC messages from the
-// renderer process. It is created on the UI thread. Messages may be handled on
-// the IO thread or the UI thread.
-class GuestViewMessageFilter : public content::BrowserMessageFilter {
+// This class filters out incoming extensions GuestView-specific IPC messages
+// from thw renderer process. It is created on the UI thread. Messages may be
+// handled on the IO thread or the UI thread.
+class ExtensionsGuestViewMessageFilter : public content::BrowserMessageFilter {
public:
- GuestViewMessageFilter(int render_process_id,
- content::BrowserContext* context);
-
- int render_process_id() const { return render_process_id_; }
+ ExtensionsGuestViewMessageFilter(int render_process_id,
+ content::BrowserContext* context);
private:
friend class content::BrowserThread;
- friend class base::DeleteHelper<GuestViewMessageFilter>;
+ friend class base::DeleteHelper<ExtensionsGuestViewMessageFilter>;
- ~GuestViewMessageFilter() override;
+ ~ExtensionsGuestViewMessageFilter() override;
// content::BrowserMessageFilter implementation.
void OverrideThreadForMessage(const IPC::Message& message,
@@ -49,9 +43,10 @@ class GuestViewMessageFilter : public content::BrowserMessageFilter {
bool OnMessageReceived(const IPC::Message& message) override;
// Message handlers on the UI thread.
- void OnAttachGuest(int element_instance_id,
- int guest_instance_id,
- const base::DictionaryValue& attach_params);
+ void OnCanExecuteContentScript(int render_view_id,
+ int script_id,
+ bool* allowed);
+
void OnCreateMimeHandlerViewGuest(int render_frame_id,
const std::string& view_id,
int element_instance_id,
@@ -60,10 +55,6 @@ class GuestViewMessageFilter : public content::BrowserMessageFilter {
int element_instance_id,
const gfx::Size& new_size);
- void OnCanExecuteContentScript(int render_view_id,
- int script_id,
- bool* allowed);
-
// Runs on UI thread.
void MimeHandlerViewGuestCreatedCallback(int element_instance_id,
int embedder_render_process_id,
@@ -77,11 +68,11 @@ class GuestViewMessageFilter : public content::BrowserMessageFilter {
content::BrowserContext* const browser_context_;
// Weak pointers produced by this factory are bound to the IO thread.
- base::WeakPtrFactory<GuestViewMessageFilter> weak_ptr_factory_;
+ base::WeakPtrFactory<ExtensionsGuestViewMessageFilter> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter);
+ DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewMessageFilter);
};
} // namespace extensions
-#endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MESSAGE_FILTER_H_
+#endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698