| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence( | 135 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence( |
| 136 render_frame_routing_id_, browser_plugin_instance_id_, sequence)); | 136 render_frame_routing_id_, browser_plugin_instance_id_, sequence)); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, | 139 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, |
| 140 const base::string16& attribute_value) { | 140 const base::string16& attribute_value) { |
| 141 if (!container()) | 141 if (!container()) |
| 142 return; | 142 return; |
| 143 | 143 |
| 144 blink::WebElement element = container()->element(); | 144 blink::WebElement element = container()->element(); |
| 145 blink::WebString web_attribute_name = | 145 element.setAttribute(blink::WebString::fromUTF8(attribute_name), |
| 146 blink::WebString::fromUTF8(attribute_name); | 146 blink::WebString::fromUTF16(attribute_value)); |
| 147 element.setAttribute(web_attribute_name, attribute_value); | |
| 148 } | 147 } |
| 149 | 148 |
| 150 void BrowserPlugin::Attach() { | 149 void BrowserPlugin::Attach() { |
| 151 Detach(); | 150 Detach(); |
| 152 | 151 |
| 153 BrowserPluginHostMsg_Attach_Params attach_params; | 152 BrowserPluginHostMsg_Attach_Params attach_params; |
| 154 attach_params.focused = ShouldGuestBeFocused(); | 153 attach_params.focused = ShouldGuestBeFocused(); |
| 155 attach_params.visible = visible_; | 154 attach_params.visible = visible_; |
| 156 attach_params.view_rect = view_rect(); | 155 attach_params.view_rect = view_rect(); |
| 157 attach_params.is_full_page_plugin = false; | 156 attach_params.is_full_page_plugin = false; |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 | 617 |
| 619 bool BrowserPlugin::HandleMouseLockedInputEvent( | 618 bool BrowserPlugin::HandleMouseLockedInputEvent( |
| 620 const blink::WebMouseEvent& event) { | 619 const blink::WebMouseEvent& event) { |
| 621 BrowserPluginManager::Get()->Send( | 620 BrowserPluginManager::Get()->Send( |
| 622 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 621 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
| 623 &event)); | 622 &event)); |
| 624 return true; | 623 return true; |
| 625 } | 624 } |
| 626 | 625 |
| 627 } // namespace content | 626 } // namespace content |
| OLD | NEW |