OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "modules/storage/DOMWindowStorageController.h" | 5 #include "modules/storage/DOMWindowStorageController.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/events/Event.h" | 8 #include "core/events/Event.h" |
9 #include "core/page/Page.h" | 9 #include "core/page/Page.h" |
10 #include "modules/storage/DOMWindowStorage.h" | 10 #include "modules/storage/DOMWindowStorage.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 controller = new DOMWindowStorageController(document); | 36 controller = new DOMWindowStorageController(document); |
37 Supplement<Document>::provideTo(document, supplementName(), controller); | 37 Supplement<Document>::provideTo(document, supplementName(), controller); |
38 } | 38 } |
39 return *controller; | 39 return *controller; |
40 } | 40 } |
41 | 41 |
42 void DOMWindowStorageController::didAddEventListener( | 42 void DOMWindowStorageController::didAddEventListener( |
43 LocalDOMWindow* window, | 43 LocalDOMWindow* window, |
44 const AtomicString& eventType) { | 44 const AtomicString& eventType) { |
45 if (eventType == EventTypeNames::storage) { | 45 if (eventType == EventTypeNames::storage) { |
46 // Creating these blink::Storage objects informs the system that we'd like t
o receive | 46 // Creating these blink::Storage objects informs the system that we'd like |
47 // notifications about storage events that might be triggered in other proce
sses. Rather | 47 // to receive notifications about storage events that might be triggered in |
48 // than subscribe to these notifications explicitly, we subscribe to them im
plicitly to | 48 // other processes. Rather than subscribe to these notifications explicitly, |
49 // simplify the work done by the system. | 49 // we subscribe to them implicitly to simplify the work done by the system. |
50 DOMWindowStorage::from(*window).localStorage(IGNORE_EXCEPTION); | 50 DOMWindowStorage::from(*window).localStorage(IGNORE_EXCEPTION); |
51 DOMWindowStorage::from(*window).sessionStorage(IGNORE_EXCEPTION); | 51 DOMWindowStorage::from(*window).sessionStorage(IGNORE_EXCEPTION); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
OLD | NEW |