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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 631 } | 631 } |
| 632 | 632 |
| 633 - (GTMWindowSheetController*)sheetController { | 633 - (GTMWindowSheetController*)sheetController { |
| 634 return [tabStripController_ sheetController]; | 634 return [tabStripController_ sheetController]; |
| 635 } | 635 } |
| 636 | 636 |
| 637 - (LocationBar*)locationBar { | 637 - (LocationBar*)locationBar { |
| 638 return [toolbarController_ locationBar]; | 638 return [toolbarController_ locationBar]; |
| 639 } | 639 } |
| 640 | 640 |
| 641 - (StatusBubble*)statusBubble { | 641 - (StatusBubbleMac*)statusBubble { |
| 642 return statusBubble_.get(); | 642 return statusBubble_.get(); |
| 643 } | 643 } |
| 644 | 644 |
| 645 - (void)updateToolbarWithContents:(TabContents*)tab | 645 - (void)updateToolbarWithContents:(TabContents*)tab |
| 646 shouldRestoreState:(BOOL)shouldRestore { | 646 shouldRestoreState:(BOOL)shouldRestore { |
| 647 [toolbarController_ updateToolbarWithContents:tab | 647 [toolbarController_ updateToolbarWithContents:tab |
| 648 shouldRestoreState:shouldRestore]; | 648 shouldRestoreState:shouldRestore]; |
| 649 } | 649 } |
| 650 | 650 |
| 651 - (void)setStarredState:(BOOL)isStarred { | 651 - (void)setStarredState:(BOOL)isStarred { |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1063 configuration:BookmarkEditor::SHOW_TREE | 1063 configuration:BookmarkEditor::SHOW_TREE |
| 1064 handler:NULL] | 1064 handler:NULL] |
| 1065 runAsModalSheet]; | 1065 runAsModalSheet]; |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 // Implement BookmarkBubbleControllerDelegate | 1068 // Implement BookmarkBubbleControllerDelegate |
| 1069 - (void)doneWithBubbleController:(BookmarkBubbleController*)controller { | 1069 - (void)doneWithBubbleController:(BookmarkBubbleController*)controller { |
| 1070 bookmarkBubbleController_.reset(nil); | 1070 bookmarkBubbleController_.reset(nil); |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 // Delegate method called when window is resized. | |
| 1074 - (void)windowDidResize:(NSNotification*)notification { | |
| 1075 // Resize (and possibly move) the status bubble. Note that we may get called | |
| 1076 // when the status bubble does not exist. | |
| 1077 if(statusBubble_.get()) | |
|
pink (ping after 24hrs)
2009/10/09 14:03:27
space between if and paren.
| |
| 1078 statusBubble_->UpdateSizeAndPosition(); | |
| 1079 } | |
| 1080 | |
| 1073 @end | 1081 @end |
| 1074 | 1082 |
| 1075 @implementation BrowserWindowController (Private) | 1083 @implementation BrowserWindowController (Private) |
| 1076 | 1084 |
| 1077 // If the browser is in incognito mode, install the image view to decorate | 1085 // If the browser is in incognito mode, install the image view to decorate |
| 1078 // the window at the upper right. Use the same base y coordinate as the | 1086 // the window at the upper right. Use the same base y coordinate as the |
| 1079 // tab strip. | 1087 // tab strip. |
| 1080 - (void)installIncognitoBadge { | 1088 - (void)installIncognitoBadge { |
| 1081 if (!browser_->profile()->IsOffTheRecord()) | 1089 if (!browser_->profile()->IsOffTheRecord()) |
| 1082 return; | 1090 return; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1454 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); | 1462 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); |
| 1455 [theme setValue:toolbarBackgroundColor | 1463 [theme setValue:toolbarBackgroundColor |
| 1456 forAttribute:@"backgroundColor" | 1464 forAttribute:@"backgroundColor" |
| 1457 style:GTMThemeStyleToolBar | 1465 style:GTMThemeStyleToolBar |
| 1458 state:GTMThemeStateActiveWindow]; | 1466 state:GTMThemeStateActiveWindow]; |
| 1459 | 1467 |
| 1460 return theme; | 1468 return theme; |
| 1461 } | 1469 } |
| 1462 @end | 1470 @end |
| 1463 | 1471 |
| OLD | NEW |