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 NSView* web_view = web_contents_->GetView()->GetNativeView(); | 268 NSView* web_view = web_contents_->GetView()->GetNativeView(); |
269 NSRect frame = NSMakeRect(0, 0, content_size.width(), content_size.height()); | 269 NSRect frame = NSMakeRect(0, 0, content_size.width(), content_size.height()); |
270 [web_view setFrame:frame]; | 270 [web_view setFrame:frame]; |
271 } | 271 } |
272 | 272 |
273 void Shell::PlatformResizeSubViews() { | 273 void Shell::PlatformResizeSubViews() { |
274 // Not needed; subviews are bound. | 274 // Not needed; subviews are bound. |
275 } | 275 } |
276 | 276 |
277 void Shell::PlatformSetTitle(const string16& title) { | 277 void Shell::PlatformSetTitle(const base::string16& title) { |
278 if (headless_) | 278 if (headless_) |
279 return; | 279 return; |
280 | 280 |
281 NSString* title_string = base::SysUTF16ToNSString(title); | 281 NSString* title_string = base::SysUTF16ToNSString(title); |
282 [window_ setTitle:title_string]; | 282 [window_ setTitle:title_string]; |
283 } | 283 } |
284 | 284 |
285 void Shell::Close() { | 285 void Shell::Close() { |
286 if (headless_) | 286 if (headless_) |
287 delete this; | 287 delete this; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 [[event.os_event characters] isEqual:@"l"]) { | 327 [[event.os_event characters] isEqual:@"l"]) { |
328 [window_ makeFirstResponder:url_edit_view_]; | 328 [window_ makeFirstResponder:url_edit_view_]; |
329 return; | 329 return; |
330 } | 330 } |
331 | 331 |
332 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; | 332 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 } // namespace content | 336 } // namespace content |
OLD | NEW |