OLD | NEW |
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 }; | 45 }; |
46 | 46 |
47 ColorChooserPopupUIController::ColorChooserPopupUIController( | 47 ColorChooserPopupUIController::ColorChooserPopupUIController( |
48 LocalFrame* frame, | 48 LocalFrame* frame, |
49 ChromeClientImpl* chromeClient, | 49 ChromeClientImpl* chromeClient, |
50 ColorChooserClient* client) | 50 ColorChooserClient* client) |
51 : ColorChooserUIController(frame, client), | 51 : ColorChooserUIController(frame, client), |
52 m_chromeClient(chromeClient), | 52 m_chromeClient(chromeClient), |
53 m_popup(nullptr), | 53 m_popup(nullptr), |
54 m_locale(Locale::defaultLocale()) { | 54 m_locale(Locale::defaultLocale()) { |
55 ThreadState::current()->registerPreFinalizer(this); | |
56 } | 55 } |
57 | 56 |
58 ColorChooserPopupUIController::~ColorChooserPopupUIController() {} | 57 ColorChooserPopupUIController::~ColorChooserPopupUIController() {} |
59 | 58 |
60 void ColorChooserPopupUIController::dispose() { | 59 void ColorChooserPopupUIController::dispose() { |
61 // Finalized earlier so as to access m_chromeClient while alive. | 60 // Finalized earlier so as to access m_chromeClient while alive. |
62 closePopup(); | 61 closePopup(); |
63 // ~ColorChooserUIController calls endChooser(). | 62 // ~ColorChooserUIController calls endChooser(). |
64 } | 63 } |
65 | 64 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 m_popup = m_chromeClient->openPagePopup(this); | 153 m_popup = m_chromeClient->openPagePopup(this); |
155 } | 154 } |
156 | 155 |
157 void ColorChooserPopupUIController::closePopup() { | 156 void ColorChooserPopupUIController::closePopup() { |
158 if (!m_popup) | 157 if (!m_popup) |
159 return; | 158 return; |
160 m_chromeClient->closePagePopup(m_popup); | 159 m_chromeClient->closePagePopup(m_popup); |
161 } | 160 } |
162 | 161 |
163 } // namespace blink | 162 } // namespace blink |
OLD | NEW |