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

Unified Diff: Source/web/ColorChooserUIController.h

Issue 631833002: Move color chooser objects to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make ColorChooserUIController::m_client protected, not private Created 6 years, 2 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/web/ColorChooserUIController.h
diff --git a/Source/web/ColorChooserUIController.h b/Source/web/ColorChooserUIController.h
index a676e5f3dd15b5cec2567a98a202f6403d6a3405..e4ea885fd62b47c89472ed566aac8cf0a1494cbb 100644
--- a/Source/web/ColorChooserUIController.h
+++ b/Source/web/ColorChooserUIController.h
@@ -27,6 +27,7 @@
#define ColorChooserUIController_h
#include "core/html/forms/ColorChooser.h"
+#include "platform/heap/Handle.h"
#include "platform/text/PlatformLocale.h"
#include "public/web/WebColorChooserClient.h"
#include "wtf/OwnPtr.h"
@@ -37,10 +38,16 @@ class ColorChooserClient;
class LocalFrame;
class WebColorChooser;
-class ColorChooserUIController : public WebColorChooserClient, public ColorChooser {
+class ColorChooserUIController : public NoBaseWillBeGarbageCollectedFinalized<ColorChooserUIController>, public WebColorChooserClient, public ColorChooser {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ColorChooserUIController);
public:
- ColorChooserUIController(LocalFrame*, ColorChooserClient*);
+ static PassOwnPtrWillBeRawPtr<ColorChooserUIController> create(LocalFrame* frame, ColorChooserClient* client)
+ {
+ return adoptPtrWillBeNoop(new ColorChooserUIController(frame, client));
+ }
+
virtual ~ColorChooserUIController();
+ virtual void trace(Visitor*);
virtual void openUI();
@@ -54,14 +61,16 @@ public:
virtual void didEndChooser() OVERRIDE FINAL;
protected:
+ ColorChooserUIController(LocalFrame*, ColorChooserClient*);
+
void openColorChooser();
OwnPtr<WebColorChooser> m_chooser;
+ RawPtrWillBeMember<ColorChooserClient> m_client;
private:
- LocalFrame* m_frame;
- ColorChooserClient* m_client;
+ RawPtrWillBeMember<LocalFrame> m_frame;
};
-}
+} // namespace blink
#endif // ColorChooserUIController_h

Powered by Google App Engine
This is Rietveld 408576698