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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2839993002: [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Fixed WebViewTest build issues after restructure. Created 3 years, 7 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 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #include "net/http/http_util.h" 172 #include "net/http/http_util.h"
173 #include "ppapi/features/features.h" 173 #include "ppapi/features/features.h"
174 #include "services/service_manager/public/cpp/interface_provider.h" 174 #include "services/service_manager/public/cpp/interface_provider.h"
175 #include "services/service_manager/public/cpp/interface_registry.h" 175 #include "services/service_manager/public/cpp/interface_registry.h"
176 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" 176 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
177 #include "storage/common/data_element.h" 177 #include "storage/common/data_element.h"
178 #include "third_party/WebKit/public/platform/FilePathConversion.h" 178 #include "third_party/WebKit/public/platform/FilePathConversion.h"
179 #include "third_party/WebKit/public/platform/URLConversion.h" 179 #include "third_party/WebKit/public/platform/URLConversion.h"
180 #include "third_party/WebKit/public/platform/WebCachePolicy.h" 180 #include "third_party/WebKit/public/platform/WebCachePolicy.h"
181 #include "third_party/WebKit/public/platform/WebData.h" 181 #include "third_party/WebKit/public/platform/WebData.h"
182 #include "third_party/WebKit/public/platform/WebFocusType.h"
182 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h" 183 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h"
183 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 184 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
184 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h" 185 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h"
185 #include "third_party/WebKit/public/platform/WebPoint.h" 186 #include "third_party/WebKit/public/platform/WebPoint.h"
186 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 187 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
187 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" 188 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h"
188 #include "third_party/WebKit/public/platform/WebString.h" 189 #include "third_party/WebKit/public/platform/WebString.h"
189 #include "third_party/WebKit/public/platform/WebURL.h" 190 #include "third_party/WebKit/public/platform/WebURL.h"
190 #include "third_party/WebKit/public/platform/WebURLError.h" 191 #include "third_party/WebKit/public/platform/WebURLError.h"
191 #include "third_party/WebKit/public/platform/WebURLResponse.h" 192 #include "third_party/WebKit/public/platform/WebURLResponse.h"
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 OnSetAccessibilityMode) 1575 OnSetAccessibilityMode)
1575 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1576 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1576 OnSnapshotAccessibilityTree) 1577 OnSnapshotAccessibilityTree)
1577 IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData) 1578 IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData)
1578 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1579 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1579 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1580 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1580 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1581 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1581 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1582 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1582 OnSetFrameOwnerProperties) 1583 OnSetFrameOwnerProperties)
1583 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1584 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
1585 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocusInForm, OnAdvanceFocusInForm)
1584 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 1586 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
1585 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1587 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1586 OnTextTrackSettingsChanged) 1588 OnTextTrackSettingsChanged)
1587 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1589 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1588 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1590 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1589 IPC_MESSAGE_HANDLER(FrameMsg_ReportContentSecurityPolicyViolation, 1591 IPC_MESSAGE_HANDLER(FrameMsg_ReportContentSecurityPolicyViolation,
1590 OnReportContentSecurityPolicyViolation) 1592 OnReportContentSecurityPolicyViolation)
1591 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1593 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1592 OnGetSavableResourceLinks) 1594 OnGetSavableResourceLinks)
1593 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1595 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 int32_t source_routing_id) { 2201 int32_t source_routing_id) {
2200 RenderFrameProxy* source_frame = 2202 RenderFrameProxy* source_frame =
2201 RenderFrameProxy::FromRoutingID(source_routing_id); 2203 RenderFrameProxy::FromRoutingID(source_routing_id);
2202 if (!source_frame) 2204 if (!source_frame)
2203 return; 2205 return;
2204 2206
2205 render_view_->webview()->advanceFocusAcrossFrames( 2207 render_view_->webview()->advanceFocusAcrossFrames(
2206 type, source_frame->web_frame(), frame_); 2208 type, source_frame->web_frame(), frame_);
2207 } 2209 }
2208 2210
2211 void RenderFrameImpl::OnAdvanceFocusInForm(bool forward) {
2212 if (render_view_->webview()->focusedFrame() != frame_)
2213 return;
EhsanK 2017/04/26 21:31:59 My suggestion for having this early return (and th
AKVT 2017/04/27 15:07:02 Thanks for your suggestion.
2214 frame_->advanceFocusInForm(forward ? blink::WebFocusTypeForward
2215 : blink::WebFocusTypeBackward);
2216 }
2217
2209 void RenderFrameImpl::OnSetFocusedFrame() { 2218 void RenderFrameImpl::OnSetFocusedFrame() {
2210 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur 2219 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur
2211 // events are properly dispatched on any currently focused elements. 2220 // events are properly dispatched on any currently focused elements.
2212 render_view_->webview()->focusDocumentView(frame_); 2221 render_view_->webview()->focusDocumentView(frame_);
2213 } 2222 }
2214 2223
2215 void RenderFrameImpl::OnTextTrackSettingsChanged( 2224 void RenderFrameImpl::OnTextTrackSettingsChanged(
2216 const FrameMsg_TextTrackSettings_Params& params) { 2225 const FrameMsg_TextTrackSettings_Params& params) {
2217 DCHECK(!frame_->parent()); 2226 DCHECK(!frame_->parent());
2218 if (!render_view_->webview()) 2227 if (!render_view_->webview())
(...skipping 4752 matching lines...) Expand 10 before | Expand all | Expand 10 after
6971 policy(info.defaultPolicy), 6980 policy(info.defaultPolicy),
6972 replaces_current_history_item(info.replacesCurrentHistoryItem), 6981 replaces_current_history_item(info.replacesCurrentHistoryItem),
6973 history_navigation_in_new_child_frame( 6982 history_navigation_in_new_child_frame(
6974 info.isHistoryNavigationInNewChildFrame), 6983 info.isHistoryNavigationInNewChildFrame),
6975 client_redirect(info.isClientRedirect), 6984 client_redirect(info.isClientRedirect),
6976 cache_disabled(info.isCacheDisabled), 6985 cache_disabled(info.isCacheDisabled),
6977 form(info.form), 6986 form(info.form),
6978 source_location(info.sourceLocation) {} 6987 source_location(info.sourceLocation) {}
6979 6988
6980 } // namespace content 6989 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698