| OLD | NEW | 
|---|
| 1 | 1 | 
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be | 
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. | 
| 5 | 5 | 
| 6 #include "config.h" | 6 #include "config.h" | 
| 7 #include "modules/serviceworkers/ServiceWorkerContainer.h" | 7 #include "modules/serviceworkers/ServiceWorkerContainer.h" | 
| 8 | 8 | 
| 9 #include "bindings/core/v8/Dictionary.h" | 9 #include "bindings/core/v8/Dictionary.h" | 
| 10 #include "bindings/core/v8/ScriptFunction.h" | 10 #include "bindings/core/v8/ScriptFunction.h" | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 153         m_page.clear(); | 153         m_page.clear(); | 
| 154         V8GCController::collectGarbage(isolate()); | 154         V8GCController::collectGarbage(isolate()); | 
| 155     } | 155     } | 
| 156 | 156 | 
| 157     ExecutionContext* executionContext() { return &(m_page->document()); } | 157     ExecutionContext* executionContext() { return &(m_page->document()); } | 
| 158     v8::Isolate* isolate() { return v8::Isolate::GetCurrent(); } | 158     v8::Isolate* isolate() { return v8::Isolate::GetCurrent(); } | 
| 159     ScriptState* scriptState() { return ScriptState::forMainWorld(m_page->docume
     nt().frame()); } | 159     ScriptState* scriptState() { return ScriptState::forMainWorld(m_page->docume
     nt().frame()); } | 
| 160 | 160 | 
| 161     void provide(PassOwnPtr<WebServiceWorkerProvider> provider) | 161     void provide(PassOwnPtr<WebServiceWorkerProvider> provider) | 
| 162     { | 162     { | 
| 163         m_page->document().DocumentSupplementable::provideSupplement(ServiceWork
     erContainerClient::supplementName(), ServiceWorkerContainerClient::create(provid
     er)); | 163         m_page->document().WillBeHeapSupplementable<Document>::provideSupplement
     (ServiceWorkerContainerClient::supplementName(), ServiceWorkerContainerClient::c
     reate(provider)); | 
| 164     } | 164     } | 
| 165 | 165 | 
| 166     void setPageURL(const String& url) | 166     void setPageURL(const String& url) | 
| 167     { | 167     { | 
| 168         // For URL completion. | 168         // For URL completion. | 
| 169         m_page->document().setURL(KURL(KURL(), url)); | 169         m_page->document().setURL(KURL(KURL(), url)); | 
| 170 | 170 | 
| 171         // The basis for security checks. | 171         // The basis for security checks. | 
| 172         m_page->document().setSecurityOrigin(SecurityOrigin::createFromString(ur
     l)); | 172         m_page->document().setSecurityOrigin(SecurityOrigin::createFromString(ur
     l)); | 
| 173     } | 173     } | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 347         container->getRegistration(scriptState(), ""); | 347         container->getRegistration(scriptState(), ""); | 
| 348         EXPECT_EQ(1ul, stubProvider.getRegistrationCallCount()); | 348         EXPECT_EQ(1ul, stubProvider.getRegistrationCallCount()); | 
| 349         EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/index.html")), stubPro
     vider.getRegistrationURL()); | 349         EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/index.html")), stubPro
     vider.getRegistrationURL()); | 
| 350     } | 350     } | 
| 351 | 351 | 
| 352     container->willBeDetachedFromFrame(); | 352     container->willBeDetachedFromFrame(); | 
| 353 } | 353 } | 
| 354 | 354 | 
| 355 } // namespace | 355 } // namespace | 
| 356 } // namespace blink | 356 } // namespace blink | 
| OLD | NEW | 
|---|