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

Side by Side Diff: webkit/glue/webkitclient_impl.cc

Issue 2941004: Minor cleanup of a couple files:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webcursor_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webkitclient_impl.h" 5 #include "webkit/glue/webkitclient_impl.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <malloc.h> 8 #include <malloc.h>
9 #endif 9 #endif
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void WebKitClientImpl::traceEventEnd(const char* name, void* id, 227 void WebKitClientImpl::traceEventEnd(const char* name, void* id,
228 const char* extra) { 228 const char* extra) {
229 TRACE_EVENT_END(name, id, extra); 229 TRACE_EVENT_END(name, id, extra);
230 } 230 }
231 231
232 WebData WebKitClientImpl::loadResource(const char* name) { 232 WebData WebKitClientImpl::loadResource(const char* name) {
233 struct { 233 struct {
234 const char* name; 234 const char* name;
235 int id; 235 int id;
236 } resources[] = { 236 } resources[] = {
237 { "textAreaResizeCorner", IDR_TEXTAREA_RESIZER },
238 { "missingImage", IDR_BROKENIMAGE }, 237 { "missingImage", IDR_BROKENIMAGE },
239 { "tickmarkDash", IDR_TICKMARK_DASH }, 238 { "mediaPause", IDR_MEDIA_PAUSE_BUTTON },
239 { "mediaPlay", IDR_MEDIA_PLAY_BUTTON },
240 { "mediaPlayDisabled", IDR_MEDIA_PLAY_BUTTON_DISABLED },
241 { "mediaSoundDisabled", IDR_MEDIA_SOUND_DISABLED },
242 { "mediaSoundFull", IDR_MEDIA_SOUND_FULL_BUTTON },
243 { "mediaSoundNone", IDR_MEDIA_SOUND_NONE_BUTTON },
244 { "mediaSliderThumb", IDR_MEDIA_SLIDER_THUMB },
245 { "mediaVolumeSliderThumb", IDR_MEDIA_VOLUME_SLIDER_THUMB },
240 { "panIcon", IDR_PAN_SCROLL_ICON }, 246 { "panIcon", IDR_PAN_SCROLL_ICON },
241 { "searchCancel", IDR_SEARCH_CANCEL }, 247 { "searchCancel", IDR_SEARCH_CANCEL },
242 { "searchCancelPressed", IDR_SEARCH_CANCEL_PRESSED }, 248 { "searchCancelPressed", IDR_SEARCH_CANCEL_PRESSED },
243 { "searchMagnifier", IDR_SEARCH_MAGNIFIER }, 249 { "searchMagnifier", IDR_SEARCH_MAGNIFIER },
244 { "searchMagnifierResults", IDR_SEARCH_MAGNIFIER_RESULTS }, 250 { "searchMagnifierResults", IDR_SEARCH_MAGNIFIER_RESULTS },
245 { "mediaPlay", IDR_MEDIA_PLAY_BUTTON }, 251 { "textAreaResizeCorner", IDR_TEXTAREA_RESIZER },
246 { "mediaPlayDisabled", IDR_MEDIA_PLAY_BUTTON_DISABLED }, 252 { "tickmarkDash", IDR_TICKMARK_DASH },
247 { "mediaPause", IDR_MEDIA_PAUSE_BUTTON },
248 { "mediaSoundFull", IDR_MEDIA_SOUND_FULL_BUTTON },
249 { "mediaSoundNone", IDR_MEDIA_SOUND_NONE_BUTTON },
250 { "mediaSoundDisabled", IDR_MEDIA_SOUND_DISABLED },
251 { "mediaSliderThumb", IDR_MEDIA_SLIDER_THUMB },
252 { "mediaVolumeSliderThumb", IDR_MEDIA_VOLUME_SLIDER_THUMB },
253 #if defined(OS_POSIX) && !defined(OS_MACOSX) 253 #if defined(OS_POSIX) && !defined(OS_MACOSX)
254 // TODO(port): rename these to "skia" instead of "Linux". 254 // TODO(port): rename these to "skia" instead of "Linux".
255 { "linuxCheckboxDisabledIndeterminate",
256 IDR_LINUX_CHECKBOX_DISABLED_INDETERMINATE },
257 { "linuxCheckboxDisabledOff", IDR_LINUX_CHECKBOX_DISABLED_OFF },
258 { "linuxCheckboxDisabledOn", IDR_LINUX_CHECKBOX_DISABLED_ON },
259 { "linuxCheckboxIndeterminate", IDR_LINUX_CHECKBOX_INDETERMINATE },
255 { "linuxCheckboxOff", IDR_LINUX_CHECKBOX_OFF }, 260 { "linuxCheckboxOff", IDR_LINUX_CHECKBOX_OFF },
256 { "linuxCheckboxOn", IDR_LINUX_CHECKBOX_ON }, 261 { "linuxCheckboxOn", IDR_LINUX_CHECKBOX_ON },
257 { "linuxCheckboxIndeterminate", IDR_LINUX_CHECKBOX_INDETERMINATE }, 262 { "linuxRadioDisabledOff", IDR_LINUX_RADIO_DISABLED_OFF },
258 { "linuxCheckboxDisabledOff", IDR_LINUX_CHECKBOX_DISABLED_OFF }, 263 { "linuxRadioDisabledOn", IDR_LINUX_RADIO_DISABLED_ON },
259 { "linuxCheckboxDisabledOn", IDR_LINUX_CHECKBOX_DISABLED_ON },
260 { "linuxCheckboxDisabledIndeterminate",
261 IDR_LINUX_CHECKBOX_DISABLED_INDETERMINATE },
262 { "linuxRadioOff", IDR_LINUX_RADIO_OFF }, 264 { "linuxRadioOff", IDR_LINUX_RADIO_OFF },
263 { "linuxRadioOn", IDR_LINUX_RADIO_ON }, 265 { "linuxRadioOn", IDR_LINUX_RADIO_ON },
264 { "linuxRadioDisabledOff", IDR_LINUX_RADIO_DISABLED_OFF },
265 { "linuxRadioDisabledOn", IDR_LINUX_RADIO_DISABLED_ON },
266 { "linuxProgressBar", IDR_PROGRESS_BAR }, 266 { "linuxProgressBar", IDR_PROGRESS_BAR },
267 { "linuxProgressValue", IDR_PROGRESS_VALUE },
268 { "linuxProgressBorderLeft", IDR_PROGRESS_BORDER_LEFT }, 267 { "linuxProgressBorderLeft", IDR_PROGRESS_BORDER_LEFT },
269 { "linuxProgressBorderRight", IDR_PROGRESS_BORDER_RIGHT }, 268 { "linuxProgressBorderRight", IDR_PROGRESS_BORDER_RIGHT },
269 { "linuxProgressValue", IDR_PROGRESS_VALUE },
270 #endif 270 #endif
271 }; 271 };
272 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { 272 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) {
273 if (!strcmp(name, resources[i].name)) { 273 if (!strcmp(name, resources[i].name)) {
274 base::StringPiece resource = GetDataResource(resources[i].id); 274 base::StringPiece resource = GetDataResource(resources[i].id);
275 return WebData(resource.data(), resource.size()); 275 return WebData(resource.data(), resource.size());
276 } 276 }
277 } 277 }
278 NOTREACHED() << "Unknown image resource " << name; 278 NOTREACHED() << "Unknown image resource " << name;
279 return WebData(); 279 return WebData();
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 ++shared_timer_suspended_; 428 ++shared_timer_suspended_;
429 } 429 }
430 430
431 void WebKitClientImpl::ResumeSharedTimer() { 431 void WebKitClientImpl::ResumeSharedTimer() {
432 // The shared timer may have fired or been adjusted while we were suspended. 432 // The shared timer may have fired or been adjusted while we were suspended.
433 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) 433 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning())
434 setSharedTimerFireTime(shared_timer_fire_time_); 434 setSharedTimerFireTime(shared_timer_fire_time_);
435 } 435 }
436 436
437 } // namespace webkit_glue 437 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webcursor_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698