| 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 "content/browser/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 params.item_font_size, | 968 params.item_font_size, |
| 969 params.selected_item, | 969 params.selected_item, |
| 970 params.popup_items, | 970 params.popup_items, |
| 971 params.right_aligned, | 971 params.right_aligned, |
| 972 params.allow_multiple_selection); | 972 params.allow_multiple_selection); |
| 973 } | 973 } |
| 974 #endif | 974 #endif |
| 975 | 975 |
| 976 void BrowserPluginGuest::OnShowWidget(int route_id, | 976 void BrowserPluginGuest::OnShowWidget(int route_id, |
| 977 const gfx::Rect& initial_rect) { | 977 const gfx::Rect& initial_rect) { |
| 978 GetWebContents()->ShowCreatedWidget(route_id, initial_rect); | 978 int process_id = GetWebContents()->GetRenderProcessHost()->GetID(); |
| 979 GetWebContents()->ShowCreatedWidget(process_id, route_id, initial_rect); |
| 979 } | 980 } |
| 980 | 981 |
| 981 void BrowserPluginGuest::OnTakeFocus(bool reverse) { | 982 void BrowserPluginGuest::OnTakeFocus(bool reverse) { |
| 982 SendMessageToEmbedder( | 983 SendMessageToEmbedder( |
| 983 new BrowserPluginMsg_AdvanceFocus(browser_plugin_instance_id(), reverse)); | 984 new BrowserPluginMsg_AdvanceFocus(browser_plugin_instance_id(), reverse)); |
| 984 } | 985 } |
| 985 | 986 |
| 986 void BrowserPluginGuest::OnTextInputStateChanged(const TextInputState& params) { | 987 void BrowserPluginGuest::OnTextInputStateChanged(const TextInputState& params) { |
| 987 // Save the state of text input so we can restore it on focus. | 988 // Save the state of text input so we can restore it on focus. |
| 988 last_text_input_state_.reset(new TextInputState(params)); | 989 last_text_input_state_.reset(new TextInputState(params)); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1006 range, character_bounds); | 1007 range, character_bounds); |
| 1007 } | 1008 } |
| 1008 #endif | 1009 #endif |
| 1009 | 1010 |
| 1010 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1011 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
| 1011 if (delegate_) | 1012 if (delegate_) |
| 1012 delegate_->SetContextMenuPosition(position); | 1013 delegate_->SetContextMenuPosition(position); |
| 1013 } | 1014 } |
| 1014 | 1015 |
| 1015 } // namespace content | 1016 } // namespace content |
| OLD | NEW |