| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5142 void RenderFrameImpl::OnFind(int request_id, | 5142 void RenderFrameImpl::OnFind(int request_id, |
| 5143 const base::string16& search_text, | 5143 const base::string16& search_text, |
| 5144 const WebFindOptions& options) { | 5144 const WebFindOptions& options) { |
| 5145 DCHECK(!search_text.empty()); | 5145 DCHECK(!search_text.empty()); |
| 5146 | 5146 |
| 5147 blink::WebPlugin* plugin = GetWebPluginForFind(); | 5147 blink::WebPlugin* plugin = GetWebPluginForFind(); |
| 5148 // Check if the plugin still exists in the document. | 5148 // Check if the plugin still exists in the document. |
| 5149 if (plugin) { | 5149 if (plugin) { |
| 5150 if (options.findNext) { | 5150 if (options.findNext) { |
| 5151 // Just navigate back/forward. | 5151 // Just navigate back/forward. |
| 5152 plugin->selectFindResult(options.forward); | 5152 plugin->selectFindResult(options.forward, request_id); |
| 5153 } else { | 5153 } else { |
| 5154 if (!plugin->startFind(search_text, options.matchCase, request_id)) { | 5154 if (!plugin->startFind(search_text, options.matchCase, request_id)) { |
| 5155 // Send "no results". | 5155 // Send "no results". |
| 5156 SendFindReply(request_id, 0 /* match_count */, 0 /* ordinal */, | 5156 SendFindReply(request_id, 0 /* match_count */, 0 /* ordinal */, |
| 5157 gfx::Rect(), true /* final_status_update */ ); | 5157 gfx::Rect(), true /* final_status_update */ ); |
| 5158 } | 5158 } |
| 5159 } | 5159 } |
| 5160 return; | 5160 return; |
| 5161 } | 5161 } |
| 5162 | 5162 |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6255 // event target. Potentially a Pepper plugin will receive the event. | 6255 // event target. Potentially a Pepper plugin will receive the event. |
| 6256 // In order to tell whether a plugin gets the last mouse event and which it | 6256 // In order to tell whether a plugin gets the last mouse event and which it |
| 6257 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6257 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6258 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6258 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6259 // |pepper_last_mouse_event_target_|. | 6259 // |pepper_last_mouse_event_target_|. |
| 6260 pepper_last_mouse_event_target_ = nullptr; | 6260 pepper_last_mouse_event_target_ = nullptr; |
| 6261 #endif | 6261 #endif |
| 6262 } | 6262 } |
| 6263 | 6263 |
| 6264 } // namespace content | 6264 } // namespace content |
| OLD | NEW |