| 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 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "content/public/browser/devtools_http_handler.h" | 9 #include "content/public/browser/devtools_http_handler.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( | 86 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( |
| 87 WebContents* web_contents) | 87 WebContents* web_contents) |
| 88 : web_contents_(web_contents) { | 88 : web_contents_(web_contents) { |
| 89 } | 89 } |
| 90 | 90 |
| 91 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { | 91 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ShellWebContentsViewDelegate::ShowContextMenu( | 94 void ShellWebContentsViewDelegate::ShowContextMenu( |
| 95 const ContextMenuParams& params, | 95 const ContextMenuParams& params, |
| 96 const ContextMenuSourceType& type) { | 96 ContextMenuSourceType type) { |
| 97 params_ = params; | 97 params_ = params; |
| 98 bool has_link = !params_.unfiltered_link_url.is_empty(); | 98 bool has_link = !params_.unfiltered_link_url.is_empty(); |
| 99 bool has_selection = ! params_.selection_text.empty(); | 99 bool has_selection = ! params_.selection_text.empty(); |
| 100 | 100 |
| 101 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; | 101 NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; |
| 102 ShellContextMenuDelegate* delegate = | 102 ShellContextMenuDelegate* delegate = |
| 103 [[ShellContextMenuDelegate alloc] initWithDelegate:this]; | 103 [[ShellContextMenuDelegate alloc] initWithDelegate:this]; |
| 104 [menu setDelegate:delegate]; | 104 [menu setDelegate:delegate]; |
| 105 [menu setAutoenablesItems:NO]; | 105 [menu setAutoenablesItems:NO]; |
| 106 | 106 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 return NULL; | 277 return NULL; |
| 278 } | 278 } |
| 279 | 279 |
| 280 NSObject<RenderWidgetHostViewMacDelegate>* | 280 NSObject<RenderWidgetHostViewMacDelegate>* |
| 281 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate( | 281 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate( |
| 282 content::RenderWidgetHost* render_widget_host) { | 282 content::RenderWidgetHost* render_widget_host) { |
| 283 return NULL; | 283 return NULL; |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace content | 286 } // namespace content |
| OLD | NEW |