| OLD | NEW |
| 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 "chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h" |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/cocoa/browser_window_utils.h" | 10 #include "chrome/browser/ui/cocoa/browser_window_utils.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 void ShellWindowCocoa::Show() { | 391 void ShellWindowCocoa::Show() { |
| 392 [window_controller_ showWindow:nil]; | 392 [window_controller_ showWindow:nil]; |
| 393 [window() makeKeyAndOrderFront:window_controller_]; | 393 [window() makeKeyAndOrderFront:window_controller_]; |
| 394 } | 394 } |
| 395 | 395 |
| 396 void ShellWindowCocoa::ShowInactive() { | 396 void ShellWindowCocoa::ShowInactive() { |
| 397 [window() orderFront:window_controller_]; | 397 [window() orderFront:window_controller_]; |
| 398 } | 398 } |
| 399 | 399 |
| 400 void ShellWindowCocoa::Hide() { |
| 401 [window() orderOut:window_controller_]; |
| 402 } |
| 403 |
| 400 void ShellWindowCocoa::Close() { | 404 void ShellWindowCocoa::Close() { |
| 401 [window() performClose:nil]; | 405 [window() performClose:nil]; |
| 402 } | 406 } |
| 403 | 407 |
| 404 void ShellWindowCocoa::Activate() { | 408 void ShellWindowCocoa::Activate() { |
| 405 [BrowserWindowUtils activateWindowForController:window_controller_]; | 409 [BrowserWindowUtils activateWindowForController:window_controller_]; |
| 406 } | 410 } |
| 407 | 411 |
| 408 void ShellWindowCocoa::Deactivate() { | 412 void ShellWindowCocoa::Deactivate() { |
| 409 // TODO(jcivelli): http://crbug.com/51364 Implement me. | 413 // TODO(jcivelli): http://crbug.com/51364 Implement me. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 NSWindow* window = [window_controller_ window]; | 708 NSWindow* window = [window_controller_ window]; |
| 705 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); | 709 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); |
| 706 return static_cast<ShellNSWindow*>(window); | 710 return static_cast<ShellNSWindow*>(window); |
| 707 } | 711 } |
| 708 | 712 |
| 709 // static | 713 // static |
| 710 NativeShellWindow* NativeShellWindow::Create( | 714 NativeShellWindow* NativeShellWindow::Create( |
| 711 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 715 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 712 return new ShellWindowCocoa(shell_window, params); | 716 return new ShellWindowCocoa(shell_window, params); |
| 713 } | 717 } |
| OLD | NEW |