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 22 matching lines...) Expand all Loading... |
33 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" | 33 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" |
34 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" | 34 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" |
35 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 35 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
36 #include "chrome/browser/ui/extensions/application_launch.h" | 36 #include "chrome/browser/ui/extensions/application_launch.h" |
37 #include "chrome/browser/ui/find_bar/find_bar.h" | 37 #include "chrome/browser/ui/find_bar/find_bar.h" |
38 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 38 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
39 #include "chrome/browser/ui/infobar_container_delegate.h" | 39 #include "chrome/browser/ui/infobar_container_delegate.h" |
40 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 40 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
41 #include "chrome/test/base/in_process_browser_test.h" | 41 #include "chrome/test/base/in_process_browser_test.h" |
42 #include "chrome/test/base/testing_profile.h" | 42 #include "chrome/test/base/testing_profile.h" |
| 43 #include "components/infobars/core/infobar_delegate.h" |
43 #include "components/infobars/core/simple_alert_infobar_delegate.h" | 44 #include "components/infobars/core/simple_alert_infobar_delegate.h" |
44 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
45 #include "content/public/test/test_utils.h" | 46 #include "content/public/test/test_utils.h" |
46 #import "testing/gtest_mac.h" | 47 #import "testing/gtest_mac.h" |
47 #import "third_party/ocmock/OCMock/OCMock.h" | 48 #import "third_party/ocmock/OCMock/OCMock.h" |
48 #import "ui/base/cocoa/nsview_additions.h" | 49 #import "ui/base/cocoa/nsview_additions.h" |
49 #include "ui/gfx/animation/slide_animation.h" | 50 #include "ui/gfx/animation/slide_animation.h" |
50 #include "ui/gfx/vector_icons_public.h" | 51 #include "ui/gfx/vector_icons_public.h" |
51 | 52 |
52 namespace { | 53 namespace { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 205 |
205 BrowserWindowController* controller() const { | 206 BrowserWindowController* controller() const { |
206 return [BrowserWindowController browserWindowControllerForWindow: | 207 return [BrowserWindowController browserWindowControllerForWindow: |
207 browser()->window()->GetNativeWindow()]; | 208 browser()->window()->GetNativeWindow()]; |
208 } | 209 } |
209 | 210 |
210 static void ShowInfoBar(Browser* browser) { | 211 static void ShowInfoBar(Browser* browser) { |
211 SimpleAlertInfoBarDelegate::Create( | 212 SimpleAlertInfoBarDelegate::Create( |
212 InfoBarService::FromWebContents( | 213 InfoBarService::FromWebContents( |
213 browser->tab_strip_model()->GetActiveWebContents()), | 214 browser->tab_strip_model()->GetActiveWebContents()), |
| 215 infobars::InfoBarDelegate::TEST_INFOBAR, |
214 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); | 216 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); |
215 } | 217 } |
216 | 218 |
217 NSView* GetViewWithID(ViewID view_id) const { | 219 NSView* GetViewWithID(ViewID view_id) const { |
218 switch (view_id) { | 220 switch (view_id) { |
219 case VIEW_ID_FULLSCREEN_FLOATING_BAR: | 221 case VIEW_ID_FULLSCREEN_FLOATING_BAR: |
220 return [controller() floatingBarBackingView]; | 222 return [controller() floatingBarBackingView]; |
221 case VIEW_ID_TOOLBAR: | 223 case VIEW_ID_TOOLBAR: |
222 return [[controller() toolbarController] view]; | 224 return [[controller() toolbarController] view]; |
223 case VIEW_ID_BOOKMARK_BAR: | 225 case VIEW_ID_BOOKMARK_BAR: |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 VerifyWindowControlsZOrder(); | 635 VerifyWindowControlsZOrder(); |
634 [controller() removeOverlay]; | 636 [controller() removeOverlay]; |
635 VerifyWindowControlsZOrder(); | 637 VerifyWindowControlsZOrder(); |
636 | 638 |
637 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen, | 639 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen, |
638 // there are no window controls. | 640 // there are no window controls. |
639 [controller() enterImmersiveFullscreen]; | 641 [controller() enterImmersiveFullscreen]; |
640 [controller() exitImmersiveFullscreen]; | 642 [controller() exitImmersiveFullscreen]; |
641 VerifyWindowControlsZOrder(); | 643 VerifyWindowControlsZOrder(); |
642 } | 644 } |
OLD | NEW |