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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 3312017: Plumbs through window.chrome.setSuggestResult. (Closed)
Patch Set: more comments Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 4038 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 xpath_remaining.erase(0, delim_pos + 1); 4049 xpath_remaining.erase(0, delim_pos + 1);
4050 } else { 4050 } else {
4051 xpath_remaining.swap(xpath_child); 4051 xpath_remaining.swap(xpath_child);
4052 } 4052 }
4053 frame = frame->findChildByExpression(WideToUTF16Hack(xpath_child)); 4053 frame = frame->findChildByExpression(WideToUTF16Hack(xpath_child));
4054 } 4054 }
4055 4055
4056 return frame; 4056 return frame;
4057 } 4057 }
4058 4058
4059 void RenderView::SetSuggestResult(const std::string& suggest) {
4060 if (!suggest.empty())
4061 Send(new ViewHostMsg_SetSuggestResult(routing_id_, page_id_, suggest));
4062 }
4063
4059 void RenderView::EvaluateScript(const std::wstring& frame_xpath, 4064 void RenderView::EvaluateScript(const std::wstring& frame_xpath,
4060 const std::wstring& script) { 4065 const std::wstring& script) {
4061 WebFrame* web_frame = GetChildFrame(frame_xpath); 4066 WebFrame* web_frame = GetChildFrame(frame_xpath);
4062 if (!web_frame) 4067 if (!web_frame)
4063 return; 4068 return;
4064 4069
4065 web_frame->executeScript(WebScriptSource(WideToUTF16Hack(script))); 4070 web_frame->executeScript(WebScriptSource(WideToUTF16Hack(script)));
4066 } 4071 }
4067 4072
4068 void RenderView::InsertCSS(const std::wstring& frame_xpath, 4073 void RenderView::InsertCSS(const std::wstring& frame_xpath,
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( 5683 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup(
5679 request_id); 5684 request_id);
5680 DCHECK(request); 5685 DCHECK(request);
5681 if (accepted) 5686 if (accepted)
5682 request->callbacks->didOpenFileSystem(name, root_path); 5687 request->callbacks->didOpenFileSystem(name, root_path);
5683 else 5688 else
5684 request->callbacks->didFail(WebKit::WebFileErrorSecurity); 5689 request->callbacks->didFail(WebKit::WebFileErrorSecurity);
5685 request->callbacks = NULL; 5690 request->callbacks = NULL;
5686 pending_file_system_requests_.Remove(request_id); 5691 pending_file_system_requests_.Remove(request_id);
5687 } 5692 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698