Chromium Code Reviews

Side by Side Diff: Source/web/ColorChooserPopupUIController.h

Issue 631833002: Move color chooser objects to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Safer finalization Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 18 matching lines...)
29 #include "core/page/PagePopupClient.h" 29 #include "core/page/PagePopupClient.h"
30 #include "web/ColorChooserUIController.h" 30 #include "web/ColorChooserUIController.h"
31 #include "wtf/OwnPtr.h" 31 #include "wtf/OwnPtr.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class ChromeClientImpl; 35 class ChromeClientImpl;
36 class ColorChooserClient; 36 class ColorChooserClient;
37 class PagePopup; 37 class PagePopup;
38 38
39 class ColorChooserPopupUIController FINAL : public ColorChooserUIController, pub lic PagePopupClient { 39 class ColorChooserPopupUIController final : public ColorChooserUIController, pub lic PagePopupClient {
40 40
41 public: 41 public:
42 ColorChooserPopupUIController(LocalFrame*, ChromeClientImpl*, ColorChooserCl ient*); 42 static PassOwnPtrWillBeRawPtr<ColorChooserPopupUIController> create(LocalFra me* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client)
43 {
44 return adoptPtrWillBeNoop(new ColorChooserPopupUIController(frame, chrom eClient, client));
45 }
46
43 virtual ~ColorChooserPopupUIController(); 47 virtual ~ColorChooserPopupUIController();
48 virtual void trace(Visitor*) override;
44 49
45 // ColorChooserUIController functions: 50 // ColorChooserUIController functions:
46 virtual void openUI() OVERRIDE; 51 virtual void openUI() override;
47 52
48 // ColorChooser functions 53 // ColorChooser functions
49 virtual void endChooser() OVERRIDE; 54 virtual void endChooser() override;
50 virtual AXObject* rootAXObject() OVERRIDE; 55 virtual AXObject* rootAXObject() override;
51 56
52 // PagePopupClient functions: 57 // PagePopupClient functions:
53 virtual IntSize contentSize() OVERRIDE; 58 virtual IntSize contentSize() override;
54 virtual void writeDocument(SharedBuffer*) OVERRIDE; 59 virtual void writeDocument(SharedBuffer*) override;
55 virtual Locale& locale() OVERRIDE; 60 virtual Locale& locale() override;
56 virtual void setValueAndClosePopup(int, const String&) OVERRIDE; 61 virtual void setValueAndClosePopup(int, const String&) override;
57 virtual void setValue(const String&) OVERRIDE; 62 virtual void setValue(const String&) override;
58 virtual void closePopup() OVERRIDE; 63 virtual void closePopup() override;
59 virtual Element& ownerElement() OVERRIDE; 64 virtual Element& ownerElement() override;
60 virtual void didClosePopup() OVERRIDE; 65 virtual void didClosePopup() override;
61 66
62 private: 67 private:
68 ColorChooserPopupUIController(LocalFrame*, ChromeClientImpl*, ColorChooserCl ient*);
69
63 void openPopup(); 70 void openPopup();
64 71
65 ChromeClientImpl* m_chromeClient; 72 ChromeClientImpl* m_chromeClient;
66 ColorChooserClient* m_client; 73 RawPtrWillBeMember<ColorChooserClient> m_client;
sof 2014/10/07 07:59:22 Wait a sec, this is redundant - the UIController p
67 PagePopup* m_popup; 74 PagePopup* m_popup;
68 Locale& m_locale; 75 Locale& m_locale;
69 }; 76 };
70 77
71 } 78 } // namespace blink
72 79
73 #endif // ColorChooserPopupUIController_h 80 #endif // ColorChooserPopupUIController_h
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »

Powered by Google App Engine