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

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

Issue 2848723002: Use a weak pointer when binding GuestViewBase::DidAttach. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | components/guest_view/browser/guest_view_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "content/public/browser/browser_message_filter.h" 15 #include "content/public/browser/browser_message_filter.h"
16 16
17 namespace base { 17 namespace base {
18 class DictionaryValue; 18 class DictionaryValue;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 class BrowserContext; 22 class BrowserContext;
23 } 23 }
24 24
25 namespace guest_view { 25 namespace guest_view {
26 class GuestViewBase;
27 class GuestViewManager; 26 class GuestViewManager;
28 27
29 // This class filters out incoming GuestView-specific IPC messages from the 28 // This class filters out incoming GuestView-specific IPC messages from the
30 // renderer process. It is created on the UI thread. Messages may be handled on 29 // renderer process. It is created on the UI thread. Messages may be handled on
31 // the IO thread or the UI thread. 30 // the IO thread or the UI thread.
32 class GuestViewMessageFilter : public content::BrowserMessageFilter { 31 class GuestViewMessageFilter : public content::BrowserMessageFilter {
33 public: 32 public:
34 GuestViewMessageFilter(int render_process_id, 33 GuestViewMessageFilter(int render_process_id,
35 content::BrowserContext* context); 34 content::BrowserContext* context);
36 35
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void OnAttachGuest(int element_instance_id, 67 void OnAttachGuest(int element_instance_id,
69 int guest_instance_id, 68 int guest_instance_id,
70 const base::DictionaryValue& attach_params); 69 const base::DictionaryValue& attach_params);
71 void OnAttachToEmbedderFrame(int embedder_local_render_frame_id, 70 void OnAttachToEmbedderFrame(int embedder_local_render_frame_id,
72 int element_instance_id, 71 int element_instance_id,
73 int guest_instance_id, 72 int guest_instance_id,
74 const base::DictionaryValue& params); 73 const base::DictionaryValue& params);
75 void OnViewCreated(int view_instance_id, const std::string& view_type); 74 void OnViewCreated(int view_instance_id, const std::string& view_type);
76 void OnViewGarbageCollected(int view_instance_id); 75 void OnViewGarbageCollected(int view_instance_id);
77 76
78 void WillAttachCallback(GuestViewBase* guest);
79
80 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter); 77 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter);
81 }; 78 };
82 79
83 } // namespace guest_view 80 } // namespace guest_view
84 81
85 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ 82 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « no previous file | components/guest_view/browser/guest_view_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698