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

Side by Side Diff: third_party/WebKit/Source/web/WorkerContentSettingsClient.cpp

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 7 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 /* 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | third_party/WebKit/Source/wtf/Functional.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698