OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "ios/chrome/browser/infobars/infobar_container_ios.h" | 5 #include "ios/chrome/browser/infobars/infobar_container_ios.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | |
12 #include "ios/chrome/browser/infobars/infobar.h" | 11 #include "ios/chrome/browser/infobars/infobar.h" |
13 #include "ios/chrome/browser/infobars/infobar_container_view.h" | 12 #include "ios/chrome/browser/infobars/infobar_container_view.h" |
| 13 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
14 | 14 |
15 InfoBarContainerIOS::InfoBarContainerIOS( | 15 InfoBarContainerIOS::InfoBarContainerIOS( |
16 infobars::InfoBarContainer::Delegate* delegate) | 16 infobars::InfoBarContainer::Delegate* delegate) |
17 : InfoBarContainer(delegate), delegate_(delegate) { | 17 : InfoBarContainer(delegate), delegate_(delegate) { |
18 DCHECK(delegate); | 18 DCHECK(delegate); |
19 container_view_.reset([[InfoBarContainerView alloc] init]); | 19 container_view_.reset([[InfoBarContainerView alloc] init]); |
20 [container_view_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth | | 20 [container_view_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth | |
21 UIViewAutoresizingFlexibleTopMargin]; | 21 UIViewAutoresizingFlexibleTopMargin]; |
22 } | 22 } |
23 | 23 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 void InfoBarContainerIOS::SuspendInfobars() { | 63 void InfoBarContainerIOS::SuspendInfobars() { |
64 ios::GetChromeBrowserProvider()->SetUIViewAlphaWithAnimation(container_view_, | 64 ios::GetChromeBrowserProvider()->SetUIViewAlphaWithAnimation(container_view_, |
65 0); | 65 0); |
66 } | 66 } |
67 | 67 |
68 void InfoBarContainerIOS::RestoreInfobars() { | 68 void InfoBarContainerIOS::RestoreInfobars() { |
69 ios::GetChromeBrowserProvider()->SetUIViewAlphaWithAnimation(container_view_, | 69 ios::GetChromeBrowserProvider()->SetUIViewAlphaWithAnimation(container_view_, |
70 1); | 70 1); |
71 } | 71 } |
OLD | NEW |