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

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

Issue 631833002: Move color chooser objects to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Keep ~ColorInputType empty 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 unified diff | Download patch
« no previous file with comments | « Source/web/ColorChooserPopupUIController.h ('k') | Source/web/ColorChooserUIController.h » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 29 matching lines...) Expand all
40 // Keep in sync with Actions in colorSuggestionPicker.js. 40 // Keep in sync with Actions in colorSuggestionPicker.js.
41 enum ColorPickerPopupAction { 41 enum ColorPickerPopupAction {
42 ColorPickerPopupActionChooseOtherColor = -2, 42 ColorPickerPopupActionChooseOtherColor = -2,
43 ColorPickerPopupActionCancel = -1, 43 ColorPickerPopupActionCancel = -1,
44 ColorPickerPopupActionSetValue = 0 44 ColorPickerPopupActionSetValue = 0
45 }; 45 };
46 46
47 ColorChooserPopupUIController::ColorChooserPopupUIController(LocalFrame* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client) 47 ColorChooserPopupUIController::ColorChooserPopupUIController(LocalFrame* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client)
48 : ColorChooserUIController(frame, client) 48 : ColorChooserUIController(frame, client)
49 , m_chromeClient(chromeClient) 49 , m_chromeClient(chromeClient)
50 , m_client(client)
51 , m_popup(0) 50 , m_popup(0)
52 , m_locale(Locale::defaultLocale()) 51 , m_locale(Locale::defaultLocale())
53 { 52 {
54 } 53 }
55 54
56 ColorChooserPopupUIController::~ColorChooserPopupUIController() 55 ColorChooserPopupUIController::~ColorChooserPopupUIController()
57 { 56 {
57 closePopup();
58 // ~ColorChooserUIController ends the ColorChooser.
58 } 59 }
59 60
60 void ColorChooserPopupUIController::openUI() 61 void ColorChooserPopupUIController::openUI()
61 { 62 {
62 if (m_client->shouldShowSuggestions()) 63 if (m_client->shouldShowSuggestions())
63 openPopup(); 64 openPopup();
64 else 65 else
65 openColorChooser(); 66 openColorChooser();
66 } 67 }
67 68
68 void ColorChooserPopupUIController::endChooser() 69 void ColorChooserPopupUIController::endChooser()
69 { 70 {
70 if (m_chooser) 71 if (m_chooser)
71 m_chooser->endChooser(); 72 m_chooser->endChooser();
72 if (m_popup) 73
73 closePopup(); 74 closePopup();
74 } 75 }
75 76
76 AXObject* ColorChooserPopupUIController::rootAXObject() 77 AXObject* ColorChooserPopupUIController::rootAXObject()
77 { 78 {
78 return m_popup ? m_popup->rootAXObject() : 0; 79 return m_popup ? m_popup->rootAXObject() : 0;
79 } 80 }
80 81
81 IntSize ColorChooserPopupUIController::contentSize() 82 IntSize ColorChooserPopupUIController::contentSize()
82 { 83 {
83 return IntSize(0, 0); 84 return IntSize(0, 0);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 151 }
151 152
152 void ColorChooserPopupUIController::closePopup() 153 void ColorChooserPopupUIController::closePopup()
153 { 154 {
154 if (!m_popup) 155 if (!m_popup)
155 return; 156 return;
156 m_chromeClient->closePagePopup(m_popup); 157 m_chromeClient->closePagePopup(m_popup);
157 } 158 }
158 159
159 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ColorChooserPopupUIController.h ('k') | Source/web/ColorChooserUIController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698