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

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

Issue 5996003: Revert "Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/webkit_glue.gypi ('k') | webkit/plugins/npapi/test/npapi_constants.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) 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 17 matching lines...) Expand all
28 #include "grit/webkit_strings.h" 28 #include "grit/webkit_strings.h"
29 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" 29 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h"
30 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" 30 #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
31 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" 31 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h" 32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" 33 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
34 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" 34 #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
37 #include "webkit/glue/media/audio_decoder.h" 37 #include "webkit/glue/media/audio_decoder.h"
38 #include "webkit/glue/plugins/plugin_instance.h" 38 #include "webkit/plugins/npapi/plugin_instance.h"
39 #include "webkit/glue/plugins/webplugininfo.h" 39 #include "webkit/plugins/npapi/webplugininfo.h"
40 #include "webkit/glue/webkit_glue.h" 40 #include "webkit/glue/webkit_glue.h"
41 #include "webkit/glue/websocketstreamhandle_impl.h" 41 #include "webkit/glue/websocketstreamhandle_impl.h"
42 #include "webkit/glue/weburlloader_impl.h" 42 #include "webkit/glue/weburlloader_impl.h"
43 43
44 #if defined(OS_LINUX) 44 #if defined(OS_LINUX)
45 #include "v8/include/v8.h" 45 #include "v8/include/v8.h"
46 #endif 46 #endif
47 47
48 using WebKit::WebAudioBus; 48 using WebKit::WebAudioBus;
49 using WebKit::WebCookie; 49 using WebKit::WebCookie;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() { 218 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() {
219 return new WebSocketStreamHandleImpl(); 219 return new WebSocketStreamHandleImpl();
220 } 220 }
221 221
222 WebString WebKitClientImpl::userAgent(const WebURL& url) { 222 WebString WebKitClientImpl::userAgent(const WebURL& url) {
223 return WebString::fromUTF8(webkit_glue::GetUserAgent(url)); 223 return WebString::fromUTF8(webkit_glue::GetUserAgent(url));
224 } 224 }
225 225
226 void WebKitClientImpl::getPluginList(bool refresh, 226 void WebKitClientImpl::getPluginList(bool refresh,
227 WebPluginListBuilder* builder) { 227 WebPluginListBuilder* builder) {
228 std::vector<WebPluginInfo> plugins; 228 std::vector<webkit::npapi::WebPluginInfo> plugins;
229 GetPlugins(refresh, &plugins); 229 GetPlugins(refresh, &plugins);
230 230
231 for (size_t i = 0; i < plugins.size(); ++i) { 231 for (size_t i = 0; i < plugins.size(); ++i) {
232 const WebPluginInfo& plugin = plugins[i]; 232 const webkit::npapi::WebPluginInfo& plugin = plugins[i];
233 233
234 builder->addPlugin( 234 builder->addPlugin(
235 plugin.name, plugin.desc, 235 plugin.name, plugin.desc,
236 FilePathStringToWebString(plugin.path.BaseName().value())); 236 FilePathStringToWebString(plugin.path.BaseName().value()));
237 237
238 for (size_t j = 0; j < plugin.mime_types.size(); ++j) { 238 for (size_t j = 0; j < plugin.mime_types.size(); ++j) {
239 const WebPluginMimeType& mime_type = plugin.mime_types[j]; 239 const webkit::npapi::WebPluginMimeType& mime_type = plugin.mime_types[j];
240 240
241 builder->addMediaTypeToLastPlugin( 241 builder->addMediaTypeToLastPlugin(
242 WebString::fromUTF8(mime_type.mime_type), mime_type.description); 242 WebString::fromUTF8(mime_type.mime_type), mime_type.description);
243 243
244 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) { 244 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) {
245 builder->addFileExtensionToLastMediaType( 245 builder->addFileExtensionToLastMediaType(
246 UTF8ToUTF16(mime_type.file_extensions[k])); 246 UTF8ToUTF16(mime_type.file_extensions[k]));
247 } 247 }
248 } 248 }
249 } 249 }
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 ++shared_timer_suspended_; 539 ++shared_timer_suspended_;
540 } 540 }
541 541
542 void WebKitClientImpl::ResumeSharedTimer() { 542 void WebKitClientImpl::ResumeSharedTimer() {
543 // The shared timer may have fired or been adjusted while we were suspended. 543 // The shared timer may have fired or been adjusted while we were suspended.
544 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) 544 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning())
545 setSharedTimerFireTime(shared_timer_fire_time_); 545 setSharedTimerFireTime(shared_timer_fire_time_);
546 } 546 }
547 547
548 } // namespace webkit_glue 548 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/npapi/test/npapi_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698