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

Side by Side Diff: components/guest_view/browser/guest_view_message_filter.h

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: sync Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_
6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "content/public/browser/browser_message_filter.h" 12 #include "content/public/browser/browser_message_filter.h"
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue; 15 class DictionaryValue;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 class BrowserContext; 19 class BrowserContext;
20 class WebContents; 20 class WebContents;
21 } 21 }
22 22
23 namespace gfx { 23 namespace gfx {
24 class Size; 24 class Size;
25 } 25 }
26 26
27 namespace guest_view { 27 namespace guest_view {
28 class GuestViewBase;
28 class GuestViewManager; 29 class GuestViewManager;
29 30
30 // This class filters out incoming GuestView-specific IPC messages from the 31 // This class filters out incoming GuestView-specific IPC messages from the
31 // renderer process. It is created on the UI thread. Messages may be handled on 32 // renderer process. It is created on the UI thread. Messages may be handled on
32 // the IO thread or the UI thread. 33 // the IO thread or the UI thread.
33 class GuestViewMessageFilter : public content::BrowserMessageFilter { 34 class GuestViewMessageFilter : public content::BrowserMessageFilter {
34 public: 35 public:
35 GuestViewMessageFilter(int render_process_id, 36 GuestViewMessageFilter(int render_process_id,
36 content::BrowserContext* context); 37 content::BrowserContext* context);
37 38
(...skipping 24 matching lines...) Expand all
62 base::WeakPtrFactory<GuestViewMessageFilter> weak_ptr_factory_; 63 base::WeakPtrFactory<GuestViewMessageFilter> weak_ptr_factory_;
63 64
64 private: 65 private:
65 friend class content::BrowserThread; 66 friend class content::BrowserThread;
66 friend class base::DeleteHelper<GuestViewMessageFilter>; 67 friend class base::DeleteHelper<GuestViewMessageFilter>;
67 68
68 // Message handlers on the UI thread. 69 // Message handlers on the UI thread.
69 void OnAttachGuest(int element_instance_id, 70 void OnAttachGuest(int element_instance_id,
70 int guest_instance_id, 71 int guest_instance_id,
71 const base::DictionaryValue& attach_params); 72 const base::DictionaryValue& attach_params);
73 void OnAttachToEmbedderFrame(int embedder_local_render_frame_id,
74 int element_instance_id,
75 int guest_instance_id,
76 const base::DictionaryValue& params);
72 void OnViewCreated(int view_instance_id, const std::string& view_type); 77 void OnViewCreated(int view_instance_id, const std::string& view_type);
73 void OnViewGarbageCollected(int view_instance_id); 78 void OnViewGarbageCollected(int view_instance_id);
74 79
80 void WillAttachCallback(GuestViewBase* guest);
81
75 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter); 82 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter);
76 }; 83 };
77 84
78 } // namespace guest_view 85 } // namespace guest_view
79 86
80 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ 87 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « components/guest_view/browser/guest_view_base.cc ('k') | components/guest_view/browser/guest_view_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698