| OLD | NEW |
| 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> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include <string> | 11 #include <string> |
| 9 | 12 |
| 10 #include "base/macros.h" | 13 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 12 #include "content/public/browser/browser_message_filter.h" | 15 #include "content/public/browser/browser_message_filter.h" |
| 13 | 16 |
| 14 namespace base { | 17 namespace base { |
| 15 class DictionaryValue; | 18 class DictionaryValue; |
| 16 } | 19 } |
| 17 | 20 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 30 | 33 |
| 31 // This class filters out incoming GuestView-specific IPC messages from the | 34 // This class filters out incoming GuestView-specific IPC messages from the |
| 32 // renderer process. It is created on the UI thread. Messages may be handled on | 35 // renderer process. It is created on the UI thread. Messages may be handled on |
| 33 // the IO thread or the UI thread. | 36 // the IO thread or the UI thread. |
| 34 class GuestViewMessageFilter : public content::BrowserMessageFilter { | 37 class GuestViewMessageFilter : public content::BrowserMessageFilter { |
| 35 public: | 38 public: |
| 36 GuestViewMessageFilter(int render_process_id, | 39 GuestViewMessageFilter(int render_process_id, |
| 37 content::BrowserContext* context); | 40 content::BrowserContext* context); |
| 38 | 41 |
| 39 protected: | 42 protected: |
| 40 GuestViewMessageFilter(const uint32* message_classes_to_filter, | 43 GuestViewMessageFilter(const uint32_t* message_classes_to_filter, |
| 41 size_t num_message_classes_to_filter, | 44 size_t num_message_classes_to_filter, |
| 42 int render_process_id, | 45 int render_process_id, |
| 43 content::BrowserContext* context); | 46 content::BrowserContext* context); |
| 44 | 47 |
| 45 ~GuestViewMessageFilter() override; | 48 ~GuestViewMessageFilter() override; |
| 46 | 49 |
| 47 // Returns the GuestViewManager for |browser_context_| if one already exists, | 50 // Returns the GuestViewManager for |browser_context_| if one already exists, |
| 48 // or creates and returns one for |browser_context_| otherwise. | 51 // or creates and returns one for |browser_context_| otherwise. |
| 49 virtual GuestViewManager* GetOrCreateGuestViewManager(); | 52 virtual GuestViewManager* GetOrCreateGuestViewManager(); |
| 50 | 53 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 78 void OnViewGarbageCollected(int view_instance_id); | 81 void OnViewGarbageCollected(int view_instance_id); |
| 79 | 82 |
| 80 void WillAttachCallback(GuestViewBase* guest); | 83 void WillAttachCallback(GuestViewBase* guest); |
| 81 | 84 |
| 82 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter); | 85 DISALLOW_COPY_AND_ASSIGN(GuestViewMessageFilter); |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 } // namespace guest_view | 88 } // namespace guest_view |
| 86 | 89 |
| 87 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ | 90 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MESSAGE_FILTER_H_ |
| OLD | NEW |