| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 : ColorChooserUIController(frame, client) | 48 : ColorChooserUIController(frame, client) |
| 49 , m_chromeClient(chromeClient) | 49 , m_chromeClient(chromeClient) |
| 50 , m_client(client) | 50 , m_client(client) |
| 51 , m_popup(0) | 51 , m_popup(0) |
| 52 , m_locale(Locale::defaultLocale()) | 52 , m_locale(Locale::defaultLocale()) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 | 55 |
| 56 ColorChooserPopupUIController::~ColorChooserPopupUIController() | 56 ColorChooserPopupUIController::~ColorChooserPopupUIController() |
| 57 { | 57 { |
| 58 closePopup(); |
| 59 // ~ColorChooserUIController ends the ColorChooser. |
| 60 } |
| 61 |
| 62 void ColorChooserPopupUIController::trace(Visitor* visitor) |
| 63 { |
| 64 visitor->trace(m_client); |
| 65 ColorChooserUIController::trace(visitor); |
| 58 } | 66 } |
| 59 | 67 |
| 60 void ColorChooserPopupUIController::openUI() | 68 void ColorChooserPopupUIController::openUI() |
| 61 { | 69 { |
| 62 if (m_client->shouldShowSuggestions()) | 70 if (m_client->shouldShowSuggestions()) |
| 63 openPopup(); | 71 openPopup(); |
| 64 else | 72 else |
| 65 openColorChooser(); | 73 openColorChooser(); |
| 66 } | 74 } |
| 67 | 75 |
| 68 void ColorChooserPopupUIController::endChooser() | 76 void ColorChooserPopupUIController::endChooser() |
| 69 { | 77 { |
| 70 if (m_chooser) | 78 if (m_chooser) |
| 71 m_chooser->endChooser(); | 79 m_chooser->endChooser(); |
| 72 if (m_popup) | 80 |
| 73 closePopup(); | 81 closePopup(); |
| 74 } | 82 } |
| 75 | 83 |
| 76 AXObject* ColorChooserPopupUIController::rootAXObject() | 84 AXObject* ColorChooserPopupUIController::rootAXObject() |
| 77 { | 85 { |
| 78 return m_popup ? m_popup->rootAXObject() : 0; | 86 return m_popup ? m_popup->rootAXObject() : 0; |
| 79 } | 87 } |
| 80 | 88 |
| 81 IntSize ColorChooserPopupUIController::contentSize() | 89 IntSize ColorChooserPopupUIController::contentSize() |
| 82 { | 90 { |
| 83 return IntSize(0, 0); | 91 return IntSize(0, 0); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 158 } |
| 151 | 159 |
| 152 void ColorChooserPopupUIController::closePopup() | 160 void ColorChooserPopupUIController::closePopup() |
| 153 { | 161 { |
| 154 if (!m_popup) | 162 if (!m_popup) |
| 155 return; | 163 return; |
| 156 m_chromeClient->closePagePopup(m_popup); | 164 m_chromeClient->closePagePopup(m_popup); |
| 157 } | 165 } |
| 158 | 166 |
| 159 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |