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

Issue 1162373002: Make some editing/selection functions accessible to c/b/renderer_host/ (Closed)

Created:
5 years, 6 months ago by mohsen
Modified:
5 years, 5 months ago
Reviewers:
jam, sadrul, dcheng, nasko
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, mfomitchev, nasko+codewatch_chromium.org, lgarron
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make some editing/selection functions accessible to c/b/renderer_host/ In order to have access to Cut, Copy, Paste, MoveRangeSelectionExtent, and SelectRange functions of WebConentsImp from c/b/renderer_host/, specifically to implement unified touch selection for Aura, these functions are added to RenderWidgetHostDelegate interface. BUG=399721 Committed: https://crrev.com/7ab1ec16ecba562a54cd43ee6cef72bf3ef2de97 Cr-Commit-Position: refs/heads/master@{#337243}

Patch Set 1 #

Patch Set 2 : Addressed sadrul@'s comments #

Total comments: 4

Patch Set 3 : Addressed nasko@'s comments #

Total comments: 2

Patch Set 4 : Implemented Cut/Copy/Paste for InterstitialPageImpl #

Patch Set 5 : Fixed Mac compiler errors #

Patch Set 6 : Used the new Cut/Copy/Paste in c/b/renderer_host/ #

Patch Set 7 : Rebased #

Patch Set 8 : Added some unit tests #

Total comments: 1

Patch Set 9 : Changed unit test to browser test #

Patch Set 10 : Rebased #

Patch Set 11 : --cq-dry-run #

Patch Set 12 : Wait for page load #

Patch Set 13 : Switched to oninput event as oncut/onpaste happen before cut/paste #

Total comments: 10

Patch Set 14 : Addressed review comments #

Total comments: 2

Patch Set 15 : Rebased (after editing commands were removed from ImeAdapterAndroid: crrev.com/336407) #

Total comments: 16

Patch Set 16 : Addressed review comments #

Total comments: 2

Patch Set 17 : Replaced an empty string with std::string() #

Patch Set 18 : Added ClipboardMessageWatcher + Fixed Windows issues #

Patch Set 19 : Simplified wait implementations #

Total comments: 13

Patch Set 20 : Addressed more review comments #

Total comments: 2

Patch Set 21 : ditto #

Total comments: 4

