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

Unified Diff: Source/core/workers/WorkerSettings.h

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, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/workers/WorkerSettings.h
diff --git a/Source/platform/graphics/DisplayList.h b/Source/core/workers/WorkerSettings.h
similarity index 66%
copy from Source/platform/graphics/DisplayList.h
copy to Source/core/workers/WorkerSettings.h
index ca745e5b5ff971b820a46744953ac235c1c1c2d9..376b0099d7c03e45d88eaedececfbfc2505b5a02 100644
--- a/Source/platform/graphics/DisplayList.h
+++ b/Source/core/workers/WorkerSettings.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
kinuko 2014/03/10 13:50:41 Can we use the common chromium copyright for newer
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -11,7 +11,7 @@
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Google Inc. nor the names of its
+ * * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -28,34 +28,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DisplayList_h
-#define DisplayList_h
+#ifndef WorkerSettings_h
+#define WorkerSettings_h
-#include "platform/geometry/FloatRect.h"
-
-#include "wtf/FastAllocBase.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
-
-class SkPicture;
namespace WebCore {
-class PLATFORM_EXPORT DisplayList FINAL : public WTF::RefCounted<DisplayList> {
+class Settings;
+
+class WorkerSettings {
kinuko 2014/03/10 05:55:52 Can we have a class comment for this?
WTF_MAKE_FAST_ALLOCATED;
- WTF_MAKE_NONCOPYABLE(DisplayList);
public:
- DisplayList(const FloatRect&);
- ~DisplayList();
+ static PassOwnPtr<WorkerSettings> create() { return adoptPtr(new WorkerSettings); }
+ static PassOwnPtr<WorkerSettings> create(Settings* settings) { return adoptPtr(new WorkerSettings(settings)); }
- const FloatRect& bounds() const;
- SkPicture* picture() const;
+ void setMemoryInfoEnabled(bool memoryInfoEnabled) { m_memoryInfoEnabled = memoryInfoEnabled; }
+ bool memoryInfoEnabled() const { return m_memoryInfoEnabled; }
private:
- FloatRect m_bounds;
- RefPtr<SkPicture> m_picture;
+ WorkerSettings() : m_memoryInfoEnabled(false) { }
+ WorkerSettings(Settings*);
kinuko 2014/03/10 05:55:52 explicit
+
+ bool m_memoryInfoEnabled;
};
-}
+} // namespace WebCore
-#endif // DisplayList_h
+#endif // WorkerSettings_h

Powered by Google App Engine
This is Rietveld 408576698