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

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

Issue 2474323002: Implement WebContentsViewChildFrame::TakeFocus. (Closed)
Patch Set: Remove logging code. Created 3 years, 11 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) 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
155 // TODO(avallee): http://crbug.com/610819 Advance focus to next element in 156 RenderFrameProxyHost* rfp = web_contents_->GetMainFrame()
156 // outer WebContents. 157 ->frame_tree_node()
158 ->render_manager()
159 ->GetProxyToOuterDelegate();
160 FrameTreeNode* outer_node = FrameTreeNode::GloballyFindByID(
161 web_contents_->GetOuterDelegateFrameTreeNodeId());
162 RenderFrameHostImpl* rfhi =
163 outer_node->parent()->render_manager()->current_frame_host();
164
165 rfhi->AdvanceFocus(
166 reverse ? blink::WebFocusTypeBackward : blink::WebFocusTypeForward, rfp);
157 } 167 }
158 168
159 void WebContentsViewChildFrame::ShowContextMenu( 169 void WebContentsViewChildFrame::ShowContextMenu(
160 RenderFrameHost* render_frame_host, 170 RenderFrameHost* render_frame_host,
161 const ContextMenuParams& params) { 171 const ContextMenuParams& params) {
162 NOTREACHED(); 172 NOTREACHED();
163 } 173 }
164 174
165 void WebContentsViewChildFrame::StartDragging( 175 void WebContentsViewChildFrame::StartDragging(
166 const DropData& drop_data, 176 const DropData& drop_data,
167 WebDragOperationsMask ops, 177 WebDragOperationsMask ops,
168 const gfx::ImageSkia& image, 178 const gfx::ImageSkia& image,
169 const gfx::Vector2d& image_offset, 179 const gfx::Vector2d& image_offset,
170 const DragEventSourceInfo& event_info, 180 const DragEventSourceInfo& event_info,
171 RenderWidgetHostImpl* source_rwh) { 181 RenderWidgetHostImpl* source_rwh) {
172 NOTREACHED(); 182 NOTREACHED();
173 } 183 }
174 184
175 } // namespace content 185 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698