OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 void RenderView::OnStopFinding(bool clear_selection) { | 828 void RenderView::OnStopFinding(bool clear_selection) { |
829 WebView* view = webview(); | 829 WebView* view = webview(); |
830 if (!view) | 830 if (!view) |
831 return; | 831 return; |
832 | 832 |
833 if (clear_selection) | 833 if (clear_selection) |
834 view->GetFocusedFrame()->ClearSelection(); | 834 view->GetFocusedFrame()->ClearSelection(); |
835 | 835 |
836 WebFrame* frame = view->GetMainFrame(); | 836 WebFrame* frame = view->GetMainFrame(); |
837 while (frame) { | 837 while (frame) { |
838 frame->StopFinding(); | 838 frame->StopFinding(clear_selection); |
839 frame = view->GetNextFrameAfter(frame, false); | 839 frame = view->GetNextFrameAfter(frame, false); |
840 } | 840 } |
841 } | 841 } |
842 | 842 |
843 void RenderView::OnFindReplyAck() { | 843 void RenderView::OnFindReplyAck() { |
844 // Check if there is any queued up request waiting to be sent. | 844 // Check if there is any queued up request waiting to be sent. |
845 if (queued_find_reply_message_.get()) { | 845 if (queued_find_reply_message_.get()) { |
846 // Send the search result over to the browser process. | 846 // Send the search result over to the browser process. |
847 Send(queued_find_reply_message_.get()); | 847 Send(queued_find_reply_message_.get()); |
848 queued_find_reply_message_.release(); | 848 queued_find_reply_message_.release(); |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2527 | 2527 |
2528 if (template_html.empty()) { | 2528 if (template_html.empty()) { |
2529 NOTREACHED() << "unable to load template. ID: " << template_resource_id; | 2529 NOTREACHED() << "unable to load template. ID: " << template_resource_id; |
2530 return ""; | 2530 return ""; |
2531 } | 2531 } |
2532 // "t" is the id of the templates root node. | 2532 // "t" is the id of the templates root node. |
2533 return jstemplate_builder::GetTemplateHtml( | 2533 return jstemplate_builder::GetTemplateHtml( |
2534 template_html, &error_strings, "t"); | 2534 template_html, &error_strings, "t"); |
2535 } | 2535 } |
2536 | 2536 |
OLD | NEW |