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

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

Issue 2896: This CB fixes the following issues:-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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/webplugin_delegate_impl.h ('k') | webkit/glue/webplugin.h » ('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) 2006-2008 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 "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/gfx/point.h" 9 #include "base/gfx/point.h"
10 #include "base/stats_counters.h" 10 #include "base/stats_counters.h"
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 cursor_index++) { 995 cursor_index++) {
996 if (cursor == standard_cursors[cursor_index]) 996 if (cursor == standard_cursors[cursor_index])
997 return static_cast<WebCursor::Type>(cursor_index); 997 return static_cast<WebCursor::Type>(cursor_index);
998 } 998 }
999 999
1000 return WebCursor::ARROW; 1000 return WebCursor::ARROW;
1001 } 1001 }
1002 1002
1003 WebPluginResourceClient* WebPluginDelegateImpl::CreateResourceClient( 1003 WebPluginResourceClient* WebPluginDelegateImpl::CreateResourceClient(
1004 int resource_id, const std::string &url, bool notify_needed, 1004 int resource_id, const std::string &url, bool notify_needed,
1005 void *notify_data) { 1005 void *notify_data, void* existing_stream) {
1006 // Stream already exists. This typically happens for range requests
1007 // initiated via NPN_RequestRead.
1008 if (existing_stream) {
1009 NPAPI::PluginStream* plugin_stream =
1010 reinterpret_cast<NPAPI::PluginStream*>(existing_stream);
1011
1012 plugin_stream->CancelRequest();
1013
1014 return plugin_stream->AsResourceClient();
1015 }
1016
1006 if (notify_needed) { 1017 if (notify_needed) {
1007 instance()->SetURLLoadData(GURL(url.c_str()), notify_data); 1018 instance()->SetURLLoadData(GURL(url.c_str()), notify_data);
1008 } 1019 }
1009 std::string mime_type; 1020 std::string mime_type;
1010 NPAPI::PluginStreamUrl *stream = instance()->CreateStream(resource_id, 1021 NPAPI::PluginStreamUrl *stream = instance()->CreateStream(resource_id,
1011 url, 1022 url,
1012 mime_type, 1023 mime_type,
1013 notify_needed, 1024 notify_needed,
1014 notify_data); 1025 notify_data);
1015 return stream; 1026 return stream;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1063 }
1053 1064
1054 return false; 1065 return false;
1055 } 1066 }
1056 1067
1057 void WebPluginDelegateImpl::OnUserGestureEnd() { 1068 void WebPluginDelegateImpl::OnUserGestureEnd() {
1058 user_gesture_message_posted_ = false; 1069 user_gesture_message_posted_ = false;
1059 instance()->PopPopupsEnabledState(); 1070 instance()->PopPopupsEnabledState();
1060 } 1071 }
1061 1072
OLDNEW
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl.h ('k') | webkit/glue/webplugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698