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

Side by Side Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/plugins/chrome_plugin_placeholder.h" 5 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 content::MenuItem hide_item; 324 content::MenuItem hide_item;
325 hide_item.action = chrome::MENU_COMMAND_PLUGIN_HIDE; 325 hide_item.action = chrome::MENU_COMMAND_PLUGIN_HIDE;
326 bool is_main_frame_plugin_document = 326 bool is_main_frame_plugin_document =
327 GetFrame()->view()->mainFrame()->isWebLocalFrame() && 327 GetFrame()->view()->mainFrame()->isWebLocalFrame() &&
328 GetFrame()->view()->mainFrame()->document().isPluginDocument(); 328 GetFrame()->view()->mainFrame()->document().isPluginDocument();
329 hide_item.enabled = !is_main_frame_plugin_document; 329 hide_item.enabled = !is_main_frame_plugin_document;
330 hide_item.label = l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLUGIN_HIDE); 330 hide_item.label = l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLUGIN_HIDE);
331 params.custom_items.push_back(hide_item); 331 params.custom_items.push_back(hide_item);
332 332
333 blink::WebPoint point(event.x, event.y); 333 blink::WebPoint point(event.positionInWidget().x, event.positionInWidget().y);
334 if (plugin() && plugin()->container()) 334 if (plugin() && plugin()->container())
335 point = plugin()->container()->localToRootFramePoint(point); 335 point = plugin()->container()->localToRootFramePoint(point);
336 336
337 params.x = point.x; 337 params.x = point.x;
338 params.y = point.y; 338 params.y = point.y;
339 339
340 context_menu_request_id_ = render_frame()->ShowContextMenu(this, params); 340 context_menu_request_id_ = render_frame()->ShowContextMenu(this, params);
341 g_last_active_menu = this; 341 g_last_active_menu = this;
342 } 342 }
343 343
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 385 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
386 switches::kEnablePluginPlaceholderTesting)) { 386 switches::kEnablePluginPlaceholderTesting)) {
387 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( 387 builder.SetMethod<void (ChromePluginPlaceholder::*)()>(
388 "didFinishIconRepositionForTesting", 388 "didFinishIconRepositionForTesting",
389 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); 389 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback);
390 } 390 }
391 391
392 return builder; 392 return builder;
393 } 393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698