OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file provides the embedder's side of random webkit glue functions. | 5 // This file provides the embedder's side of random webkit glue functions. |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 184 } |
185 | 185 |
186 uint64 ClipboardGetSequenceNumber() { | 186 uint64 ClipboardGetSequenceNumber() { |
187 uint64 seq_num = 0; | 187 uint64 seq_num = 0; |
188 RenderThread::current()->Send( | 188 RenderThread::current()->Send( |
189 new ClipboardHostMsg_GetSequenceNumber(&seq_num)); | 189 new ClipboardHostMsg_GetSequenceNumber(&seq_num)); |
190 return seq_num; | 190 return seq_num; |
191 } | 191 } |
192 | 192 |
193 void GetPlugins(bool refresh, | 193 void GetPlugins(bool refresh, |
194 std::vector<webkit::npapi::WebPluginInfo>* plugins) { | 194 std::vector<webkit::WebPluginInfo>* plugins) { |
195 if (!RenderThread::current()->plugin_refresh_allowed()) | 195 if (!RenderThread::current()->plugin_refresh_allowed()) |
196 refresh = false; | 196 refresh = false; |
197 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); | 197 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); |
198 } | 198 } |
199 | 199 |
200 bool IsProtocolSupportedForMedia(const GURL& url) { | 200 bool IsProtocolSupportedForMedia(const GURL& url) { |
201 // If new protocol is to be added here, we need to make sure the response is | 201 // If new protocol is to be added here, we need to make sure the response is |
202 // validated accordingly in the media engine. | 202 // validated accordingly in the media engine. |
203 if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || | 203 if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || |
204 url.SchemeIs(chrome::kHttpsScheme) || | 204 url.SchemeIs(chrome::kHttpsScheme) || |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 base::StringPiece GetDataResource(int resource_id) { | 287 base::StringPiece GetDataResource(int resource_id) { |
288 return content::GetContentClient()->GetDataResource(resource_id); | 288 return content::GetContentClient()->GetDataResource(resource_id); |
289 } | 289 } |
290 | 290 |
291 std::string BuildUserAgent(bool mimic_windows) { | 291 std::string BuildUserAgent(bool mimic_windows) { |
292 return content::GetContentClient()->GetUserAgent(mimic_windows); | 292 return content::GetContentClient()->GetUserAgent(mimic_windows); |
293 } | 293 } |
294 | 294 |
295 } // namespace webkit_glue | 295 } // namespace webkit_glue |
OLD | NEW |