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_mac.mm

Issue 10837112: Add WebContents* to some more WebContentsDelegate methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 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
« no previous file with comments | « content/shell/shell.h ('k') | ui/views/controls/webview/web_dialog_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "content/shell/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 void Shell::URLEntered(std::string url_string) { 270 void Shell::URLEntered(std::string url_string) {
271 if (!url_string.empty()) { 271 if (!url_string.empty()) {
272 GURL url(url_string); 272 GURL url(url_string);
273 if (!url.has_scheme()) 273 if (!url.has_scheme())
274 url = GURL("http://" + url_string); 274 url = GURL("http://" + url_string);
275 LoadURL(url); 275 LoadURL(url);
276 } 276 }
277 } 277 }
278 278
279 void Shell::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 279 void Shell::HandleKeyboardEvent(WebContents* source,
280 const NativeWebKeyboardEvent& event) {
280 if (event.skip_in_browser) 281 if (event.skip_in_browser)
281 return; 282 return;
282 283
283 // The event handling to get this strictly right is a tangle; cheat here a bit 284 // The event handling to get this strictly right is a tangle; cheat here a bit
284 // by just letting the menus have a chance at it. 285 // by just letting the menus have a chance at it.
285 if ([event.os_event type] == NSKeyDown) 286 if ([event.os_event type] == NSKeyDown)
286 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; 287 [[NSApp mainMenu] performKeyEquivalent:event.os_event];
287 } 288 }
288 289
289 } // namespace content 290 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell.h ('k') | ui/views/controls/webview/web_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698