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

Side by Side Diff: content/shell/browser/shell_web_contents_view_delegate_win.cc

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 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/browser/render_frame_host.h" 8 #include "content/public/browser/render_frame_host.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 break; 202 break;
203 case ShellContextMenuItemDeleteId: 203 case ShellContextMenuItemDeleteId:
204 web_contents_->Delete(); 204 web_contents_->Delete();
205 break; 205 break;
206 case ShellContextMenuItemOpenLinkId: { 206 case ShellContextMenuItemOpenLinkId: {
207 ShellBrowserContext* browser_context = 207 ShellBrowserContext* browser_context =
208 ShellContentBrowserClient::Get()->browser_context(); 208 ShellContentBrowserClient::Get()->browser_context();
209 Shell::CreateNewWindow(browser_context, 209 Shell::CreateNewWindow(browser_context,
210 params_.link_url, 210 params_.link_url,
211 NULL, 211 NULL,
212 MSG_ROUTING_NONE,
213 gfx::Size()); 212 gfx::Size());
214 break; 213 break;
215 } 214 }
216 case ShellContextMenuItemBackId: 215 case ShellContextMenuItemBackId:
217 web_contents_->GetController().GoToOffset(-1); 216 web_contents_->GetController().GoToOffset(-1);
218 web_contents_->Focus(); 217 web_contents_->Focus();
219 break; 218 break;
220 case ShellContextMenuItemForwardId: 219 case ShellContextMenuItemForwardId:
221 web_contents_->GetController().GoToOffset(1); 220 web_contents_->GetController().GoToOffset(1);
222 web_contents_->Focus(); 221 web_contents_->Focus();
223 break; 222 break;
224 case ShellContextMenuItemReloadId: 223 case ShellContextMenuItemReloadId:
225 web_contents_->GetController().Reload(false); 224 web_contents_->GetController().Reload(false);
226 web_contents_->Focus(); 225 web_contents_->Focus();
227 break; 226 break;
228 case ShellContextMenuItemInspectId: { 227 case ShellContextMenuItemInspectId: {
229 ShellDevToolsFrontend::Show(web_contents_); 228 ShellDevToolsFrontend::Show(web_contents_);
230 break; 229 break;
231 } 230 }
232 } 231 }
233 } 232 }
234 233
235 } // namespace content 234 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_web_contents_view_delegate_mac.mm ('k') | content/shell/browser/webkit_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698