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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl_win.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/plugin_list_win.cc ('k') | webkit/glue/webkitclient_impl.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 "webkit/glue/plugins/webplugin_delegate_impl.h" 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/iat_patch.h" 12 #include "base/iat_patch.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/registry.h" 15 #include "base/registry.h"
16 #include "base/scoped_ptr.h" 16 #include "base/scoped_ptr.h"
17 #include "base/stats_counters.h" 17 #include "base/stats_counters.h"
18 #include "base/string_number_conversions.h"
18 #include "base/string_util.h" 19 #include "base/string_util.h"
19 #include "base/win_util.h" 20 #include "base/win_util.h"
20 #include "skia/ext/platform_canvas.h" 21 #include "skia/ext/platform_canvas.h"
21 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" 22 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
22 #include "webkit/glue/plugins/default_plugin_shared.h" 23 #include "webkit/glue/plugins/default_plugin_shared.h"
23 #include "webkit/glue/plugins/plugin_constants_win.h" 24 #include "webkit/glue/plugins/plugin_constants_win.h"
24 #include "webkit/glue/plugins/plugin_instance.h" 25 #include "webkit/glue/plugins/plugin_instance.h"
25 #include "webkit/glue/plugins/plugin_lib.h" 26 #include "webkit/glue/plugins/plugin_lib.h"
26 #include "webkit/glue/plugins/plugin_list.h" 27 #include "webkit/glue/plugins/plugin_list.h"
27 #include "webkit/glue/plugins/plugin_stream_url.h" 28 #include "webkit/glue/plugins/plugin_stream_url.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 instance_->set_use_mozilla_user_agent(); 279 instance_->set_use_mozilla_user_agent();
279 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE; 280 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE;
280 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR; 281 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR;
281 quirks_ |= PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS; 282 quirks_ |= PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS;
282 quirks_ |= PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE; 283 quirks_ |= PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE;
283 } else if (filename == kAcrobatReaderPlugin) { 284 } else if (filename == kAcrobatReaderPlugin) {
284 // Check for the version number above or equal 9. 285 // Check for the version number above or equal 9.
285 std::vector<std::wstring> version; 286 std::vector<std::wstring> version;
286 SplitString(plugin_info.version, L'.', &version); 287 SplitString(plugin_info.version, L'.', &version);
287 if (version.size() > 0) { 288 if (version.size() > 0) {
288 int major = static_cast<int>(StringToInt64(version[0])); 289 int major;
290 base::StringToInt(version[0], &major);
289 if (major >= 9) { 291 if (major >= 9) {
290 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD; 292 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD;
291 293
292 // 9.2 needs this. 294 // 9.2 needs this.
293 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; 295 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE;
294 } 296 }
295 } 297 }
296 quirks_ |= PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS; 298 quirks_ |= PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS;
297 } else if (plugin_info.name.find(L"Windows Media Player") != 299 } else if (plugin_info.name.find(L"Windows Media Player") !=
298 std::wstring::npos) { 300 std::wstring::npos) {
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 case WM_LBUTTONUP: 1390 case WM_LBUTTONUP:
1389 case WM_MBUTTONUP: 1391 case WM_MBUTTONUP:
1390 case WM_RBUTTONUP: 1392 case WM_RBUTTONUP:
1391 ::ReleaseCapture(); 1393 ::ReleaseCapture();
1392 break; 1394 break;
1393 1395
1394 default: 1396 default:
1395 break; 1397 break;
1396 } 1398 }
1397 } 1399 }
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_list_win.cc ('k') | webkit/glue/webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698