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

Unified Diff: Source/web/ColorChooserPopupUIController.cpp

Issue 364323002: Embed CSS/JS under Source/web/resources/ as GRD resources (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-treatnullas-emptystring
Patch Set: add missing include Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/SharedBuffer.cpp ('k') | Source/web/DateTimeChooserImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ColorChooserPopupUIController.cpp
diff --git a/Source/web/ColorChooserPopupUIController.cpp b/Source/web/ColorChooserPopupUIController.cpp
index 371bb26d790965a23bb50cf6c27fe7a039eca727..c1682ead93e8751402cfaac25971a464044ea8c6 100644
--- a/Source/web/ColorChooserPopupUIController.cpp
+++ b/Source/web/ColorChooserPopupUIController.cpp
@@ -29,10 +29,9 @@
#include "core/frame/FrameView.h"
#include "platform/ColorChooserClient.h"
#include "platform/geometry/IntRect.h"
+#include "public/platform/Platform.h"
#include "public/web/WebColorChooser.h"
#include "web/ChromeClientImpl.h"
-#include "web/ColorSuggestionPicker.h"
-#include "web/PickerCommon.h"
#include "web/WebViewImpl.h"
using namespace WebCore;
@@ -89,16 +88,16 @@ void ColorChooserPopupUIController::writeDocument(SharedBuffer* data)
IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_client->elementRectRelativeToRootView());
PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
- data->append(pickerCommonCss, sizeof(pickerCommonCss));
- data->append(colorSuggestionPickerCss, sizeof(colorSuggestionPickerCss));
+ data->append(blink::Platform::current()->loadResource("pickerCommon.css"));
+ data->append(blink::Platform::current()->loadResource("colorSuggestionPicker.css"));
PagePopupClient::addString("</style></head><body><div id=main>Loading...</div><script>\n"
"window.dialogArguments = {\n", data);
PagePopupClient::addProperty("values", suggestionValues, data);
PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLocalizedString::OtherColorLabel), data);
addProperty("anchorRectInScreen", anchorRectInScreen, data);
PagePopupClient::addString("};\n", data);
- data->append(pickerCommonJs, sizeof(pickerCommonJs));
- data->append(colorSuggestionPickerJs, sizeof(colorSuggestionPickerJs));
+ data->append(blink::Platform::current()->loadResource("pickerCommon.js"));
+ data->append(blink::Platform::current()->loadResource("colorSuggestionPicker.js"));
PagePopupClient::addString("</script></body>\n", data);
}
« no previous file with comments | « Source/platform/SharedBuffer.cpp ('k') | Source/web/DateTimeChooserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698