OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/callback_old.h" | 8 #include "base/callback_old.h" |
9 #include "content/browser/browser_message_filter.h" | 9 #include "content/browser/browser_message_filter.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 virtual bool OnMessageReceived(const IPC::Message& message, | 34 virtual bool OnMessageReceived(const IPC::Message& message, |
35 bool* message_was_ok); | 35 bool* message_was_ok); |
36 | 36 |
37 int GetNextRoutingID(); | 37 int GetNextRoutingID(); |
38 int render_process_id() const { return render_process_id_; } | 38 int render_process_id() const { return render_process_id_; } |
39 ResourceDispatcherHost* resource_dispatcher_host() const { | 39 ResourceDispatcherHost* resource_dispatcher_host() const { |
40 return resource_dispatcher_host_; | 40 return resource_dispatcher_host_; |
41 } | 41 } |
42 | 42 |
43 private: | 43 private: |
44 ~WorkerMessageFilter(); | 44 virtual ~WorkerMessageFilter(); |
45 | 45 |
46 // Message handlers. | 46 // Message handlers. |
47 void OnCreateWorker(const ViewHostMsg_CreateWorker_Params& params, | 47 void OnCreateWorker(const ViewHostMsg_CreateWorker_Params& params, |
48 int* route_id); | 48 int* route_id); |
49 void OnLookupSharedWorker(const ViewHostMsg_CreateWorker_Params& params, | 49 void OnLookupSharedWorker(const ViewHostMsg_CreateWorker_Params& params, |
50 bool* exists, | 50 bool* exists, |
51 int* route_id, | 51 int* route_id, |
52 bool* url_error); | 52 bool* url_error); |
53 void OnCancelCreateDedicatedWorker(int route_id); | 53 void OnCancelCreateDedicatedWorker(int route_id); |
54 void OnForwardToWorker(const IPC::Message& message); | 54 void OnForwardToWorker(const IPC::Message& message); |
55 void OnDocumentDetached(unsigned long long document_id); | 55 void OnDocumentDetached(unsigned long long document_id); |
56 void OnCreateMessagePort(int* route_id, int* message_port_id); | 56 void OnCreateMessagePort(int* route_id, int* message_port_id); |
57 | 57 |
58 int render_process_id_; | 58 int render_process_id_; |
59 const content::ResourceContext* const resource_context_; | 59 const content::ResourceContext* const resource_context_; |
60 ResourceDispatcherHost* resource_dispatcher_host_; | 60 ResourceDispatcherHost* resource_dispatcher_host_; |
61 | 61 |
62 // This is guaranteed to be valid until OnChannelClosing is closed, and it's | 62 // This is guaranteed to be valid until OnChannelClosing is closed, and it's |
63 // not used after. | 63 // not used after. |
64 scoped_ptr<CallbackWithReturnValue<int>::Type> next_routing_id_; | 64 scoped_ptr<CallbackWithReturnValue<int>::Type> next_routing_id_; |
65 | 65 |
66 DISALLOW_IMPLICIT_CONSTRUCTORS(WorkerMessageFilter); | 66 DISALLOW_IMPLICIT_CONSTRUCTORS(WorkerMessageFilter); |
67 }; | 67 }; |
68 | 68 |
69 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ | 69 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ |
OLD | NEW |