| 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 "content/public/browser/devtools_http_handler.h" | 7 #include "content/public/browser/devtools_http_handler.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( | 63 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( |
| 64 WebContents* web_contents) | 64 WebContents* web_contents) |
| 65 : web_contents_(web_contents) { | 65 : web_contents_(web_contents) { |
| 66 } | 66 } |
| 67 | 67 |
| 68 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { | 68 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { |
| 69 } | 69 } |
| 70 | 70 |
| 71 void ShellWebContentsViewDelegate::ShowContextMenu( | 71 void ShellWebContentsViewDelegate::ShowContextMenu( |
| 72 const ContextMenuParams& params, | 72 const ContextMenuParams& params, |
| 73 const ContextMenuSourceType& type) { | 73 ContextMenuSourceType type) { |
| 74 params_ = params; | 74 params_ = params; |
| 75 bool has_link = !params_.unfiltered_link_url.is_empty(); | 75 bool has_link = !params_.unfiltered_link_url.is_empty(); |
| 76 bool has_selection = !params_.selection_text.empty(); | 76 bool has_selection = !params_.selection_text.empty(); |
| 77 | 77 |
| 78 HMENU menu = CreateMenu(); | 78 HMENU menu = CreateMenu(); |
| 79 HMENU sub_menu = CreatePopupMenu(); | 79 HMENU sub_menu = CreatePopupMenu(); |
| 80 AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)sub_menu, L""); | 80 AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)sub_menu, L""); |
| 81 | 81 |
| 82 int index = 0; | 82 int index = 0; |
| 83 if (params_.media_type == WebContextMenuData::MediaTypeNone && | 83 if (params_.media_type == WebContextMenuData::MediaTypeNone && |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 void ShellWebContentsViewDelegate::TakeFocus(bool reverse) { | 262 void ShellWebContentsViewDelegate::TakeFocus(bool reverse) { |
| 263 NOTIMPLEMENTED(); | 263 NOTIMPLEMENTED(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void ShellWebContentsViewDelegate::SizeChanged(const gfx::Size& size) { | 266 void ShellWebContentsViewDelegate::SizeChanged(const gfx::Size& size) { |
| 267 NOTIMPLEMENTED(); | 267 NOTIMPLEMENTED(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace content | 270 } // namespace content |
| OLD | NEW |