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

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

Issue 1801002: AutoFill: Notify the renderer when the page has finished translating. Extract (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Update comment. Created 10 years, 8 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
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/translate_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4918 matching lines...) Expand 10 before | Expand all | Expand 10 after
4929 4929
4930 file_chooser_completions_.push_back(linked_ptr<PendingFileChooser>( 4930 file_chooser_completions_.push_back(linked_ptr<PendingFileChooser>(
4931 new PendingFileChooser(params, completion))); 4931 new PendingFileChooser(params, completion)));
4932 if (file_chooser_completions_.size() == 1) { 4932 if (file_chooser_completions_.size() == 1) {
4933 // Actually show the browse dialog when this is the first request. 4933 // Actually show the browse dialog when this is the first request.
4934 Send(new ViewHostMsg_RunFileChooser(routing_id_, params)); 4934 Send(new ViewHostMsg_RunFileChooser(routing_id_, params));
4935 } 4935 }
4936 return true; 4936 return true;
4937 } 4937 }
4938 4938
4939 void RenderView::OnPageTranslated() {
4940 WebFrame* frame = webview()->mainFrame();
4941 if (!frame)
4942 return;
4943
4944 // The page is translated, so try to extract the form data again.
4945 form_manager_.ExtractForms(frame);
4946 SendForms(frame);
4947 }
4948
4939 WebKit::WebGeolocationService* RenderView::geolocationService() { 4949 WebKit::WebGeolocationService* RenderView::geolocationService() {
4940 if (!geolocation_dispatcher_.get()) 4950 if (!geolocation_dispatcher_.get())
4941 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); 4951 geolocation_dispatcher_.reset(new GeolocationDispatcher(this));
4942 return geolocation_dispatcher_.get(); 4952 return geolocation_dispatcher_.get();
4943 } 4953 }
4944 4954
4945 bool RenderView::ShouldRouteNavigationToBrowser( 4955 bool RenderView::ShouldRouteNavigationToBrowser(
4946 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { 4956 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) {
4947 // If the browser is interested, then give it a chance to look at top level 4957 // If the browser is interested, then give it a chance to look at top level
4948 // navigations 4958 // navigations
(...skipping 14 matching lines...) Expand all
4963 4973
4964 if (last_top_level_navigation_page_id_ != page_id_ && 4974 if (last_top_level_navigation_page_id_ != page_id_ &&
4965 // Not interested in reloads. 4975 // Not interested in reloads.
4966 type != WebKit::WebNavigationTypeReload && 4976 type != WebKit::WebNavigationTypeReload &&
4967 type != WebKit::WebNavigationTypeFormSubmitted) { 4977 type != WebKit::WebNavigationTypeFormSubmitted) {
4968 return true; 4978 return true;
4969 } 4979 }
4970 } 4980 }
4971 return false; 4981 return false;
4972 } 4982 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/translate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698