| 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 #include "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <objidl.h> | 8 #include <objidl.h> |
| 9 #include <mlang.h> | 9 #include <mlang.h> |
| 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 bool IsMicrosoftSiteThatNeedsSpoofingForSilverlight(const GURL& url) { | 387 bool IsMicrosoftSiteThatNeedsSpoofingForSilverlight(const GURL& url) { |
| 388 #if defined(OS_MACOSX) | 388 #if defined(OS_MACOSX) |
| 389 // The landing page for updating Silverlight gives a confusing experience | 389 // The landing page for updating Silverlight gives a confusing experience |
| 390 // in browsers that Silverlight doesn't officially support; spoof as | 390 // in browsers that Silverlight doesn't officially support; spoof as |
| 391 // Safari to reduce the chance that users won't complete updates. | 391 // Safari to reduce the chance that users won't complete updates. |
| 392 // Should be removed if the sniffing is removed: http://crbug.com/88211 | 392 // Should be removed if the sniffing is removed: http://crbug.com/88211 |
| 393 if (url.host() == "www.microsoft.com" && | 393 if (url.host() == "www.microsoft.com" && |
| 394 StartsWithASCII(url.path(), "/getsilverlight", false)) { | 394 StartsWithASCII(url.path(), "/getsilverlight", false)) { |
| 395 return true; | 395 return true; |
| 396 } | 396 } |
| 397 if (url.spec() == "http://go.microsoft.com/fwlink/?LinkID=149156") |
| 398 return true; |
| 397 #endif | 399 #endif |
| 398 return false; | 400 return false; |
| 399 } | 401 } |
| 400 | 402 |
| 401 bool IsYahooSiteThatNeedsSpoofingForSilverlight(const GURL& url) { | 403 bool IsYahooSiteThatNeedsSpoofingForSilverlight(const GURL& url) { |
| 402 // The following Yahoo! JAPAN pages erroneously judge that Silverlight does | 404 // The following Yahoo! JAPAN pages erroneously judge that Silverlight does |
| 403 // not support Chromium. Until the pages are fixed, spoof the UA. | 405 // not support Chromium. Until the pages are fixed, spoof the UA. |
| 404 // http://crbug.com/104426 | 406 // http://crbug.com/104426 |
| 405 if (url.host() == "headlines.yahoo.co.jp" && | 407 if (url.host() == "headlines.yahoo.co.jp" && |
| 406 StartsWithASCII(url.path(), "/videonews/", true)) { | 408 StartsWithASCII(url.path(), "/videonews/", true)) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 std::string GetInspectorProtocolVersion() { | 491 std::string GetInspectorProtocolVersion() { |
| 490 return WebDevToolsAgent::inspectorProtocolVersion().utf8(); | 492 return WebDevToolsAgent::inspectorProtocolVersion().utf8(); |
| 491 } | 493 } |
| 492 | 494 |
| 493 bool IsInspectorProtocolVersionSupported(const std::string& version) { | 495 bool IsInspectorProtocolVersionSupported(const std::string& version) { |
| 494 return WebDevToolsAgent::supportsInspectorProtocolVersion( | 496 return WebDevToolsAgent::supportsInspectorProtocolVersion( |
| 495 WebString::fromUTF8(version)); | 497 WebString::fromUTF8(version)); |
| 496 } | 498 } |
| 497 | 499 |
| 498 } // namespace webkit_glue | 500 } // namespace webkit_glue |
| OLD | NEW |