| 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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 | 967 |
| 968 void BrowserPluginGuest::OnSetEditCommandsForNextKeyEvent( | 968 void BrowserPluginGuest::OnSetEditCommandsForNextKeyEvent( |
| 969 int browser_plugin_instance_id, | 969 int browser_plugin_instance_id, |
| 970 const std::vector<EditCommand>& edit_commands) { | 970 const std::vector<EditCommand>& edit_commands) { |
| 971 Send(new InputMsg_SetEditCommandsForNextKeyEvent(routing_id(), | 971 Send(new InputMsg_SetEditCommandsForNextKeyEvent(routing_id(), |
| 972 edit_commands)); | 972 edit_commands)); |
| 973 } | 973 } |
| 974 | 974 |
| 975 void BrowserPluginGuest::OnSetVisibility(int browser_plugin_instance_id, | 975 void BrowserPluginGuest::OnSetVisibility(int browser_plugin_instance_id, |
| 976 bool visible) { | 976 bool visible) { |
| 977 // For OOPIF-<webivew>, the remote frame will handle visibility state. |
| 978 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) |
| 979 return; |
| 980 |
| 977 guest_visible_ = visible; | 981 guest_visible_ = visible; |
| 978 if (embedder_visible_ && guest_visible_) | 982 if (embedder_visible_ && guest_visible_) |
| 979 GetWebContents()->WasShown(); | 983 GetWebContents()->WasShown(); |
| 980 else | 984 else |
| 981 GetWebContents()->WasHidden(); | 985 GetWebContents()->WasHidden(); |
| 982 } | 986 } |
| 983 | 987 |
| 984 void BrowserPluginGuest::OnUnlockMouse() { | 988 void BrowserPluginGuest::OnUnlockMouse() { |
| 985 SendMessageToEmbedder( | 989 SendMessageToEmbedder( |
| 986 new BrowserPluginMsg_SetMouseLock(browser_plugin_instance_id(), false)); | 990 new BrowserPluginMsg_SetMouseLock(browser_plugin_instance_id(), false)); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 range, character_bounds); | 1068 range, character_bounds); |
| 1065 } | 1069 } |
| 1066 #endif | 1070 #endif |
| 1067 | 1071 |
| 1068 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1072 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
| 1069 if (delegate_) | 1073 if (delegate_) |
| 1070 delegate_->SetContextMenuPosition(position); | 1074 delegate_->SetContextMenuPosition(position); |
| 1071 } | 1075 } |
| 1072 | 1076 |
| 1073 } // namespace content | 1077 } // namespace content |
| OLD | NEW |