OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 { | 82 { |
83 m_frontend = frontend; | 83 m_frontend = frontend; |
84 } | 84 } |
85 | 85 |
86 void InspectorDOMStorageAgent::clearFrontend() | 86 void InspectorDOMStorageAgent::clearFrontend() |
87 { | 87 { |
88 m_frontend = 0; | 88 m_frontend = 0; |
89 disable(0); | 89 disable(0); |
90 } | 90 } |
91 | 91 |
| 92 void InspectorDOMStorageAgent::restore() |
| 93 { |
| 94 if (isEnabled()) |
| 95 enable(0); |
| 96 } |
| 97 |
92 bool InspectorDOMStorageAgent::isEnabled() const | 98 bool InspectorDOMStorageAgent::isEnabled() const |
93 { | 99 { |
94 return m_state->getBoolean(DOMStorageAgentState::domStorageAgentEnabled); | 100 return m_state->getBoolean(DOMStorageAgentState::domStorageAgentEnabled); |
95 } | 101 } |
96 | 102 |
97 void InspectorDOMStorageAgent::enable(ErrorString*) | 103 void InspectorDOMStorageAgent::enable(ErrorString*) |
98 { | 104 { |
99 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true); | 105 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true); |
100 m_instrumentingAgents->setInspectorDOMStorageAgent(this); | 106 m_instrumentingAgents->setInspectorDOMStorageAgent(this); |
101 } | 107 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 217 } |
212 targetFrame = frame; | 218 targetFrame = frame; |
213 | 219 |
214 if (isLocalStorage) | 220 if (isLocalStorage) |
215 return StorageNamespace::localStorageArea(frame->document()->securityOri
gin()); | 221 return StorageNamespace::localStorageArea(frame->document()->securityOri
gin()); |
216 return m_pageAgent->page()->sessionStorage()->storageArea(frame->document()-
>securityOrigin()); | 222 return m_pageAgent->page()->sessionStorage()->storageArea(frame->document()-
>securityOrigin()); |
217 } | 223 } |
218 | 224 |
219 } // namespace WebCore | 225 } // namespace WebCore |
220 | 226 |
OLD | NEW |