| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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 CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |    5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 
|    6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |    6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 
|    7  |    7  | 
|    8 #include <string> |    8 #include <string> | 
|    9 #include <vector> |    9 #include <vector> | 
|   10  |   10  | 
|   11 #include "base/callback.h" |   11 #include "base/callback.h" | 
|   12 #include "base/macros.h" |   12 #include "base/macros.h" | 
|   13 #include "base/sequenced_task_runner_helpers.h" |   13 #include "base/sequenced_task_runner_helpers.h" | 
|   14 #include "content/public/browser/browser_message_filter.h" |   14 #include "content/public/browser/browser_message_filter.h" | 
|   15  |   15  | 
|   16 class GURL; |   16 class GURL; | 
|   17 class Profile; |   17 class Profile; | 
|   18  |   18  | 
|   19 namespace blink { |   19 namespace blink { | 
|   20 enum class WebNavigationHintType; |   20 enum class WebNavigationHintType; | 
|   21 } |   21 } | 
|   22  |   22  | 
|   23 namespace chrome_browser_net { |   23 namespace chrome_browser_net { | 
|   24 class Predictor; |   24 class Predictor; | 
|   25 } |   25 } | 
|   26  |   26  | 
 |   27 namespace content { | 
 |   28 class ServiceWorkerContext; | 
 |   29 } | 
 |   30  | 
|   27 namespace content_settings { |   31 namespace content_settings { | 
|   28 class CookieSettings; |   32 class CookieSettings; | 
|   29 } |   33 } | 
|   30  |   34  | 
|   31 namespace network_hints { |   35 namespace network_hints { | 
|   32 struct LookupRequest; |   36 struct LookupRequest; | 
|   33 } |   37 } | 
|   34  |   38  | 
|   35 namespace extensions { |   39 namespace extensions { | 
|   36 class InfoMap; |   40 class InfoMap; | 
|   37 } |   41 } | 
|   38  |   42  | 
|   39 // This class filters out incoming Chrome-specific IPC messages for the renderer |   43 // This class filters out incoming Chrome-specific IPC messages for the renderer | 
|   40 // process on the IPC thread. |   44 // process on the IPC thread. | 
|   41 class ChromeRenderMessageFilter : public content::BrowserMessageFilter { |   45 class ChromeRenderMessageFilter : public content::BrowserMessageFilter { | 
|   42  public: |   46  public: | 
|   43   ChromeRenderMessageFilter(int render_process_id, Profile* profile); |   47   ChromeRenderMessageFilter( | 
 |   48       int render_process_id, | 
 |   49       Profile* profile, | 
 |   50       content::ServiceWorkerContext* service_worker_context); | 
|   44  |   51  | 
|   45   // content::BrowserMessageFilter methods: |   52   // content::BrowserMessageFilter methods: | 
|   46   bool OnMessageReceived(const IPC::Message& message) override; |   53   bool OnMessageReceived(const IPC::Message& message) override; | 
|   47   void OverrideThreadForMessage(const IPC::Message& message, |   54   void OverrideThreadForMessage(const IPC::Message& message, | 
|   48                                 content::BrowserThread::ID* thread) override; |   55                                 content::BrowserThread::ID* thread) override; | 
|   49  |   56  | 
|   50  private: |   57  private: | 
|   51   friend class content::BrowserThread; |   58   friend class content::BrowserThread; | 
|   52   friend class base::DeleteHelper<ChromeRenderMessageFilter>; |   59   friend class base::DeleteHelper<ChromeRenderMessageFilter>; | 
|   53  |   60  | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  130   // The Profile associated with our renderer process.  This should only be |  137   // The Profile associated with our renderer process.  This should only be | 
|  131   // accessed on the UI thread! |  138   // accessed on the UI thread! | 
|  132   Profile* profile_; |  139   Profile* profile_; | 
|  133   // The Predictor for the associated Profile. It is stored so that it can be |  140   // The Predictor for the associated Profile. It is stored so that it can be | 
|  134   // used on the IO thread. |  141   // used on the IO thread. | 
|  135   chrome_browser_net::Predictor* predictor_; |  142   chrome_browser_net::Predictor* predictor_; | 
|  136  |  143  | 
|  137   // Used to look up permissions at database creation time. |  144   // Used to look up permissions at database creation time. | 
|  138   scoped_refptr<content_settings::CookieSettings> cookie_settings_; |  145   scoped_refptr<content_settings::CookieSettings> cookie_settings_; | 
|  139  |  146  | 
 |  147   // Used to start Service Workers for navigation hints. | 
 |  148   content::ServiceWorkerContext* service_worker_context_; | 
 |  149  | 
|  140   DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); |  150   DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); | 
|  141 }; |  151 }; | 
|  142  |  152  | 
|  143 #endif  // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |  153 #endif  // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 
| OLD | NEW |