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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm

Issue 11147037: Add a 'hidden' option to chrome.app.window.create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ash tests Created 8 years, 1 month 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
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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h ('k') | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698