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

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

Issue 3060045: Making window.focus() work in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/cocoa/browser_window_cocoa.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // involves a (indirect) recursion on |-performClose:|, which is also bad. 100 // involves a (indirect) recursion on |-performClose:|, which is also bad.
101 [window() orderOut:controller_]; 101 [window() orderOut:controller_];
102 [window() performClose:controller_]; 102 [window() performClose:controller_];
103 } 103 }
104 } 104 }
105 105
106 void BrowserWindowCocoa::Activate() { 106 void BrowserWindowCocoa::Activate() {
107 [controller_ activate]; 107 [controller_ activate];
108 } 108 }
109 109
110 void BrowserWindowCocoa::Deactivate() {
111 // TODO(jcivelli): http://crbug.com/51364 Implement me.
112 NOTIMPLEMENTED();
113 }
114
110 void BrowserWindowCocoa::FlashFrame() { 115 void BrowserWindowCocoa::FlashFrame() {
111 [NSApp requestUserAttention:NSInformationalRequest]; 116 [NSApp requestUserAttention:NSInformationalRequest];
112 } 117 }
113 118
114 bool BrowserWindowCocoa::IsActive() const { 119 bool BrowserWindowCocoa::IsActive() const {
115 return [window() isKeyWindow]; 120 return [window() isKeyWindow];
116 } 121 }
117 122
118 gfx::NativeWindow BrowserWindowCocoa::GetNativeHandle() { 123 gfx::NativeWindow BrowserWindowCocoa::GetNativeHandle() {
119 return window(); 124 return window();
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 void BrowserWindowCocoa::DestroyBrowser() { 579 void BrowserWindowCocoa::DestroyBrowser() {
575 [controller_ destroyBrowser]; 580 [controller_ destroyBrowser];
576 581
577 // at this point the controller is dead (autoreleased), so 582 // at this point the controller is dead (autoreleased), so
578 // make sure we don't try to reference it any more. 583 // make sure we don't try to reference it any more.
579 } 584 }
580 585
581 NSWindow* BrowserWindowCocoa::window() const { 586 NSWindow* BrowserWindowCocoa::window() const {
582 return [controller_ window]; 587 return [controller_ window];
583 } 588 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698