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

Side by Side Diff: content/shell/shell_web_contents_view_delegate_mac.mm

Issue 12334073: Remove WebContents methods that duplicate WebContentsView methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 NSMenuItem* separator = [NSMenuItem separatorItem]; 194 NSMenuItem* separator = [NSMenuItem separatorItem];
195 [menu addItem:separator]; 195 [menu addItem:separator];
196 } 196 }
197 197
198 MakeContextMenuItem(@"Inspect", 198 MakeContextMenuItem(@"Inspect",
199 ShellContextMenuItemInspectTag, 199 ShellContextMenuItemInspectTag,
200 menu, 200 menu,
201 YES, 201 YES,
202 delegate); 202 delegate);
203 203
204 NSView* parent_view = web_contents_->GetContentNativeView(); 204 NSView* parent_view = web_contents_->GetView()->GetContentNativeView();
205 NSEvent* currentEvent = [NSApp currentEvent]; 205 NSEvent* currentEvent = [NSApp currentEvent];
206 NSWindow* window = [parent_view window]; 206 NSWindow* window = [parent_view window];
207 NSPoint position = [window mouseLocationOutsideOfEventStream]; 207 NSPoint position = [window mouseLocationOutsideOfEventStream];
208 NSTimeInterval eventTime = [currentEvent timestamp]; 208 NSTimeInterval eventTime = [currentEvent timestamp];
209 NSEvent* clickEvent = [NSEvent mouseEventWithType:NSRightMouseDown 209 NSEvent* clickEvent = [NSEvent mouseEventWithType:NSRightMouseDown
210 location:position 210 location:position
211 modifierFlags:NSRightMouseDownMask 211 modifierFlags:NSRightMouseDownMask
212 timestamp:eventTime 212 timestamp:eventTime
213 windowNumber:[window windowNumber] 213 windowNumber:[window windowNumber]
214 context:nil 214 context:nil
(...skipping 26 matching lines...) Expand all
241 GetContentClient()->browser())->browser_context(); 241 GetContentClient()->browser())->browser_context();
242 Shell::CreateNewWindow(browser_context, 242 Shell::CreateNewWindow(browser_context,
243 params_.link_url, 243 params_.link_url,
244 NULL, 244 NULL,
245 MSG_ROUTING_NONE, 245 MSG_ROUTING_NONE,
246 gfx::Size()); 246 gfx::Size());
247 break; 247 break;
248 } 248 }
249 case ShellContextMenuItemBackTag: 249 case ShellContextMenuItemBackTag:
250 web_contents_->GetController().GoToOffset(-1); 250 web_contents_->GetController().GoToOffset(-1);
251 web_contents_->Focus(); 251 web_contents_->GetView()->Focus();
252 break; 252 break;
253 case ShellContextMenuItemForwardTag: 253 case ShellContextMenuItemForwardTag:
254 web_contents_->GetController().GoToOffset(1); 254 web_contents_->GetController().GoToOffset(1);
255 web_contents_->Focus(); 255 web_contents_->GetView()->Focus();
256 break; 256 break;
257 case ShellContextMenuItemReloadTag: { 257 case ShellContextMenuItemReloadTag: {
258 web_contents_->GetController().Reload(false); 258 web_contents_->GetController().Reload(false);
259 web_contents_->Focus(); 259 web_contents_->GetView()->Focus();
260 break; 260 break;
261 } 261 }
262 case ShellContextMenuItemInspectTag: { 262 case ShellContextMenuItemInspectTag: {
263 ShellDevToolsFrontend::Show(web_contents_); 263 ShellDevToolsFrontend::Show(web_contents_);
264 break; 264 break;
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() { 269 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() {
270 return NULL; 270 return NULL;
271 } 271 }
272 272
273 NSObject<RenderWidgetHostViewMacDelegate>* 273 NSObject<RenderWidgetHostViewMacDelegate>*
274 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate( 274 ShellWebContentsViewDelegate::CreateRenderWidgetHostViewDelegate(
275 content::RenderWidgetHost* render_widget_host) { 275 content::RenderWidgetHost* render_widget_host) {
276 return NULL; 276 return NULL;
277 } 277 }
278 278
279 } // namespace content 279 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_web_contents_view_delegate_gtk.cc ('k') | content/shell/shell_web_contents_view_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698