| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #include "core/workers/WorkerGlobalScope.h" | 33 #include "core/workers/WorkerGlobalScope.h" |
| 34 #include "public/platform/WebString.h" | 34 #include "public/platform/WebString.h" |
| 35 #include "public/web/WebWorkerContentSettingsClientProxy.h" | 35 #include "public/web/WebWorkerContentSettingsClientProxy.h" |
| 36 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 WorkerContentSettingsClient* WorkerContentSettingsClient::create(PassOwnPtr<WebW
orkerContentSettingsClientProxy> proxy) | 40 WorkerContentSettingsClient* WorkerContentSettingsClient::create(PassOwnPtr<WebW
orkerContentSettingsClientProxy> proxy) |
| 41 { | 41 { |
| 42 return new WorkerContentSettingsClient(proxy); | 42 return new WorkerContentSettingsClient(std::move(proxy)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 WorkerContentSettingsClient::~WorkerContentSettingsClient() | 45 WorkerContentSettingsClient::~WorkerContentSettingsClient() |
| 46 { | 46 { |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool WorkerContentSettingsClient::requestFileSystemAccessSync() | 49 bool WorkerContentSettingsClient::requestFileSystemAccessSync() |
| 50 { | 50 { |
| 51 if (!m_proxy) | 51 if (!m_proxy) |
| 52 return true; | 52 return true; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 WorkerContentSettingsClient* WorkerContentSettingsClient::from(ExecutionContext&
context) | 68 WorkerContentSettingsClient* WorkerContentSettingsClient::from(ExecutionContext&
context) |
| 69 { | 69 { |
| 70 WorkerClients* clients = toWorkerGlobalScope(context).clients(); | 70 WorkerClients* clients = toWorkerGlobalScope(context).clients(); |
| 71 DCHECK(clients); | 71 DCHECK(clients); |
| 72 return static_cast<WorkerContentSettingsClient*>(Supplement<WorkerClients>::
from(*clients, supplementName())); | 72 return static_cast<WorkerContentSettingsClient*>(Supplement<WorkerClients>::
from(*clients, supplementName())); |
| 73 } | 73 } |
| 74 | 74 |
| 75 WorkerContentSettingsClient::WorkerContentSettingsClient(PassOwnPtr<WebWorkerCon
tentSettingsClientProxy> proxy) | 75 WorkerContentSettingsClient::WorkerContentSettingsClient(PassOwnPtr<WebWorkerCon
tentSettingsClientProxy> proxy) |
| 76 : m_proxy(proxy) | 76 : m_proxy(std::move(proxy)) |
| 77 { | 77 { |
| 78 } | 78 } |
| 79 | 79 |
| 80 void provideContentSettingsClientToWorker(WorkerClients* clients, PassOwnPtr<Web
WorkerContentSettingsClientProxy> proxy) | 80 void provideContentSettingsClientToWorker(WorkerClients* clients, PassOwnPtr<Web
WorkerContentSettingsClientProxy> proxy) |
| 81 { | 81 { |
| 82 DCHECK(clients); | 82 DCHECK(clients); |
| 83 WorkerContentSettingsClient::provideTo(*clients, WorkerContentSettingsClient
::supplementName(), WorkerContentSettingsClient::create(proxy)); | 83 WorkerContentSettingsClient::provideTo(*clients, WorkerContentSettingsClient
::supplementName(), WorkerContentSettingsClient::create(std::move(proxy))); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| OLD | NEW |