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

Side by Side Diff: content/browser/web_contents/web_contents_view_child_frame.cc

Issue 2474323002: Implement WebContentsViewChildFrame::TakeFocus. (Closed)
Patch Set: Conflicted with my own cl https://codereview.chromium.org/2455133005/ Created 4 years, 1 month 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/browser/web_contents/web_contents_view_child_frame.h" 5 #include "content/browser/web_contents/web_contents_view_child_frame.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/frame_host/render_frame_proxy_host.h"
8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 9 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/public/browser/web_contents_view_delegate.h" 11 #include "content/public/browser/web_contents_view_delegate.h"
11 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
13 14
14 using blink::WebDragOperation; 15 using blink::WebDragOperation;
15 using blink::WebDragOperationsMask; 16 using blink::WebDragOperationsMask;
16 17
17 namespace content { 18 namespace content {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 145 }
145 146
146 void WebContentsViewChildFrame::UpdateDragCursor(WebDragOperation operation) { 147 void WebContentsViewChildFrame::UpdateDragCursor(WebDragOperation operation) {
147 NOTREACHED(); 148 NOTREACHED();
148 } 149 }
149 150
150 void WebContentsViewChildFrame::GotFocus() { 151 void WebContentsViewChildFrame::GotFocus() {
151 NOTREACHED(); 152 NOTREACHED();
152 } 153 }
153 154
154 void WebContentsViewChildFrame::TakeFocus(bool reverse) { 155 void WebContentsViewChildFrame::TakeFocus(bool reverse) {
alexmos 2016/11/22 02:45:27 Could we also update the documentation on ViewHost
alexmos 2016/11/22 02:45:27 How does the other part of tab traversal work, whe
avallee 2016/11/25 19:39:54 The problem here I think is that tabbing into the
avallee 2016/11/25 19:39:54 Done.
alexmos 2016/11/28 23:52:23 Yes, this is indeed strange, since the early out y
avallee 2016/12/09 21:16:51 On further investigation, this is what happens. Od
alexmos 2016/12/12 22:41:15 Wow, good find, thanks for the investigation. Ind
avallee 2017/01/11 00:48:49 Done. Filed: https://bugs.chromium.org/p/chromium/
155 // TODO(avallee): http://crbug.com/610819 Advance focus to next element in 156 RenderFrameProxyHost* rfp =
156 // outer WebContents. 157 web_contents_->GetRenderManager()->GetProxyToOuterDelegate();
alexmos 2016/11/22 02:45:27 It seems you can avoid making GetRenderManager pub
avallee 2016/11/25 19:39:54 I'll use the detour for now. There's already a com
158 FrameTreeNode* outer_node = FrameTreeNode::GloballyFindByID(
159 web_contents_->GetOuterDelegateFrameTreeNodeId());
160 RenderFrameHostImpl* rfhi =
161 outer_node->parent()->render_manager()->current_frame_host();
162
163 rfhi->AdvanceFocus(
164 reverse ? blink::WebFocusTypeBackward : blink::WebFocusTypeForward, rfp);
157 } 165 }
158 166
159 void WebContentsViewChildFrame::ShowContextMenu( 167 void WebContentsViewChildFrame::ShowContextMenu(
160 RenderFrameHost* render_frame_host, 168 RenderFrameHost* render_frame_host,
161 const ContextMenuParams& params) { 169 const ContextMenuParams& params) {
162 NOTREACHED(); 170 NOTREACHED();
163 } 171 }
164 172
165 void WebContentsViewChildFrame::StartDragging( 173 void WebContentsViewChildFrame::StartDragging(
166 const DropData& drop_data, 174 const DropData& drop_data,
167 WebDragOperationsMask ops, 175 WebDragOperationsMask ops,
168 const gfx::ImageSkia& image, 176 const gfx::ImageSkia& image,
169 const gfx::Vector2d& image_offset, 177 const gfx::Vector2d& image_offset,
170 const DragEventSourceInfo& event_info, 178 const DragEventSourceInfo& event_info,
171 RenderWidgetHostImpl* source_rwh) { 179 RenderWidgetHostImpl* source_rwh) {
172 NOTREACHED(); 180 NOTREACHED();
173 } 181 }
174 182
175 } // namespace content 183 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698