OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/plugins/plugin_placeholder.h" | 5 #include "chrome/renderer/plugins/plugin_placeholder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "third_party/WebKit/public/web/WebFrame.h" | 32 #include "third_party/WebKit/public/web/WebFrame.h" |
33 #include "third_party/WebKit/public/web/WebInputEvent.h" | 33 #include "third_party/WebKit/public/web/WebInputEvent.h" |
34 #include "third_party/WebKit/public/web/WebMenuItemInfo.h" | 34 #include "third_party/WebKit/public/web/WebMenuItemInfo.h" |
35 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 35 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
36 #include "third_party/WebKit/public/web/WebScriptSource.h" | 36 #include "third_party/WebKit/public/web/WebScriptSource.h" |
37 #include "third_party/WebKit/public/web/WebView.h" | 37 #include "third_party/WebKit/public/web/WebView.h" |
38 #include "third_party/re2/re2/re2.h" | 38 #include "third_party/re2/re2/re2.h" |
39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
41 #include "ui/webui/jstemplate_builder.h" | 41 #include "ui/webui/jstemplate_builder.h" |
42 #include "webkit/plugins/npapi/plugin_list.h" | |
43 | 42 |
44 #if defined(ENABLE_MOBILE_YOUTUBE_PLUGIN) | 43 #if defined(ENABLE_MOBILE_YOUTUBE_PLUGIN) |
45 #include "webkit/plugins/plugin_constants.h" | 44 #include "webkit/plugins/plugin_constants.h" |
46 #endif | 45 #endif |
47 | 46 |
48 using content::RenderThread; | 47 using content::RenderThread; |
49 using content::RenderView; | 48 using content::RenderView; |
50 using WebKit::WebContextMenuData; | 49 using WebKit::WebContextMenuData; |
51 using WebKit::WebDocument; | 50 using WebKit::WebDocument; |
52 using WebKit::WebElement; | 51 using WebKit::WebElement; |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 bool PluginPlaceholder::IsYouTubeURL(const GURL& url, | 631 bool PluginPlaceholder::IsYouTubeURL(const GURL& url, |
633 const std::string& mime_type) { | 632 const std::string& mime_type) { |
634 std::string host = url.host(); | 633 std::string host = url.host(); |
635 bool is_youtube = EndsWith(host, "youtube.com", true) || | 634 bool is_youtube = EndsWith(host, "youtube.com", true) || |
636 EndsWith(host, "youtube-nocookie.com", true); | 635 EndsWith(host, "youtube-nocookie.com", true); |
637 | 636 |
638 return is_youtube && IsValidYouTubeVideo(url.path()) && | 637 return is_youtube && IsValidYouTubeVideo(url.path()) && |
639 LowerCaseEqualsASCII(mime_type, kFlashPluginSwfMimeType); | 638 LowerCaseEqualsASCII(mime_type, kFlashPluginSwfMimeType); |
640 } | 639 } |
641 #endif | 640 #endif |
OLD | NEW |