| 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 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 5 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Pixels between infobar elements. | 29 // Pixels between infobar elements. |
| 30 const int kElementPadding = 5; | 30 const int kElementPadding = 5; |
| 31 | 31 |
| 32 // Extra padding on either end of info bar. | 32 // Extra padding on either end of info bar. |
| 33 const int kLeftPadding = 5; | 33 const int kLeftPadding = 5; |
| 34 const int kRightPadding = 5; | 34 const int kRightPadding = 5; |
| 35 | 35 |
| 36 // Spacing between buttons. | |
| 37 const int kButtonButtonSpacing = 3; | |
| 38 | |
| 39 } // namespace | 36 } // namespace |
| 40 | 37 |
| 41 | 38 |
| 42 // InfoBar -------------------------------------------------------------------- | 39 // InfoBar -------------------------------------------------------------------- |
| 43 | 40 |
| 44 // static | 41 // static |
| 45 const int InfoBar::kSeparatorLineHeight = 1; | 42 const int InfoBar::kSeparatorLineHeight = 1; |
| 46 const int InfoBar::kDefaultArrowTargetHeight = 9; | 43 const int InfoBar::kDefaultArrowTargetHeight = 9; |
| 47 const int InfoBar::kMaximumArrowTargetHeight = 24; | 44 const int InfoBar::kMaximumArrowTargetHeight = 24; |
| 48 const int InfoBar::kDefaultArrowTargetHalfWidth = kDefaultArrowTargetHeight; | 45 const int InfoBar::kDefaultArrowTargetHalfWidth = kDefaultArrowTargetHeight; |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 324 } |
| 328 | 325 |
| 329 return FALSE; | 326 return FALSE; |
| 330 } | 327 } |
| 331 | 328 |
| 332 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded, | 329 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded, |
| 333 GtkWidget* child, | 330 GtkWidget* child, |
| 334 GtkRequisition* requisition) { | 331 GtkRequisition* requisition) { |
| 335 requisition->height = -1; | 332 requisition->height = -1; |
| 336 } | 333 } |
| OLD | NEW |