Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
| 8 #include "base/scoped_nsdisable_screen_updates.h" | 8 #include "base/scoped_nsdisable_screen_updates.h" |
| 9 #import "base/scoped_nsobject.h" | 9 #import "base/scoped_nsobject.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 // We need to activate the controls (in the "WebView"). To do this, get the | 316 // We need to activate the controls (in the "WebView"). To do this, get the |
| 317 // selected TabContents's RenderWidgetHostViewMac and tell it to activate. | 317 // selected TabContents's RenderWidgetHostViewMac and tell it to activate. |
| 318 if (TabContents* contents = browser_->GetSelectedTabContents()) { | 318 if (TabContents* contents = browser_->GetSelectedTabContents()) { |
| 319 if (RenderWidgetHostView* rwhv = contents->render_widget_host_view()) | 319 if (RenderWidgetHostView* rwhv = contents->render_widget_host_view()) |
| 320 rwhv->SetActive(true); | 320 rwhv->SetActive(true); |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 | 323 |
| 324 // Called when we are deactivated (when we lose focus). | 324 // Called when we are deactivated (when we lose focus). |
| 325 - (void)windowDidResignKey:(NSNotification*)notification { | 325 - (void)windowDidResignKey:(NSNotification*)notification { |
| 326 // If our app is still active and we're still the key window, ignore this | |
| 327 // message, since it just means that a menu extra (on the "system status bar") | |
| 328 // was activated; we'll get another |-windowDidResignKey| if we ever really | |
| 329 // lose key window status. | |
| 330 if ([NSApp isActive] && ([NSApp keyWindow] == window_)) | |
|
pink (ping after 24hrs)
2009/08/12 14:49:16
what does this do in the case of a panel visible,
viettrungluu-gmail
2009/08/12 14:59:21
What do you mean, "panel"? (AFAICT, it works as it
| |
| 331 return; | |
| 332 | |
| 326 // We need to deactivate the controls (in the "WebView"). To do this, get the | 333 // We need to deactivate the controls (in the "WebView"). To do this, get the |
| 327 // selected TabContents's RenderWidgetHostView and tell it to deactivate. | 334 // selected TabContents's RenderWidgetHostView and tell it to deactivate. |
| 328 if (TabContents* contents = browser_->GetSelectedTabContents()) { | 335 if (TabContents* contents = browser_->GetSelectedTabContents()) { |
| 329 if (RenderWidgetHostView* rwhv = contents->render_widget_host_view()) | 336 if (RenderWidgetHostView* rwhv = contents->render_widget_host_view()) |
| 330 rwhv->SetActive(false); | 337 rwhv->SetActive(false); |
| 331 } | 338 } |
| 332 } | 339 } |
| 333 | 340 |
| 334 | 341 |
| 335 | 342 |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1162 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; | 1169 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; |
| 1163 [theme setValue:toolbarButtonBorderColor | 1170 [theme setValue:toolbarButtonBorderColor |
| 1164 forAttribute:@"borderColor" | 1171 forAttribute:@"borderColor" |
| 1165 style:GTMThemeStyleToolBar | 1172 style:GTMThemeStyleToolBar |
| 1166 state:YES]; | 1173 state:YES]; |
| 1167 | 1174 |
| 1168 return theme; | 1175 return theme; |
| 1169 } | 1176 } |
| 1170 @end | 1177 @end |
| 1171 | 1178 |
| OLD | NEW |