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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2349523002: Add support for edit commands in OOPIFs. (Closed)
Patch Set: Created 4 years, 3 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/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 keybinding_delegate && 2719 keybinding_delegate &&
2720 event.os_event && 2720 event.os_event &&
2721 keybinding_delegate->MatchEvent(*event.os_event, &commands)) { 2721 keybinding_delegate->MatchEvent(*event.os_event, &commands)) {
2722 // Transform from ui/ types to content/ types. 2722 // Transform from ui/ types to content/ types.
2723 EditCommands edit_commands; 2723 EditCommands edit_commands;
2724 for (std::vector<ui::TextEditCommandAuraLinux>::const_iterator it = 2724 for (std::vector<ui::TextEditCommandAuraLinux>::const_iterator it =
2725 commands.begin(); it != commands.end(); ++it) { 2725 commands.begin(); it != commands.end(); ++it) {
2726 edit_commands.push_back(EditCommand(it->GetCommandString(), 2726 edit_commands.push_back(EditCommand(it->GetCommandString(),
2727 it->argument())); 2727 it->argument()));
2728 } 2728 }
2729 // TODO(alexmos): This needs to be refactored to work with subframe 2729
2730 // RenderWidgetHosts for OOPIF. See https://crbug.com/549334.
2731 target_host->Send(new InputMsg_SetEditCommandsForNextKeyEvent( 2730 target_host->Send(new InputMsg_SetEditCommandsForNextKeyEvent(
2732 target_host->GetRoutingID(), edit_commands)); 2731 target_host->GetRoutingID(), edit_commands));
2733 target_host->ForwardKeyboardEvent(event); 2732 target_host->ForwardKeyboardEvent(event);
2734 return; 2733 return;
2735 } 2734 }
2736 #endif 2735 #endif
2737 2736
2738 target_host->ForwardKeyboardEvent(event); 2737 target_host->ForwardKeyboardEvent(event);
2739 } 2738 }
2740 2739
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3044 ->GetTextSelection(focused_view) 3043 ->GetTextSelection(focused_view)
3045 ->GetSelectedText(&selected_text)) { 3044 ->GetSelectedText(&selected_text)) {
3046 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. 3045 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
3047 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); 3046 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
3048 clipboard_writer.WriteText(selected_text); 3047 clipboard_writer.WriteText(selected_text);
3049 } 3048 }
3050 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) 3049 #endif // defined(USE_X11) && !defined(OS_CHROMEOS)
3051 } 3050 }
3052 3051
3053 } // namespace content 3052 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698