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/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
9 | 9 |
10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 BrowserWindowController* controller() const { | 244 BrowserWindowController* controller() const { |
245 return [BrowserWindowController browserWindowControllerForWindow: | 245 return [BrowserWindowController browserWindowControllerForWindow: |
246 browser()->window()->GetNativeWindow()]; | 246 browser()->window()->GetNativeWindow()]; |
247 } | 247 } |
248 | 248 |
249 static void ShowInfoBar(Browser* browser) { | 249 static void ShowInfoBar(Browser* browser) { |
250 SimpleAlertInfoBarDelegate::Create( | 250 SimpleAlertInfoBarDelegate::Create( |
251 InfoBarService::FromWebContents( | 251 InfoBarService::FromWebContents( |
252 browser->tab_strip_model()->GetActiveWebContents()), | 252 browser->tab_strip_model()->GetActiveWebContents()), |
253 infobars::InfoBarDelegate::TEST_INFOBAR, | 253 infobars::InfoBarDelegate::TEST_INFOBAR, nullptr, base::string16(), |
254 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); | 254 false); |
255 } | 255 } |
256 | 256 |
257 NSView* GetViewWithID(ViewID view_id) const { | 257 NSView* GetViewWithID(ViewID view_id) const { |
258 switch (view_id) { | 258 switch (view_id) { |
259 case VIEW_ID_FULLSCREEN_FLOATING_BAR: | 259 case VIEW_ID_FULLSCREEN_FLOATING_BAR: |
260 return [controller() floatingBarBackingView]; | 260 return [controller() floatingBarBackingView]; |
261 case VIEW_ID_TOOLBAR: | 261 case VIEW_ID_TOOLBAR: |
262 return [[controller() toolbarController] view]; | 262 return [[controller() toolbarController] view]; |
263 case VIEW_ID_BOOKMARK_BAR: | 263 case VIEW_ID_BOOKMARK_BAR: |
264 return [[controller() bookmarkBarController] view]; | 264 return [[controller() bookmarkBarController] view]; |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 789 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
790 [fullscreenToolbarController resetToolbarFlag]; | 790 [fullscreenToolbarController resetToolbarFlag]; |
791 | 791 |
792 // Switch to a non-NTP tab. | 792 // Switch to a non-NTP tab. |
793 TabStripModel* model = browser()->tab_strip_model(); | 793 TabStripModel* model = browser()->tab_strip_model(); |
794 model->ActivateTabAt(1, true); | 794 model->ActivateTabAt(1, true); |
795 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); | 795 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); |
796 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 796 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
797 [fullscreenToolbarController resetToolbarFlag]; | 797 [fullscreenToolbarController resetToolbarFlag]; |
798 } | 798 } |
OLD | NEW |