OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_PLUGINS_RENDERER_MOBILE_YOUTUBE_PLUGIN_H_ | |
6 #define COMPONENTS_PLUGINS_RENDERER_MOBILE_YOUTUBE_PLUGIN_H_ | |
7 | |
8 #include "components/plugins/renderer/plugin_placeholder.h" | |
9 | |
10 // Class representing placeholders for old style embedded youtube video on | |
11 // mobile device. For old style embedded youtube video, it has a url in the form | |
12 // of http://www.youtube.com/v/VIDEO_ID. This placeholder replaces the url with | |
13 // a simple html page and clicking the play image redirects the user to the | |
14 // mobile youtube app. | |
15 class MobileYouTubePlugin : public PluginPlaceholder { | |
16 public: | |
17 MobileYouTubePlugin(content::RenderView* render_view, | |
18 WebKit::WebFrame* frame, | |
19 const WebKit::WebPluginParams& params, | |
20 base::StringPiece& template_html); | |
21 | |
22 // Whether this is a youtube url. | |
23 static bool IsYouTubeURL(const GURL& url, const std::string& mime_type); | |
24 | |
25 private: | |
26 | |
Bernhard Bauer
2013/09/10 13:47:10
Nit: no empty line after public/protected/private
aberent
2013/09/13 19:46:22
Done.
| |
27 // Opens a youtube app in the current tab. | |
28 void OpenYoutubeUrlCallback(const webkit_glue::CppArgumentList& args, | |
29 webkit_glue::CppVariant* result); | |
30 | |
31 // WebViewPlugin::Delegate (via PluginPlaceholder) method | |
32 virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(MobileYouTubePlugin); | |
35 }; | |
36 | |
37 #endif // COMPONENTS_PLUGINS_RENDERER_MOBILE_YOUTUBE_PLUGIN_H_ | |
OLD | NEW |