| 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 #import "base/mac/mac_util.h" | 7 #import "base/mac/mac_util.h" |
| 8 #include "base/mac/sdk_forward_declarations.h" | 8 #include "base/mac/sdk_forward_declarations.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 BrowserWindowController* controller() const { | 202 BrowserWindowController* controller() const { |
| 203 return [BrowserWindowController browserWindowControllerForWindow: | 203 return [BrowserWindowController browserWindowControllerForWindow: |
| 204 browser()->window()->GetNativeWindow()]; | 204 browser()->window()->GetNativeWindow()]; |
| 205 } | 205 } |
| 206 | 206 |
| 207 static void ShowInfoBar(Browser* browser) { | 207 static void ShowInfoBar(Browser* browser) { |
| 208 SimpleAlertInfoBarDelegate::Create( | 208 SimpleAlertInfoBarDelegate::Create( |
| 209 InfoBarService::FromWebContents( | 209 InfoBarService::FromWebContents( |
| 210 browser->tab_strip_model()->GetActiveWebContents()), | 210 browser->tab_strip_model()->GetActiveWebContents()), |
| 211 "BrowserWindowControllerTest", |
| 211 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); | 212 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); |
| 212 } | 213 } |
| 213 | 214 |
| 214 NSView* GetViewWithID(ViewID view_id) const { | 215 NSView* GetViewWithID(ViewID view_id) const { |
| 215 switch (view_id) { | 216 switch (view_id) { |
| 216 case VIEW_ID_FULLSCREEN_FLOATING_BAR: | 217 case VIEW_ID_FULLSCREEN_FLOATING_BAR: |
| 217 return [controller() floatingBarBackingView]; | 218 return [controller() floatingBarBackingView]; |
| 218 case VIEW_ID_TOOLBAR: | 219 case VIEW_ID_TOOLBAR: |
| 219 return [[controller() toolbarController] view]; | 220 return [[controller() toolbarController] view]; |
| 220 case VIEW_ID_BOOKMARK_BAR: | 221 case VIEW_ID_BOOKMARK_BAR: |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 VerifyWindowControlsZOrder(); | 631 VerifyWindowControlsZOrder(); |
| 631 [controller() removeOverlay]; | 632 [controller() removeOverlay]; |
| 632 VerifyWindowControlsZOrder(); | 633 VerifyWindowControlsZOrder(); |
| 633 | 634 |
| 634 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen, | 635 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen, |
| 635 // there are no window controls. | 636 // there are no window controls. |
| 636 [controller() enterImmersiveFullscreen]; | 637 [controller() enterImmersiveFullscreen]; |
| 637 [controller() exitImmersiveFullscreen]; | 638 [controller() exitImmersiveFullscreen]; |
| 638 VerifyWindowControlsZOrder(); | 639 VerifyWindowControlsZOrder(); |
| 639 } | 640 } |
| OLD | NEW |