| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence( | 136 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_SatisfySequence( |
| 137 render_frame_routing_id_, browser_plugin_instance_id_, sequence)); | 137 render_frame_routing_id_, browser_plugin_instance_id_, sequence)); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, | 140 void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, |
| 141 const base::string16& attribute_value) { | 141 const base::string16& attribute_value) { |
| 142 if (!container()) | 142 if (!container()) |
| 143 return; | 143 return; |
| 144 | 144 |
| 145 blink::WebElement element = container()->element(); | 145 blink::WebElement element = container()->element(); |
| 146 blink::WebString web_attribute_name = | 146 element.setAttribute(blink::WebString::fromUTF8(attribute_name), |
| 147 blink::WebString::fromUTF8(attribute_name); | 147 blink::WebString::fromUTF16(attribute_value)); |
| 148 element.setAttribute(web_attribute_name, attribute_value); | |
| 149 } | 148 } |
| 150 | 149 |
| 151 void BrowserPlugin::Attach() { | 150 void BrowserPlugin::Attach() { |
| 152 Detach(); | 151 Detach(); |
| 153 | 152 |
| 154 BrowserPluginHostMsg_Attach_Params attach_params; | 153 BrowserPluginHostMsg_Attach_Params attach_params; |
| 155 attach_params.focused = ShouldGuestBeFocused(); | 154 attach_params.focused = ShouldGuestBeFocused(); |
| 156 attach_params.visible = visible_; | 155 attach_params.visible = visible_; |
| 157 attach_params.view_rect = view_rect(); | 156 attach_params.view_rect = view_rect(); |
| 158 attach_params.is_full_page_plugin = false; | 157 attach_params.is_full_page_plugin = false; |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 | 608 |
| 610 bool BrowserPlugin::HandleMouseLockedInputEvent( | 609 bool BrowserPlugin::HandleMouseLockedInputEvent( |
| 611 const blink::WebMouseEvent& event) { | 610 const blink::WebMouseEvent& event) { |
| 612 BrowserPluginManager::Get()->Send( | 611 BrowserPluginManager::Get()->Send( |
| 613 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 612 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
| 614 &event)); | 613 &event)); |
| 615 return true; | 614 return true; |
| 616 } | 615 } |
| 617 | 616 |
| 618 } // namespace content | 617 } // namespace content |
| OLD | NEW |