| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/mac/mac_util.h" | 6 #include "base/mac/mac_util.h" |
| 7 #include "chrome/browser/tab_contents/infobar_delegate.h" | 7 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 8 #include "chrome/browser/tab_contents/tab_contents.h" | 8 #include "chrome/browser/tab_contents/tab_contents.h" |
| 9 #import "chrome/browser/ui/cocoa/animatable_view.h" | 9 #import "chrome/browser/ui/cocoa/animatable_view.h" |
| 10 #include "chrome/browser/ui/cocoa/infobar.h" | 10 #include "chrome/browser/ui/cocoa/infobars/infobar.h" |
| 11 #import "chrome/browser/ui/cocoa/infobar_container_controller.h" | 11 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
| 12 #import "chrome/browser/ui/cocoa/infobar_controller.h" | 12 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" |
| 13 #import "chrome/browser/ui/cocoa/view_id_util.h" | 13 #import "chrome/browser/ui/cocoa/view_id_util.h" |
| 14 #include "chrome/common/notification_details.h" | 14 #include "chrome/common/notification_details.h" |
| 15 #include "chrome/common/notification_source.h" | 15 #include "chrome/common/notification_source.h" |
| 16 #include "skia/ext/skia_utils_mac.h" | 16 #include "skia/ext/skia_utils_mac.h" |
| 17 | 17 |
| 18 // C++ class that receives INFOBAR_ADDED and INFOBAR_REMOVED | 18 // C++ class that receives INFOBAR_ADDED and INFOBAR_REMOVED |
| 19 // notifications and proxies them back to |controller|. | 19 // notifications and proxies them back to |controller|. |
| 20 class InfoBarNotificationObserver : public NotificationObserver { | 20 class InfoBarNotificationObserver : public NotificationObserver { |
| 21 public: | 21 public: |
| 22 InfoBarNotificationObserver(InfoBarContainerController* controller) | 22 InfoBarNotificationObserver(InfoBarContainerController* controller) |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 frame.size.width = NSWidth(containerBounds); | 221 frame.size.width = NSWidth(containerBounds); |
| 222 frame.origin.y = minY; | 222 frame.origin.y = minY; |
| 223 minY += frame.size.height; | 223 minY += frame.size.height; |
| 224 [view setFrame:frame]; | 224 [view setFrame:frame]; |
| 225 } | 225 } |
| 226 | 226 |
| 227 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; | 227 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; |
| 228 } | 228 } |
| 229 | 229 |
| 230 @end | 230 @end |
| OLD | NEW |