Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/renderer/shared_worker/embedded_shared_worker_stub.h" 5 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool isControlledByServiceWorker() override { 100 bool isControlledByServiceWorker() override {
101 return provider_->IsControlledByServiceWorker(); 101 return provider_->IsControlledByServiceWorker();
102 } 102 }
103 103
104 int64_t serviceWorkerID() override { 104 int64_t serviceWorkerID() override {
105 if (provider_->context()->controller()) 105 if (provider_->context()->controller())
106 return provider_->context()->controller()->version_id(); 106 return provider_->context()->controller()->version_id();
107 return kInvalidServiceWorkerVersionId; 107 return kInvalidServiceWorkerVersionId;
108 } 108 }
109 109
110 int providerID() override { return provider_->provider_id(); }
111
110 private: 112 private:
111 std::unique_ptr<ServiceWorkerNetworkProvider> provider_; 113 std::unique_ptr<ServiceWorkerNetworkProvider> provider_;
112 const bool is_secure_context_; 114 const bool is_secure_context_;
113 }; 115 };
114 116
115 } // namespace 117 } // namespace
116 118
117 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub( 119 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub(
118 const GURL& url, 120 const GURL& url,
119 const base::string16& name, 121 const base::string16& name,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 287 }
286 } 288 }
287 289
288 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { 290 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() {
289 // After this we wouldn't get any IPC for this stub. 291 // After this we wouldn't get any IPC for this stub.
290 running_ = false; 292 running_ = false;
291 impl_->terminateWorkerContext(); 293 impl_->terminateWorkerContext();
292 } 294 }
293 295
294 } // namespace content 296 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698