OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell/shell_web_contents_view_delegate.h" | 5 #include "content/shell/shell_web_contents_view_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/browser/render_process_host.h" | 8 #include "content/public/browser/render_process_host.h" |
9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 GetContentClient()->browser())->browser_context(); | 209 GetContentClient()->browser())->browser_context(); |
210 Shell::CreateNewWindow(browser_context, | 210 Shell::CreateNewWindow(browser_context, |
211 params_.link_url, | 211 params_.link_url, |
212 NULL, | 212 NULL, |
213 MSG_ROUTING_NONE, | 213 MSG_ROUTING_NONE, |
214 gfx::Size()); | 214 gfx::Size()); |
215 break; | 215 break; |
216 } | 216 } |
217 case ShellContextMenuItemBackId: | 217 case ShellContextMenuItemBackId: |
218 web_contents_->GetController().GoToOffset(-1); | 218 web_contents_->GetController().GoToOffset(-1); |
219 web_contents_->Focus(); | 219 web_contents_->GetView()->Focus(); |
220 break; | 220 break; |
221 case ShellContextMenuItemForwardId: | 221 case ShellContextMenuItemForwardId: |
222 web_contents_->GetController().GoToOffset(1); | 222 web_contents_->GetController().GoToOffset(1); |
223 web_contents_->Focus(); | 223 web_contents_->GetView()->Focus(); |
224 break; | 224 break; |
225 case ShellContextMenuItemReloadId: | 225 case ShellContextMenuItemReloadId: |
226 web_contents_->GetController().Reload(false); | 226 web_contents_->GetController().Reload(false); |
227 web_contents_->Focus(); | 227 web_contents_->GetView()->Focus(); |
228 break; | 228 break; |
229 case ShellContextMenuItemInspectId: { | 229 case ShellContextMenuItemInspectId: { |
230 ShellDevToolsFrontend::Show(web_contents_); | 230 ShellDevToolsFrontend::Show(web_contents_); |
231 break; | 231 break; |
232 } | 232 } |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() { | 236 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() { |
237 return NULL; | 237 return NULL; |
238 } | 238 } |
239 | 239 |
240 void ShellWebContentsViewDelegate::StoreFocus() { | 240 void ShellWebContentsViewDelegate::StoreFocus() { |
241 } | 241 } |
242 | 242 |
243 void ShellWebContentsViewDelegate::RestoreFocus() { | 243 void ShellWebContentsViewDelegate::RestoreFocus() { |
244 } | 244 } |
245 | 245 |
246 bool ShellWebContentsViewDelegate::Focus() { | 246 bool ShellWebContentsViewDelegate::Focus() { |
247 return false; | 247 return false; |
248 } | 248 } |
249 | 249 |
250 void ShellWebContentsViewDelegate::TakeFocus(bool reverse) { | 250 void ShellWebContentsViewDelegate::TakeFocus(bool reverse) { |
251 } | 251 } |
252 | 252 |
253 void ShellWebContentsViewDelegate::SizeChanged(const gfx::Size& size) { | 253 void ShellWebContentsViewDelegate::SizeChanged(const gfx::Size& size) { |
254 } | 254 } |
255 | 255 |
256 } // namespace content | 256 } // namespace content |
OLD | NEW |