Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2168)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/android/overscroll_controller_android.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698