| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(m_client->elem
entRectRelativeToViewport()); | 105 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(m_client->elem
entRectRelativeToViewport()); |
| 106 | 106 |
| 107 PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><styl
e>\n", data); | 107 PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><styl
e>\n", data); |
| 108 data->append(Platform::current()->loadResource("pickerCommon.css")); | 108 data->append(Platform::current()->loadResource("pickerCommon.css")); |
| 109 data->append(Platform::current()->loadResource("colorSuggestionPicker.css"))
; | 109 data->append(Platform::current()->loadResource("colorSuggestionPicker.css"))
; |
| 110 PagePopupClient::addString("</style></head><body><div id=main>Loading...</di
v><script>\n" | 110 PagePopupClient::addString("</style></head><body><div id=main>Loading...</di
v><script>\n" |
| 111 "window.dialogArguments = {\n", data); | 111 "window.dialogArguments = {\n", data); |
| 112 PagePopupClient::addProperty("values", suggestionValues, data); | 112 PagePopupClient::addProperty("values", suggestionValues, data); |
| 113 PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLoca
lizedString::OtherColorLabel), data); | 113 PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLoca
lizedString::OtherColorLabel), data); |
| 114 addProperty("anchorRectInScreen", anchorRectInScreen, data); | 114 addProperty("anchorRectInScreen", anchorRectInScreen, data); |
| 115 addProperty("zoomFactor", zoomFactor(), data); |
| 115 PagePopupClient::addString("};\n", data); | 116 PagePopupClient::addString("};\n", data); |
| 116 data->append(Platform::current()->loadResource("pickerCommon.js")); | 117 data->append(Platform::current()->loadResource("pickerCommon.js")); |
| 117 data->append(Platform::current()->loadResource("colorSuggestionPicker.js")); | 118 data->append(Platform::current()->loadResource("colorSuggestionPicker.js")); |
| 118 PagePopupClient::addString("</script></body>\n", data); | 119 PagePopupClient::addString("</script></body>\n", data); |
| 119 } | 120 } |
| 120 | 121 |
| 121 Locale& ColorChooserPopupUIController::locale() | 122 Locale& ColorChooserPopupUIController::locale() |
| 122 { | 123 { |
| 123 return m_locale; | 124 return m_locale; |
| 124 } | 125 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 164 } |
| 164 | 165 |
| 165 void ColorChooserPopupUIController::closePopup() | 166 void ColorChooserPopupUIController::closePopup() |
| 166 { | 167 { |
| 167 if (!m_popup) | 168 if (!m_popup) |
| 168 return; | 169 return; |
| 169 m_chromeClient->closePagePopup(m_popup); | 170 m_chromeClient->closePagePopup(m_popup); |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |