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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 } | 864 } |
865 } | 865 } |
866 | 866 |
867 - (BOOL)isFullscreen { | 867 - (BOOL)isFullscreen { |
868 return fullscreen_; | 868 return fullscreen_; |
869 } | 869 } |
870 | 870 |
871 // Called by the bookmark bar to open a URL. | 871 // Called by the bookmark bar to open a URL. |
872 - (void)openBookmarkURL:(const GURL&)url | 872 - (void)openBookmarkURL:(const GURL&)url |
873 disposition:(WindowOpenDisposition)disposition { | 873 disposition:(WindowOpenDisposition)disposition { |
874 TabContents* tab_contents = browser_->GetSelectedTabContents(); | 874 browser_->OpenURL(url, GURL(), disposition, PageTransition::AUTO_BOOKMARK); |
875 DCHECK(tab_contents); | |
876 tab_contents->OpenURL(url, GURL(), disposition, | |
877 PageTransition::AUTO_BOOKMARK); | |
878 } | 875 } |
879 | 876 |
880 - (NSInteger)numberOfTabs { | 877 - (NSInteger)numberOfTabs { |
881 return browser_->tabstrip_model()->count(); | 878 return browser_->tabstrip_model()->count(); |
882 } | 879 } |
883 | 880 |
884 - (NSString*)selectedTabTitle { | 881 - (NSString*)selectedTabTitle { |
885 TabContents* contents = browser_->tabstrip_model()->GetSelectedTabContents(); | 882 TabContents* contents = browser_->tabstrip_model()->GetSelectedTabContents(); |
886 return base::SysUTF16ToNSString(contents->GetTitle()); | 883 return base::SysUTF16ToNSString(contents->GetTitle()); |
887 } | 884 } |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; | 1231 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; |
1235 [theme setValue:toolbarButtonBorderColor | 1232 [theme setValue:toolbarButtonBorderColor |
1236 forAttribute:@"borderColor" | 1233 forAttribute:@"borderColor" |
1237 style:GTMThemeStyleToolBar | 1234 style:GTMThemeStyleToolBar |
1238 state:YES]; | 1235 state:YES]; |
1239 | 1236 |
1240 return theme; | 1237 return theme; |
1241 } | 1238 } |
1242 @end | 1239 @end |
1243 | 1240 |
OLD | NEW |