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 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 webkit::ppapi::WebPluginImpl* plugin() { return plugin_; } | 54 webkit::ppapi::WebPluginImpl* plugin() { return plugin_; } |
55 | 55 |
56 const WebKit::WebPluginParams& plugin_params() const { | 56 const WebKit::WebPluginParams& plugin_params() const { |
57 return plugin_params_; | 57 return plugin_params_; |
58 } | 58 } |
59 | 59 |
60 void LoadGuest(int guest_process_id, | 60 void LoadGuest(int guest_process_id, |
61 const IPC::ChannelHandle& channel_handle); | 61 const IPC::ChannelHandle& channel_handle); |
62 | 62 |
| 63 void AdvanceFocus(bool reverse); |
| 64 |
63 RenderViewImpl* render_view() { return render_view_; } | 65 RenderViewImpl* render_view() { return render_view_; } |
64 | 66 |
65 private: | 67 private: |
66 BrowserPlugin(RenderViewImpl* render_view, | 68 BrowserPlugin(RenderViewImpl* render_view, |
67 WebKit::WebFrame* frame, | 69 WebKit::WebFrame* frame, |
68 const WebKit::WebPluginParams& params, | 70 const WebKit::WebPluginParams& params, |
69 const std::string& html_data); | 71 const std::string& html_data); |
70 virtual ~BrowserPlugin(); | 72 virtual ~BrowserPlugin(); |
71 | 73 |
72 // Parses the source URL of the browser plugin from the element's attributes | 74 // Parses the source URL of the browser plugin from the element's attributes |
73 // and outputs them. If not found, it outputs the defaults specified here as | 75 // and outputs them. If not found, it outputs the defaults specified here as |
74 // parameters. | 76 // parameters. |
75 void ParseSrcAttribute(const std::string& default_src, std::string* src); | 77 void ParseSrcAttribute(const std::string& default_src, std::string* src); |
76 // Replace the current guest with a new guest. | 78 // Replace the current guest with a new guest. |
77 void Replace(webkit::ppapi::WebPluginImpl* new_plugin); | 79 void Replace(webkit::ppapi::WebPluginImpl* new_plugin); |
78 | 80 |
79 RenderViewImpl* render_view_; | 81 RenderViewImpl* render_view_; |
80 WebKit::WebPluginParams plugin_params_; | 82 WebKit::WebPluginParams plugin_params_; |
81 webkit::WebViewPlugin* placeholder_; | 83 webkit::WebViewPlugin* placeholder_; |
82 webkit::ppapi::WebPluginImpl* plugin_; | 84 webkit::ppapi::WebPluginImpl* plugin_; |
83 int id_; | 85 int id_; |
84 | 86 |
85 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 87 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
86 }; | 88 }; |
87 | 89 |
88 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 90 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |