| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Info is shown for browser actions, page actions and Omnibox keyword | 223 // Info is shown for browser actions, page actions and Omnibox keyword |
| 224 // extensions and might list keyboard shorcut for the former two types. | 224 // extensions and might list keyboard shorcut for the former two types. |
| 225 // Extra info is... | 225 // Extra info is... |
| 226 // ... for other types, either a description of how to manage the extension | 226 // ... for other types, either a description of how to manage the extension |
| 227 // or a link to configure the keybinding shortcut (if one exists). | 227 // or a link to configure the keybinding shortcut (if one exists). |
| 228 // Extra info can include a promo for signing into sync. | 228 // Extra info can include a promo for signing into sync. |
| 229 | 229 |
| 230 std::unique_ptr<views::BoxLayout> layout( | 230 std::unique_ptr<views::BoxLayout> layout( |
| 231 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, | 231 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, |
| 232 views::kRelatedControlVerticalSpacing)); | 232 views::kRelatedControlVerticalSpacing)); |
| 233 layout->set_minimum_cross_axis_size(kRightColumnWidth); |
| 233 // Indent by the size of the icon. | 234 // Indent by the size of the icon. |
| 234 layout->set_inside_border_insets(gfx::Insets( | 235 layout->set_inside_border_insets(gfx::Insets( |
| 235 0, GetIconSize().width() + views::kUnrelatedControlHorizontalSpacing, 0, | 236 0, GetIconSize().width() + views::kUnrelatedControlHorizontalSpacing, 0, |
| 236 0)); | 237 0)); |
| 237 layout->set_cross_axis_alignment( | 238 layout->set_cross_axis_alignment( |
| 238 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); | 239 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); |
| 239 SetLayoutManager(layout.release()); | 240 SetLayoutManager(layout.release()); |
| 240 | 241 |
| 241 if (controller_->options() & ExtensionInstalledBubble::HOW_TO_USE) | 242 if (controller_->options() & ExtensionInstalledBubble::HOW_TO_USE) |
| 242 AddChildView(CreateLabel(controller_->GetHowToUseDescription())); | 243 AddChildView(CreateLabel(controller_->GetHowToUseDescription())); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 ->browser_actions(); | 353 ->browser_actions(); |
| 353 return !container->animating(); | 354 return !container->animating(); |
| 354 } | 355 } |
| 355 return true; | 356 return true; |
| 356 } | 357 } |
| 357 | 358 |
| 358 // Implemented here to create the platform specific instance of the BubbleUi. | 359 // Implemented here to create the platform specific instance of the BubbleUi. |
| 359 std::unique_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() { | 360 std::unique_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() { |
| 360 return base::WrapUnique(new ExtensionInstalledBubbleUi(this)); | 361 return base::WrapUnique(new ExtensionInstalledBubbleUi(this)); |
| 361 } | 362 } |
| OLD | NEW |