summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 17:50:22 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 17:50:22 +0000
commita100d76bbc0afe58ef7761a1eaf06cb1489cc1b1 (patch)
tree4b186f6c37ce0adc97516efce9ec31cea47e732c /chrome
parent8a9f6525ba1fb42d4b8754bd93c25f5d9e559849 (diff)
downloadchromium_src-a100d76bbc0afe58ef7761a1eaf06cb1489cc1b1.zip
chromium_src-a100d76bbc0afe58ef7761a1eaf06cb1489cc1b1.tar.gz
chromium_src-a100d76bbc0afe58ef7761a1eaf06cb1489cc1b1.tar.bz2
Remove WebFrame::selectAll and WebFrame::clearSelection in favor of having
consumers use executeCommand. Patch by Marshall Greenblatt R=darin BUG=19270 TEST=covered by unit tests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23442 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/render_view.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 9fd1f1d..376b07e 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -771,7 +771,7 @@ void RenderView::OnStopFinding(bool clear_selection) {
return;
if (clear_selection)
- view->GetFocusedFrame()->clearSelection();
+ view->GetFocusedFrame()->executeCommand(WebString::fromUTF8("Unselect"));
WebFrame* frame = view->GetMainFrame();
while (frame) {
@@ -867,7 +867,9 @@ void RenderView::OnSelectAll() {
if (!webview())
return;
- webview()->GetFocusedFrame()->selectAll();
+ webview()->GetFocusedFrame()->executeCommand(
+ WebString::fromUTF8("SelectAll"));
+ UserMetricsRecordAction(L"SelectAll");
}
void RenderView::OnSetInitialFocus(bool reverse) {
@@ -2279,7 +2281,7 @@ void RenderView::OnFind(int request_id,
if (!result) {
// don't leave text selected as you move to the next frame.
- search_frame->clearSelection();
+ search_frame->executeCommand(WebString::fromUTF8("Unselect"));
// Find the next frame, but skip the invisible ones.
do {
@@ -2292,7 +2294,7 @@ void RenderView::OnFind(int request_id,
search_frame != focused_frame);
// Make sure selection doesn't affect the search operation in new frame.
- search_frame->clearSelection();
+ search_frame->executeCommand(WebString::fromUTF8("Unselect"));
// If we have multiple frames and we have wrapped back around to the
// focused frame, we need to search it once more allowing wrap within