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

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

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/shell_web_contents_view_delegate.h" 5 #include "content/shell/browser/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_frame_host.h" 10 #include "content/public/browser/render_frame_host.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 break; 234 break;
235 case ShellContextMenuItemDeleteTag: 235 case ShellContextMenuItemDeleteTag:
236 web_contents_->Delete(); 236 web_contents_->Delete();
237 break; 237 break;
238 case ShellContextMenuItemOpenLinkTag: { 238 case ShellContextMenuItemOpenLinkTag: {
239 ShellBrowserContext* browser_context = 239 ShellBrowserContext* browser_context =
240 ShellContentBrowserClient::Get()->browser_context(); 240 ShellContentBrowserClient::Get()->browser_context();
241 Shell::CreateNewWindow(browser_context, 241 Shell::CreateNewWindow(browser_context,
242 params_.link_url, 242 params_.link_url,
243 NULL, 243 NULL,
244 MSG_ROUTING_NONE,
245 gfx::Size()); 244 gfx::Size());
246 break; 245 break;
247 } 246 }
248 case ShellContextMenuItemBackTag: 247 case ShellContextMenuItemBackTag:
249 web_contents_->GetController().GoToOffset(-1); 248 web_contents_->GetController().GoToOffset(-1);
250 web_contents_->Focus(); 249 web_contents_->Focus();
251 break; 250 break;
252 case ShellContextMenuItemForwardTag: 251 case ShellContextMenuItemForwardTag:
253 web_contents_->GetController().GoToOffset(1); 252 web_contents_->GetController().GoToOffset(1);
254 web_contents_->Focus(); 253 web_contents_->Focus();
255 break; 254 break;
256 case ShellContextMenuItemReloadTag: { 255 case ShellContextMenuItemReloadTag: {
257 web_contents_->GetController().Reload(false); 256 web_contents_->GetController().Reload(false);
258 web_contents_->Focus(); 257 web_contents_->Focus();
259 break; 258 break;
260 } 259 }
261 case ShellContextMenuItemInspectTag: { 260 case ShellContextMenuItemInspectTag: {
262 ShellDevToolsFrontend::Show(web_contents_); 261 ShellDevToolsFrontend::Show(web_contents_);
263 break; 262 break;
264 } 263 }
265 } 264 }
266 } 265 }
267 266
268 } // namespace content 267 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698