OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |