OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 public: | 47 public: |
48 // Instantiate a WebSharedWorker that interacts with the shared worker. | 48 // Instantiate a WebSharedWorker that interacts with the shared worker. |
49 // WebSharedWorkerClient given here must outlive or have the identical | 49 // WebSharedWorkerClient given here must outlive or have the identical |
50 // lifetime as this instance. | 50 // lifetime as this instance. |
51 BLINK_EXPORT static WebSharedWorker* Create(WebSharedWorkerClient*); | 51 BLINK_EXPORT static WebSharedWorker* Create(WebSharedWorkerClient*); |
52 | 52 |
53 virtual void StartWorkerContext(const WebURL& script_url, | 53 virtual void StartWorkerContext(const WebURL& script_url, |
54 const WebString& name, | 54 const WebString& name, |
55 const WebString& content_security_policy, | 55 const WebString& content_security_policy, |
56 WebContentSecurityPolicyType, | 56 WebContentSecurityPolicyType, |
57 WebAddressSpace) = 0; | 57 WebAddressSpace, |
| 58 bool data_saver_enabled) = 0; |
58 | 59 |
59 // Sends a connect event to the SharedWorker context. | 60 // Sends a connect event to the SharedWorker context. |
60 virtual void Connect(std::unique_ptr<WebMessagePortChannel>) = 0; | 61 virtual void Connect(std::unique_ptr<WebMessagePortChannel>) = 0; |
61 | 62 |
62 // Invoked to shutdown the worker when there are no more associated documents. | 63 // Invoked to shutdown the worker when there are no more associated documents. |
63 // This eventually deletes this instance. | 64 // This eventually deletes this instance. |
64 virtual void TerminateWorkerContext() = 0; | 65 virtual void TerminateWorkerContext() = 0; |
65 | 66 |
66 virtual void PauseWorkerContextOnStart() = 0; | 67 virtual void PauseWorkerContextOnStart() = 0; |
67 virtual void AttachDevTools(const WebString& host_id, int session_id) = 0; | 68 virtual void AttachDevTools(const WebString& host_id, int session_id) = 0; |
68 virtual void ReattachDevTools(const WebString& host_id, | 69 virtual void ReattachDevTools(const WebString& host_id, |
69 int session_id, | 70 int session_id, |
70 const WebString& saved_state) = 0; | 71 const WebString& saved_state) = 0; |
71 virtual void DetachDevTools(int session_id) = 0; | 72 virtual void DetachDevTools(int session_id) = 0; |
72 virtual void DispatchDevToolsMessage(int session_id, | 73 virtual void DispatchDevToolsMessage(int session_id, |
73 int call_id, | 74 int call_id, |
74 const WebString& method, | 75 const WebString& method, |
75 const WebString& message) = 0; | 76 const WebString& message) = 0; |
76 }; | 77 }; |
77 | 78 |
78 } // namespace blink | 79 } // namespace blink |
79 | 80 |
80 #endif | 81 #endif |
OLD | NEW |