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

Side by Side Diff: third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp

Issue 2868173002: Add PlatformLocalFrame class. (Closed)
Patch Set: this time with new file included Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 AXObject* ColorChooserPopupUIController::RootAXObject() { 82 AXObject* ColorChooserPopupUIController::RootAXObject() {
83 return popup_ ? popup_->RootAXObject() : nullptr; 83 return popup_ ? popup_->RootAXObject() : nullptr;
84 } 84 }
85 85
86 void ColorChooserPopupUIController::WriteDocument(SharedBuffer* data) { 86 void ColorChooserPopupUIController::WriteDocument(SharedBuffer* data) {
87 Vector<ColorSuggestion> suggestions = client_->Suggestions(); 87 Vector<ColorSuggestion> suggestions = client_->Suggestions();
88 Vector<String> suggestion_values; 88 Vector<String> suggestion_values;
89 for (unsigned i = 0; i < suggestions.size(); i++) 89 for (unsigned i = 0; i < suggestions.size(); i++)
90 suggestion_values.push_back(suggestions[i].color.Serialized()); 90 suggestion_values.push_back(suggestions[i].color.Serialized());
91 IntRect anchor_rect_in_screen = chrome_client_->ViewportToScreen( 91 IntRect anchor_rect_in_screen = chrome_client_->ViewportToScreen(
92 client_->ElementRectRelativeToViewport(), frame_->View()); 92 client_->ElementRectRelativeToViewport(), frame_);
93 93
94 PagePopupClient::AddString( 94 PagePopupClient::AddString(
95 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); 95 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
96 data->Append(Platform::Current()->LoadResource("pickerCommon.css")); 96 data->Append(Platform::Current()->LoadResource("pickerCommon.css"));
97 data->Append(Platform::Current()->LoadResource("colorSuggestionPicker.css")); 97 data->Append(Platform::Current()->LoadResource("colorSuggestionPicker.css"));
98 PagePopupClient::AddString( 98 PagePopupClient::AddString(
99 "</style></head><body><div id=main>Loading...</div><script>\n" 99 "</style></head><body><div id=main>Loading...</div><script>\n"
100 "window.dialogArguments = {\n", 100 "window.dialogArguments = {\n",
101 data); 101 data);
102 PagePopupClient::AddProperty("values", suggestion_values, data); 102 PagePopupClient::AddProperty("values", suggestion_values, data);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 popup_ = chrome_client_->OpenPagePopup(this); 151 popup_ = chrome_client_->OpenPagePopup(this);
152 } 152 }
153 153
154 void ColorChooserPopupUIController::ClosePopup() { 154 void ColorChooserPopupUIController::ClosePopup() {
155 if (!popup_) 155 if (!popup_)
156 return; 156 return;
157 chrome_client_->ClosePagePopup(popup_); 157 chrome_client_->ClosePagePopup(popup_);
158 } 158 }
159 159
160 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/InspectorOverlayAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698