Patch Set 22 : Used scoped_refptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+497 lines, -36 lines) Patch
M content/browser/frame_host/interstitial_page_impl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/interstitial_page_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +31 lines, -0 lines 0 comments Download
A content/browser/frame_host/interstitial_page_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +371 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 2 chunks +16 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/text_input_client_mac_unittest.mm View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -8 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +19 lines, -19 lines 0 comments Download
M content/common/clipboard_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 61 (15 generated)
mohsen
sadrul@: Can you please take a look at this patch before I send it to ...
5 years, 6 months ago (2015-06-02 20:58:17 UTC) #1
mohsen
5 years, 6 months ago (2015-06-04 18:03:45 UTC) #3
mohsen
nasko@: Can you please take a look...
5 years, 6 months ago (2015-06-04 18:13:28 UTC) #5
nasko
https://codereview.chromium.org/1162373002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h File content/browser/renderer_host/render_widget_host_delegate.h (right): https://codereview.chromium.org/1162373002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h#newcode83 content/browser/renderer_host/render_widget_host_delegate.h:83: virtual void Cut() {} Since these are also present ...
5 years, 6 months ago (2015-06-04 20:18:00 UTC) #6
jam
can you change over the code in renderer_host that is calling out to webcontents over ...
5 years, 6 months ago (2015-06-04 20:24:37 UTC) #8
mohsen
nasko@: comments addressed, please take another look. jam@: the code in renderer_host/ that are calling ...
5 years, 6 months ago (2015-06-04 23:11:39 UTC) #9
nasko
https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc File content/browser/frame_host/interstitial_page_impl.cc (right): https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc#newcode425 content/browser/frame_host/interstitial_page_impl.cc:425: void InterstitialPageImpl::Cut() { I think these methods will need ...
5 years, 6 months ago (2015-06-05 00:14:38 UTC) #10
mohsen
https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc File content/browser/frame_host/interstitial_page_impl.cc (right): https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc#newcode425 content/browser/frame_host/interstitial_page_impl.cc:425: void InterstitialPageImpl::Cut() { On 2015/06/05 00:14:38, nasko wrote: > ...
5 years, 6 months ago (2015-06-05 02:02:10 UTC) #11
nasko
On 2015/06/05 02:02:10, mohsen wrote: > https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc > File content/browser/frame_host/interstitial_page_impl.cc (right): > > https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc#newcode425 > ...
5 years, 6 months ago (2015-06-05 15:45:19 UTC) #12
mohsen
On 2015/06/05 15:45:19, nasko wrote: > On 2015/06/05 02:02:10, mohsen wrote: > > > https://codereview.chromium.org/1162373002/diff/40001/content/browser/frame_host/interstitial_page_impl.cc ...
5 years, 6 months ago (2015-06-05 15:53:13 UTC) #13
jam
On 2015/06/05 15:53:13, mohsen wrote: > On 2015/06/05 15:45:19, nasko wrote: > > On 2015/06/05 ...
5 years, 6 months ago (2015-06-05 23:57:35 UTC) #14
mohsen
On 2015/06/05 23:57:35, jam wrote: > On 2015/06/05 15:53:13, mohsen wrote: > > On 2015/06/05 ...
5 years, 6 months ago (2015-06-09 22:27:36 UTC) #18
nasko
On 2015/06/09 22:27:36, mohsen wrote: > On 2015/06/05 23:57:35, jam wrote: > > On 2015/06/05 ...
5 years, 6 months ago (2015-06-11 00:08:22 UTC) #19
mohsen
Sorry for the delay! I was trying to understand interstitials better to write a test. ...
5 years, 6 months ago (2015-06-15 18:40:15 UTC) #20
nasko
The CL looks great! Thanks for pushing through it! There is one concern I have. ...
5 years, 6 months ago (2015-06-15 21:59:45 UTC) #21
mohsen
On 2015/06/15 21:59:45, nasko (very slow . paris) wrote: > The CL looks great! Thanks ...
5 years, 6 months ago (2015-06-16 23:24:22 UTC) #22
nasko
On 2015/06/16 23:24:22, mohsen wrote: > On 2015/06/15 21:59:45, nasko (very slow . paris) wrote: ...
5 years, 6 months ago (2015-06-19 13:30:16 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1162373002/270001
5 years, 6 months ago (2015-06-25 22:40:32 UTC) #26
mohsen
nasko@: I've changed the test to a browser test that performs cut/copy/paste and at the ...
5 years, 6 months ago (2015-06-25 22:52:22 UTC) #27
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 6 months ago (2015-06-25 23:04:58 UTC) #29
nasko
This is really awesome! Thanks for taking the time to do it right! It does ...
5 years, 6 months ago (2015-06-26 11:35:39 UTC) #31
mohsen
Other than addressing comments, I've also changed TestClipboard::CreateForCurrentThread() to return a TestClipboard* instead of Clipboard* ...
5 years, 6 months ago (2015-06-26 19:57:56 UTC) #32
nasko
I think it looks good, so LGTM from me. I'd still like to see what ...
5 years, 5 months ago (2015-06-29 09:30:24 UTC) #34
dcheng
The test is failing on Windows because writing to the clipboard occurs on the IO ...
5 years, 5 months ago (2015-06-29 17:58:02 UTC) #35
mohsen
Regarding Windows issue: what can we do to fix that? Can we share the TestClipboard ...
5 years, 5 months ago (2015-06-29 21:46:54 UTC) #36
dcheng
On 2015/06/29 at 21:46:54, mohsen wrote: > Regarding Windows issue: what can we do to ...
5 years, 5 months ago (2015-06-29 22:02:56 UTC) #37
mohsen
On 2015/06/29 22:02:56, dcheng wrote: > On 2015/06/29 at 21:46:54, mohsen wrote: > > Regarding ...
5 years, 5 months ago (2015-06-29 22:53:59 UTC) #38
mohsen
https://codereview.chromium.org/1162373002/diff/370001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/370001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode63 content/browser/frame_host/interstitial_page_impl_browsertest.cc:63: void Wait() { On 2015/06/29 22:02:56, dcheng wrote: > ...
5 years, 5 months ago (2015-06-29 22:56:29 UTC) #39
dcheng
On 2015/06/29 at 22:53:59, mohsen wrote: > On 2015/06/29 22:02:56, dcheng wrote: > > On ...
5 years, 5 months ago (2015-06-29 22:57:41 UTC) #40
dcheng
https://codereview.chromium.org/1162373002/diff/370001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/370001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode63 content/browser/frame_host/interstitial_page_impl_browsertest.cc:63: void Wait() { On 2015/06/29 at 22:56:29, mohsen wrote: ...
5 years, 5 months ago (2015-06-29 23:15:41 UTC) #41
mohsen
dcheng@: Please take another look. I've changed to following: - Removed wait logic from TestClipboard ...
5 years, 5 months ago (2015-06-30 21:59:14 UTC) #42
sadrul
https://codereview.chromium.org/1162373002/diff/450001/content/common/clipboard_messages.h File content/common/clipboard_messages.h (right): https://codereview.chromium.org/1162373002/diff/450001/content/common/clipboard_messages.h#newcode31 content/common/clipboard_messages.h:31: ??
5 years, 5 months ago (2015-06-30 22:01:19 UTC) #43
mohsen
https://codereview.chromium.org/1162373002/diff/450001/content/common/clipboard_messages.h File content/common/clipboard_messages.h (right): https://codereview.chromium.org/1162373002/diff/450001/content/common/clipboard_messages.h#newcode31 content/common/clipboard_messages.h:31: On 2015/06/30 22:01:18, sadrul wrote: > ?? There was ...
5 years, 5 months ago (2015-06-30 22:07:44 UTC) #44
dcheng
https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode7 content/browser/frame_host/interstitial_page_impl_browsertest.cc:7: #include "base/auto_reset.h" This is no longer needed. https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode67 content/browser/frame_host/interstitial_page_impl_browsertest.cc:67: ...
5 years, 5 months ago (2015-07-02 07:06:25 UTC) #45
mohsen
https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode7 content/browser/frame_host/interstitial_page_impl_browsertest.cc:7: #include "base/auto_reset.h" On 2015/07/02 07:06:25, dcheng wrote: > This ...
5 years, 5 months ago (2015-07-02 16:41:01 UTC) #46
dcheng
https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode243 content/browser/frame_host/interstitial_page_impl_browsertest.cc:243: new InterstitialTitleUpdateWatcher(interstitial_.get()); On 2015/07/02 at 16:41:01, mohsen wrote: > ...
5 years, 5 months ago (2015-07-02 16:53:29 UTC) #47
mohsen
https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode243 content/browser/frame_host/interstitial_page_impl_browsertest.cc:243: new InterstitialTitleUpdateWatcher(interstitial_.get()); On 2015/07/02 16:53:28, dcheng wrote: > On ...
5 years, 5 months ago (2015-07-02 17:03:45 UTC) #48
mohsen
https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/450001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode243 content/browser/frame_host/interstitial_page_impl_browsertest.cc:243: new InterstitialTitleUpdateWatcher(interstitial_.get()); On 2015/07/02 17:03:45, mohsen wrote: > On ...
5 years, 5 months ago (2015-07-02 17:04:53 UTC) #49
dcheng
LGTM with nits. https://codereview.chromium.org/1162373002/diff/490001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/490001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode175 content/browser/frame_host/interstitial_page_impl_browsertest.cc:175: : clipboard_message_watcher_(nullptr), title_update_watcher_(nullptr) {} You won't ...
5 years, 5 months ago (2015-07-02 17:09:54 UTC) #50
mohsen
https://codereview.chromium.org/1162373002/diff/490001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/1162373002/diff/490001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode175 content/browser/frame_host/interstitial_page_impl_browsertest.cc:175: : clipboard_message_watcher_(nullptr), title_update_watcher_(nullptr) {} On 2015/07/02 17:09:54, dcheng wrote: ...
5 years, 5 months ago (2015-07-02 17:23:33 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1162373002/510001
5 years, 5 months ago (2015-07-02 18:22:48 UTC) #54
commit-bot: I haz the power
Committed patchset #22 (id:510001)
5 years, 5 months ago (2015-07-02 18:26:42 UTC) #55
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/7ab1ec16ecba562a54cd43ee6cef72bf3ef2de97 Cr-Commit-Position: refs/heads/master@{#337243}
5 years, 5 months ago (2015-07-02 18:27:32 UTC) #56
lgarron
I had a similar CL at https://codereview.chromium.org/1133003003 It was going to move all of the ...
5 years, 5 months ago (2015-07-06 21:00:12 UTC) #58
mohsen
On 2015/07/06 21:00:12, lgarron wrote: > I had a similar CL at https://codereview.chromium.org/1133003003 > > ...
5 years, 5 months ago (2015-07-06 21:27:47 UTC) #60
lgarron
5 years, 5 months ago (2015-07-06 22:26:11 UTC) #61
Message was sent while issue was closed.
On 2015/07/06 at 21:27:47, mohsen wrote:
> On 2015/07/06 21:00:12, lgarron wrote:
> > I had a similar CL at https://codereview.chromium.org/1133003003
> > 
> > It was going to move all of the following methods to the RWHD:
> >   void Undo() override;
> >   void Redo() override;
> >   void Cut() override;
> >   void Copy() override;
> >   void CopyToFindPboard() override;
> >   void Paste() override;
> >   void PasteAndMatchStyle() override;
> >   void SelectAll() override;
> > 
> > Were there particular reasons for only doing Cut/Copy/Paste in this CL?
> 
> lgarron@: Cut/Copy/Paste was what I needed to unblock my touch selection
unification patch (http://crrev.com/698253004). The rest should probably land as
a separate CL and then the Mac bug (http://crbug.com/415784) should be marked as
fixed?

mohsen@: Thanks for the explanation.

I've created a CL for SelectAll: https://codereview.chromium.org/1212373009
I'd like to hear from creis@ or nasko@ about whether to do the others.

Powered by Google App Engine
This is Rietveld 408576698