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

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

Issue 243108: Enable WebSocket in test_shell (Closed)
Patch Set: add +net/socket_stream in webkit/DEPS Created 11 years, 2 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
« no previous file with comments | « webkit/glue/webkitclient_impl.h ('k') | webkit/glue/websocketstreamhandle_bridge.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <math.h> 5 #include <math.h>
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "FrameView.h" 8 #include "FrameView.h"
9 #include "ScrollView.h" 9 #include "ScrollView.h"
10 #include <wtf/Assertions.h> 10 #include <wtf/Assertions.h>
(...skipping 16 matching lines...) Expand all
27 #include "webkit/api/public/WebFrameClient.h" 27 #include "webkit/api/public/WebFrameClient.h"
28 #include "webkit/api/public/WebPluginListBuilder.h" 28 #include "webkit/api/public/WebPluginListBuilder.h"
29 #include "webkit/api/public/WebScreenInfo.h" 29 #include "webkit/api/public/WebScreenInfo.h"
30 #include "webkit/api/public/WebString.h" 30 #include "webkit/api/public/WebString.h"
31 #include "webkit/api/public/WebViewClient.h" 31 #include "webkit/api/public/WebViewClient.h"
32 #include "webkit/glue/chrome_client_impl.h" 32 #include "webkit/glue/chrome_client_impl.h"
33 #include "webkit/glue/glue_util.h" 33 #include "webkit/glue/glue_util.h"
34 #include "webkit/glue/plugins/plugin_instance.h" 34 #include "webkit/glue/plugins/plugin_instance.h"
35 #include "webkit/glue/webkit_glue.h" 35 #include "webkit/glue/webkit_glue.h"
36 #include "webkit/glue/webplugininfo.h" 36 #include "webkit/glue/webplugininfo.h"
37 #include "webkit/glue/websocketstreamhandle_impl.h"
37 #include "webkit/glue/weburlloader_impl.h" 38 #include "webkit/glue/weburlloader_impl.h"
38 #include "webkit/glue/webview_impl.h" 39 #include "webkit/glue/webview_impl.h"
39 #include "webkit/glue/webworkerclient_impl.h" 40 #include "webkit/glue/webworkerclient_impl.h"
40 41
41 using WebKit::WebApplicationCacheHost; 42 using WebKit::WebApplicationCacheHost;
42 using WebKit::WebApplicationCacheHostClient; 43 using WebKit::WebApplicationCacheHostClient;
43 using WebKit::WebCursorInfo; 44 using WebKit::WebCursorInfo;
44 using WebKit::WebData; 45 using WebKit::WebData;
45 using WebKit::WebLocalizedString; 46 using WebKit::WebLocalizedString;
46 using WebKit::WebPluginListBuilder; 47 using WebKit::WebPluginListBuilder;
47 using WebKit::WebStorageNamespace; 48 using WebKit::WebStorageNamespace;
48 using WebKit::WebString; 49 using WebKit::WebString;
50 using WebKit::WebSocketStreamHandle;
49 using WebKit::WebThemeEngine; 51 using WebKit::WebThemeEngine;
50 using WebKit::WebURLLoader; 52 using WebKit::WebURLLoader;
51 using WebKit::WebWidgetClient; 53 using WebKit::WebWidgetClient;
52 54
53 namespace { 55 namespace {
54 56
55 ChromeClientImpl* ToChromeClient(WebCore::Widget* widget) { 57 ChromeClientImpl* ToChromeClient(WebCore::Widget* widget) {
56 WebCore::FrameView* view; 58 WebCore::FrameView* view;
57 if (widget->isFrameView()) { 59 if (widget->isFrameView()) {
58 view = static_cast<WebCore::FrameView*>(widget); 60 view = static_cast<WebCore::FrameView*>(widget);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return &theme_engine_; 149 return &theme_engine_;
148 #else 150 #else
149 return NULL; 151 return NULL;
150 #endif 152 #endif
151 } 153 }
152 154
153 WebURLLoader* WebKitClientImpl::createURLLoader() { 155 WebURLLoader* WebKitClientImpl::createURLLoader() {
154 return new WebURLLoaderImpl(); 156 return new WebURLLoaderImpl();
155 } 157 }
156 158
159 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() {
160 return new WebSocketStreamHandleImpl();
161 }
162
157 void WebKitClientImpl::getPluginList(bool refresh, 163 void WebKitClientImpl::getPluginList(bool refresh,
158 WebPluginListBuilder* builder) { 164 WebPluginListBuilder* builder) {
159 std::vector<WebPluginInfo> plugins; 165 std::vector<WebPluginInfo> plugins;
160 GetPlugins(refresh, &plugins); 166 GetPlugins(refresh, &plugins);
161 167
162 for (size_t i = 0; i < plugins.size(); ++i) { 168 for (size_t i = 0; i < plugins.size(); ++i) {
163 const WebPluginInfo& plugin = plugins[i]; 169 const WebPluginInfo& plugin = plugins[i];
164 170
165 builder->addPlugin( 171 builder->addPlugin(
166 WideToUTF16Hack(plugin.name), 172 WideToUTF16Hack(plugin.name),
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return file_util::DirectoryExists(file_path); 513 return file_util::DirectoryExists(file_path);
508 } 514 }
509 515
510 WebKit::WebURL WebKitClientImpl::filePathToURL(const WebKit::WebString& path) { 516 WebKit::WebURL WebKitClientImpl::filePathToURL(const WebKit::WebString& path) {
511 FilePath file_path(webkit_glue::WebStringToFilePathString(path)); 517 FilePath file_path(webkit_glue::WebStringToFilePathString(path));
512 GURL file_url = net::FilePathToFileURL(file_path); 518 GURL file_url = net::FilePathToFileURL(file_path);
513 return webkit_glue::KURLToWebURL(webkit_glue::GURLToKURL(file_url)); 519 return webkit_glue::KURLToWebURL(webkit_glue::GURLToKURL(file_url));
514 } 520 }
515 521
516 } // namespace webkit_glue 522 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkitclient_impl.h ('k') | webkit/glue/websocketstreamhandle_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698