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

Side by Side Diff: chrome/browser/cocoa/browser_window_cocoa.mm

Issue 196113: Activate Chromium after opening a new window. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« chrome/browser/browser.cc ('K') | « chrome/browser/browser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/gfx/rect.h" 5 #include "base/gfx/rect.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_utils.h" 8 #include "chrome/browser/bookmarks/bookmark_utils.h"
9 #include "chrome/browser/cocoa/browser_window_cocoa.h" 9 #include "chrome/browser/cocoa/browser_window_cocoa.h"
10 #import "chrome/browser/cocoa/browser_window_controller.h" 10 #import "chrome/browser/cocoa/browser_window_controller.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Callers assume that this doesn't immediately delete the Browser object. 51 // Callers assume that this doesn't immediately delete the Browser object.
52 // The controller implementing the window delegate methods called from 52 // The controller implementing the window delegate methods called from
53 // |-performClose:| must take precautiions to ensure that. 53 // |-performClose:| must take precautiions to ensure that.
54 void BrowserWindowCocoa::Close() { 54 void BrowserWindowCocoa::Close() {
55 [window_ orderOut:controller_]; 55 [window_ orderOut:controller_];
56 [window_ performClose:controller_]; 56 [window_ performClose:controller_];
57 } 57 }
58 58
59 void BrowserWindowCocoa::Activate() { 59 void BrowserWindowCocoa::Activate() {
60 [window_ makeKeyAndOrderFront:controller_]; 60 [window_ makeKeyAndOrderFront:controller_];
61 [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
John Grabowski 2009/09/16 20:14:02 s/[NSApplication sharedApplication]/NSApp/g Not su
61 } 62 }
62 63
63 void BrowserWindowCocoa::FlashFrame() { 64 void BrowserWindowCocoa::FlashFrame() {
64 [[NSApplication sharedApplication] 65 [[NSApplication sharedApplication]
65 requestUserAttention:NSInformationalRequest]; 66 requestUserAttention:NSInformationalRequest];
66 } 67 }
67 68
68 bool BrowserWindowCocoa::IsActive() const { 69 bool BrowserWindowCocoa::IsActive() const {
69 return [window_ isKeyWindow]; 70 return [window_ isKeyWindow];
70 } 71 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 break; 317 break;
317 } 318 }
318 } 319 }
319 320
320 void BrowserWindowCocoa::DestroyBrowser() { 321 void BrowserWindowCocoa::DestroyBrowser() {
321 [controller_ destroyBrowser]; 322 [controller_ destroyBrowser];
322 323
323 // at this point the controller is dead (autoreleased), so 324 // at this point the controller is dead (autoreleased), so
324 // make sure we don't try to reference it any more. 325 // make sure we don't try to reference it any more.
325 } 326 }
OLDNEW
« chrome/browser/browser.cc ('K') | « chrome/browser/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698