Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/infobars/infobar_container.cc

Issue 23338005: Mac InfoBar: Use cross platform infobar classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/infobars/infobar.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 // TODO(pkasting): Port Mac to use this.
8 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
9
10 #include "chrome/browser/infobars/infobar_container.h" 7 #include "chrome/browser/infobars/infobar_container.h"
11 8
12 #include <algorithm> 9 #include <algorithm>
13 10
14 #include "base/logging.h" 11 #include "base/logging.h"
15 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/infobars/infobar.h" 13 #include "chrome/browser/infobars/infobar.h"
17 #include "chrome/browser/infobars/infobar_delegate.h" 14 #include "chrome/browser/infobars/infobar_delegate.h"
18 #include "chrome/browser/infobars/infobar_service.h" 15 #include "chrome/browser/infobars/infobar_service.h"
19 #include "content/public/browser/notification_details.h" 16 #include "content/public/browser/notification_details.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const_cast<const InfoBar*>(infobars_.front())->animation(); 225 const_cast<const InfoBar*>(infobars_.front())->animation();
229 if ((infobar_index > 1) || first_infobar_animation.IsShowing()) 226 if ((infobar_index > 1) || first_infobar_animation.IsShowing())
230 return InfoBar::kDefaultArrowTargetHeight; 227 return InfoBar::kDefaultArrowTargetHeight;
231 // When the first infobar is animating closed, we animate the second infobar's 228 // When the first infobar is animating closed, we animate the second infobar's
232 // arrow target height from the default to the top target height. Note that 229 // arrow target height from the default to the top target height. Note that
233 // the animation values here are going from 1.0 -> 0.0 as the top bar closes. 230 // the animation values here are going from 1.0 -> 0.0 as the top bar closes.
234 return top_arrow_target_height_ + static_cast<int>( 231 return top_arrow_target_height_ + static_cast<int>(
235 (InfoBar::kDefaultArrowTargetHeight - top_arrow_target_height_) * 232 (InfoBar::kDefaultArrowTargetHeight - top_arrow_target_height_) *
236 first_infobar_animation.GetCurrentValue()); 233 first_infobar_animation.GetCurrentValue());
237 } 234 }
238
239 #endif // TOOLKIT_VIEWS || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698