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

Side by Side Diff: webkit/glue/plugins/plugin_instance.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/plugins/pepper_var.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | 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) 2006-2008 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "webkit/glue/plugins/plugin_instance.h" 7 #include "webkit/glue/plugins/plugin_instance.h"
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/string_util.h" 11 #include "base/string_number_conversions.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "webkit/glue/webkit_glue.h" 13 #include "webkit/glue/webkit_glue.h"
14 #include "webkit/glue/plugins/plugin_host.h" 14 #include "webkit/glue/plugins/plugin_host.h"
15 #include "webkit/glue/plugins/plugin_lib.h" 15 #include "webkit/glue/plugins/plugin_lib.h"
16 #include "webkit/glue/plugins/plugin_stream_url.h" 16 #include "webkit/glue/plugins/plugin_stream_url.h"
17 #include "webkit/glue/plugins/plugin_string_stream.h" 17 #include "webkit/glue/plugins/plugin_string_stream.h"
18 #include "webkit/glue/plugins/webplugin.h" 18 #include "webkit/glue/plugins/webplugin.h"
19 #include "webkit/glue/plugins/webplugin_delegate.h" 19 #include "webkit/glue/plugins/webplugin_delegate.h"
20 #include "net/base/escape.h" 20 #include "net/base/escape.h"
21 21
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 482 }
483 483
484 void PluginInstance::PopPopupsEnabledState() { 484 void PluginInstance::PopPopupsEnabledState() {
485 popups_enabled_stack_.pop(); 485 popups_enabled_stack_.pop();
486 } 486 }
487 487
488 void PluginInstance::RequestRead(NPStream* stream, NPByteRange* range_list) { 488 void PluginInstance::RequestRead(NPStream* stream, NPByteRange* range_list) {
489 std::string range_info = "bytes="; 489 std::string range_info = "bytes=";
490 490
491 while (range_list) { 491 while (range_list) {
492 range_info += IntToString(range_list->offset); 492 range_info += base::IntToString(range_list->offset);
493 range_info += "-"; 493 range_info.push_back('-');
494 range_info += IntToString(range_list->offset + range_list->length - 1); 494 range_info +=
495 base::IntToString(range_list->offset + range_list->length - 1);
495 range_list = range_list->next; 496 range_list = range_list->next;
496 if (range_list) { 497 if (range_list)
497 range_info += ","; 498 range_info.push_back(',');
498 }
499 } 499 }
500 500
501 if (plugin_data_stream_) { 501 if (plugin_data_stream_) {
502 if (plugin_data_stream_->stream() == stream) { 502 if (plugin_data_stream_->stream() == stream) {
503 webplugin_->CancelDocumentLoad(); 503 webplugin_->CancelDocumentLoad();
504 plugin_data_stream_ = NULL; 504 plugin_data_stream_ = NULL;
505 } 505 }
506 } 506 }
507 507
508 // The lifetime of a NPStream instance depends on the PluginStream instance 508 // The lifetime of a NPStream instance depends on the PluginStream instance
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 *notify = true; 623 *notify = true;
624 *notify_data = iter->second; 624 *notify_data = iter->second;
625 pending_requests_.erase(iter); 625 pending_requests_.erase(iter);
626 } else { 626 } else {
627 *notify = false; 627 *notify = false;
628 *notify_data = NULL; 628 *notify_data = NULL;
629 } 629 }
630 } 630 }
631 631
632 } // namespace NPAPI 632 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_var.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698