| 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_embedder.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 6 | 6 |
| 7 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 7 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/common/browser_plugin/browser_plugin_messages.h" | 10 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 BrowserPluginGuest* guest = static_cast<WebContentsImpl*>(guest_web_contents) | 167 BrowserPluginGuest* guest = static_cast<WebContentsImpl*>(guest_web_contents) |
| 168 ->GetBrowserPluginGuest(); | 168 ->GetBrowserPluginGuest(); |
| 169 guest->Attach(browser_plugin_instance_id, | 169 guest->Attach(browser_plugin_instance_id, |
| 170 static_cast<WebContentsImpl*>(web_contents()), | 170 static_cast<WebContentsImpl*>(web_contents()), |
| 171 params); | 171 params); |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool BrowserPluginEmbedder::HandleKeyboardEvent( | 174 bool BrowserPluginEmbedder::HandleKeyboardEvent( |
| 175 const NativeWebKeyboardEvent& event) { | 175 const NativeWebKeyboardEvent& event) { |
| 176 if ((event.windowsKeyCode != ui::VKEY_ESCAPE) || | 176 if ((event.windowsKeyCode != ui::VKEY_ESCAPE) || |
| 177 (event.modifiers & blink::WebInputEvent::InputModifiers)) { | 177 (event.modifiers() & blink::WebInputEvent::InputModifiers)) { |
| 178 return false; | 178 return false; |
| 179 } | 179 } |
| 180 | 180 |
| 181 bool event_consumed = false; | 181 bool event_consumed = false; |
| 182 GetBrowserPluginGuestManager()->ForEachGuest( | 182 GetBrowserPluginGuestManager()->ForEachGuest( |
| 183 web_contents(), | 183 web_contents(), |
| 184 base::Bind(&BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback, | 184 base::Bind(&BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback, |
| 185 &event_consumed)); | 185 &event_consumed)); |
| 186 | 186 |
| 187 return event_consumed; | 187 return event_consumed; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 ->GetBrowserPluginGuest() | 257 ->GetBrowserPluginGuest() |
| 258 ->HandleStopFindingForEmbedder(action)) { | 258 ->HandleStopFindingForEmbedder(action)) { |
| 259 // There can only ever currently be one browser plugin that handles find so | 259 // There can only ever currently be one browser plugin that handles find so |
| 260 // we can break the iteration at this point. | 260 // we can break the iteration at this point. |
| 261 return true; | 261 return true; |
| 262 } | 262 } |
| 263 return false; | 263 return false; |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace content | 266 } // namespace content |
| OLD | NEW |