OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 browser_->tab_strip_model()->GetActiveWebContents(); | 845 browser_->tab_strip_model()->GetActiveWebContents(); |
846 if (!active_tab) | 846 if (!active_tab) |
847 return -1; | 847 return -1; |
848 | 848 |
849 return SessionTabHelper::FromWebContents(active_tab)->session_id().id(); | 849 return SessionTabHelper::FromWebContents(active_tab)->session_id().id(); |
850 } | 850 } |
851 | 851 |
852 #pragma mark - | 852 #pragma mark - |
853 #pragma mark Testing Methods | 853 #pragma mark Testing Methods |
854 | 854 |
855 - (NSButton*)buttonWithIndex:(NSUInteger)index { | 855 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { |
856 const extensions::ExtensionList& toolbar_items = | 856 const extensions::ExtensionList& toolbar_items = |
857 toolbarModel_->toolbar_items(); | 857 toolbarModel_->toolbar_items(); |
858 if (index < toolbar_items.size()) { | 858 if (index < toolbar_items.size()) { |
859 const Extension* extension = toolbar_items[index].get(); | 859 const Extension* extension = toolbar_items[index].get(); |
860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
861 } | 861 } |
862 return nil; | 862 return nil; |
863 } | 863 } |
864 | 864 |
865 @end | 865 @end |
OLD | NEW |