| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/views/website_settings/chooser_bubble_ui_view.h" | 5 #include "chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const int kBubbleOuterMargin = 5; | 46 const int kBubbleOuterMargin = 5; |
| 47 | 47 |
| 48 // Spacing between major items should be 9px. | 48 // Spacing between major items should be 9px. |
| 49 const int kItemMajorSpacing = 9; | 49 const int kItemMajorSpacing = 9; |
| 50 | 50 |
| 51 // Button border size, draws inside the spacing distance. | 51 // Button border size, draws inside the spacing distance. |
| 52 const int kButtonBorderSize = 2; | 52 const int kButtonBorderSize = 2; |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 scoped_ptr<BubbleUi> ChooserBubbleDelegate::BuildBubbleUi() { |
| 57 return make_scoped_ptr(new ChooserBubbleUiView(browser_, this)); |
| 58 } |
| 59 |
| 56 class ChooserTableModel; | 60 class ChooserTableModel; |
| 57 | 61 |
| 58 /////////////////////////////////////////////////////////////////////////////// | 62 /////////////////////////////////////////////////////////////////////////////// |
| 59 // View implementation for the chooser bubble. | 63 // View implementation for the chooser bubble. |
| 60 class ChooserBubbleUiViewDelegate : public views::BubbleDelegateView, | 64 class ChooserBubbleUiViewDelegate : public views::BubbleDelegateView, |
| 61 public views::ButtonListener, | 65 public views::ButtonListener, |
| 62 public views::TableViewObserver { | 66 public views::TableViewObserver { |
| 63 public: | 67 public: |
| 64 ChooserBubbleUiViewDelegate(views::View* anchor_view, | 68 ChooserBubbleUiViewDelegate(views::View* anchor_view, |
| 65 views::BubbleBorder::Arrow anchor_arrow, | 69 views::BubbleBorder::Arrow anchor_arrow, |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 return browser_view->exclusive_access_bubble()->GetView(); | 397 return browser_view->exclusive_access_bubble()->GetView(); |
| 394 | 398 |
| 395 return browser_view->top_container(); | 399 return browser_view->top_container(); |
| 396 } | 400 } |
| 397 | 401 |
| 398 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { | 402 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { |
| 399 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) | 403 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) |
| 400 return views::BubbleBorder::TOP_LEFT; | 404 return views::BubbleBorder::TOP_LEFT; |
| 401 return views::BubbleBorder::NONE; | 405 return views::BubbleBorder::NONE; |
| 402 } | 406 } |
| OLD | NEW |