| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 Locale& ColorChooserPopupUIController::locale() | 108 Locale& ColorChooserPopupUIController::locale() |
| 109 { | 109 { |
| 110 return *m_locale; | 110 return *m_locale; |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ColorChooserPopupUIController::setValueAndClosePopup(int numValue, const St
ring& stringValue) | 113 void ColorChooserPopupUIController::setValueAndClosePopup(int numValue, const St
ring& stringValue) |
| 114 { | 114 { |
| 115 ASSERT(m_popup); | 115 ASSERT(m_popup); |
| 116 ASSERT(m_client); | 116 ASSERT(m_client); |
| 117 if (numValue == ColorPickerPopupActionSetValue) | 117 if (numValue == ColorPickerPopupActionSetValue) |
| 118 m_client->didChooseColor(StyleColor(stringValue).color()); | 118 m_client->didChooseColor(Color(stringValue)); |
| 119 if (numValue == ColorPickerPopupActionChooseOtherColor) | 119 if (numValue == ColorPickerPopupActionChooseOtherColor) |
| 120 openColorChooser(); | 120 openColorChooser(); |
| 121 closePopup(); | 121 closePopup(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void ColorChooserPopupUIController::setValue(const String& value) | 124 void ColorChooserPopupUIController::setValue(const String& value) |
| 125 { | 125 { |
| 126 ASSERT(m_client); | 126 ASSERT(m_client); |
| 127 m_client->didChooseColor(StyleColor(value).color()); | 127 m_client->didChooseColor(Color(value)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void ColorChooserPopupUIController::didClosePopup() | 130 void ColorChooserPopupUIController::didClosePopup() |
| 131 { | 131 { |
| 132 m_popup = 0; | 132 m_popup = 0; |
| 133 | 133 |
| 134 if (!m_chooser) | 134 if (!m_chooser) |
| 135 didEndChooser(); | 135 didEndChooser(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 | 138 |
| 139 void ColorChooserPopupUIController::openPopup() | 139 void ColorChooserPopupUIController::openPopup() |
| 140 { | 140 { |
| 141 ASSERT(!m_popup); | 141 ASSERT(!m_popup); |
| 142 m_popup = m_chromeClient->openPagePopup(this, m_client->elementRectRelativeT
oRootView()); | 142 m_popup = m_chromeClient->openPagePopup(this, m_client->elementRectRelativeT
oRootView()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void ColorChooserPopupUIController::closePopup() | 145 void ColorChooserPopupUIController::closePopup() |
| 146 { | 146 { |
| 147 if (!m_popup) | 147 if (!m_popup) |
| 148 return; | 148 return; |
| 149 m_chromeClient->closePagePopup(m_popup); | 149 m_chromeClient->closePagePopup(m_popup); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } | 152 } |
| OLD | NEW |