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

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

Issue 2132983002: Move content shell context menu to ShellWebContentsViewDelegate in Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cast_shell_linux compile error Created 4 years, 5 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
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.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 void Shell::PlatformSetTitle(const base::string16& title) { 269 void Shell::PlatformSetTitle(const base::string16& title) {
270 if (headless_) 270 if (headless_)
271 return; 271 return;
272 272
273 NSString* title_string = base::SysUTF16ToNSString(title); 273 NSString* title_string = base::SysUTF16ToNSString(title);
274 [window_ setTitle:title_string]; 274 [window_ setTitle:title_string];
275 } 275 }
276 276
277 bool Shell::PlatformHandleContextMenu(
278 const content::ContextMenuParams& params) {
279 return false;
280 }
281
282 void Shell::Close() { 277 void Shell::Close() {
283 if (headless_) 278 if (headless_)
284 delete this; 279 delete this;
285 else 280 else
286 [window_ performClose:nil]; 281 [window_ performClose:nil];
287 } 282 }
288 283
289 void Shell::ActionPerformed(int control) { 284 void Shell::ActionPerformed(int control) {
290 switch (control) { 285 switch (control) {
291 case IDC_NAV_BACK: 286 case IDC_NAV_BACK:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 [[event.os_event characters] isEqual:@"l"]) { 319 [[event.os_event characters] isEqual:@"l"]) {
325 [window_ makeFirstResponder:url_edit_view_]; 320 [window_ makeFirstResponder:url_edit_view_];
326 return; 321 return;
327 } 322 }
328 323
329 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; 324 [[NSApp mainMenu] performKeyEquivalent:event.os_event];
330 } 325 }
331 } 326 }
332 327
333 } // namespace content 328 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698