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

Side by Side Diff: content/browser/web_contents/touch_editable_impl_aura.cc

Issue 183923030: Almost finish moving context_menu_node_ from RenderViewImpl to RenderFrameImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync to get android fix Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/web_contents/touch_editable_impl_aura.h" 5 #include "content/browser/web_contents/touch_editable_impl_aura.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 8 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/render_frame_host.h"
11 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/render_widget_host.h" 12 #include "content/public/browser/render_widget_host.h"
13 #include "content/public/browser/web_contents.h"
11 #include "grit/ui_strings.h" 14 #include "grit/ui_strings.h"
12 #include "ui/aura/client/activation_client.h" 15 #include "ui/aura/client/activation_client.h"
13 #include "ui/aura/client/screen_position_client.h" 16 #include "ui/aura/client/screen_position_client.h"
14 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
15 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
16 #include "ui/base/clipboard/clipboard.h" 19 #include "ui/base/clipboard/clipboard.h"
17 #include "ui/base/ui_base_switches_util.h" 20 #include "ui/base/ui_base_switches_util.h"
18 #include "ui/gfx/range/range.h" 21 #include "ui/gfx/range/range.h"
19 22
20 namespace content { 23 namespace content {
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 bool TouchEditableImplAura::GetAcceleratorForCommandId( 330 bool TouchEditableImplAura::GetAcceleratorForCommandId(
328 int command_id, 331 int command_id,
329 ui::Accelerator* accelerator) { 332 ui::Accelerator* accelerator) {
330 return false; 333 return false;
331 } 334 }
332 335
333 void TouchEditableImplAura::ExecuteCommand(int command_id, int event_flags) { 336 void TouchEditableImplAura::ExecuteCommand(int command_id, int event_flags) {
334 if (!rwhva_) 337 if (!rwhva_)
335 return; 338 return;
336 RenderWidgetHost* host = rwhva_->GetRenderWidgetHost(); 339 RenderWidgetHost* host = rwhva_->GetRenderWidgetHost();
340 RenderViewHost* rvh = RenderViewHost::From(host);
341 WebContents* wc = WebContents::FromRenderViewHost(rvh);
342 RenderFrameHost* focused_frame = wc->GetFocusedFrame();
337 switch (command_id) { 343 switch (command_id) {
338 case IDS_APP_CUT: 344 case IDS_APP_CUT:
339 host->Cut(); 345 focused_frame->Cut();
340 break; 346 break;
341 case IDS_APP_COPY: 347 case IDS_APP_COPY:
342 host->Copy(); 348 focused_frame->Copy();
343 break; 349 break;
344 case IDS_APP_PASTE: 350 case IDS_APP_PASTE:
345 host->Paste(); 351 focused_frame->Paste();
346 break; 352 break;
347 case IDS_APP_DELETE: 353 case IDS_APP_DELETE:
348 host->Delete(); 354 host->Delete();
349 break; 355 break;
350 case IDS_APP_SELECT_ALL: 356 case IDS_APP_SELECT_ALL:
351 host->SelectAll(); 357 host->SelectAll();
352 break; 358 break;
353 default: 359 default:
354 NOTREACHED(); 360 NOTREACHED();
355 break; 361 break;
(...skipping 20 matching lines...) Expand all
376 rwhva_ = NULL; 382 rwhva_ = NULL;
377 } 383 }
378 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE; 384 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE;
379 EndTouchEditing(true); 385 EndTouchEditing(true);
380 handles_hidden_due_to_scroll_ = false; 386 handles_hidden_due_to_scroll_ = false;
381 scroll_in_progress_ = false; 387 scroll_in_progress_ = false;
382 overscroll_in_progress_ = false; 388 overscroll_in_progress_ = false;
383 } 389 }
384 390
385 } // namespace content 391 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698