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

Side by Side Diff: Source/web/WebWorkerSettings.cpp

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "WebWorkerSettings.h"
7
8 #include "core/workers/WorkerSettings.h"
9 #include "wtf/OwnPtr.h"
10
11 using namespace WebCore;
12
13 namespace blink {
14
15 WebWorkerSettings WebWorkerSettings::create()
16 {
17 return WebWorkerSettings(WorkerSettings::create());
18 }
19
20 void WebWorkerSettings::assign(const WebWorkerSettings& other)
21 {
22 m_private.reset(PassOwnPtr<WorkerSettings>(other));
23 }
24
25 void WebWorkerSettings::reset()
26 {
27 m_private.reset(0);
28 }
29
30 void WebWorkerSettings::setMemoryInfoEnabled(bool enabled)
31 {
32 m_private->setMemoryInfoEnabled(enabled);
33 }
34
35 WebWorkerSettings::WebWorkerSettings(const PassOwnPtr<WorkerSettings>& settings)
36 : m_private(settings)
37 {
38 }
39
40 WebWorkerSettings::operator PassOwnPtr<WorkerSettings>() const
41 {
42 OwnPtr<WorkerSettings> settings = WorkerSettings::create();
43 settings->setMemoryInfoEnabled(m_private->memoryInfoEnabled());
kinuko 2014/03/10 05:55:52 m_private itself is WorkerSettings, for our usage
Pan 2014/03/10 12:27:52 this method is also used in assign(const WebWorker
kinuko 2014/03/10 13:50:41 I see, I overlooked it. I'd add WorkerSettings::cr
44 return settings.release();
45 }
46
47 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698