| 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/views/bookmarks/bookmark_bubble_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Width of the border of a button. | 41 // Width of the border of a button. |
| 42 const int kControlBorderWidth = 2; | 42 const int kControlBorderWidth = 2; |
| 43 | 43 |
| 44 // This combobox prevents any lengthy content from stretching the bubble view. | 44 // This combobox prevents any lengthy content from stretching the bubble view. |
| 45 class UnsizedCombobox : public views::Combobox { | 45 class UnsizedCombobox : public views::Combobox { |
| 46 public: | 46 public: |
| 47 explicit UnsizedCombobox(ui::ComboboxModel* model) : views::Combobox(model) {} | 47 explicit UnsizedCombobox(ui::ComboboxModel* model) : views::Combobox(model) {} |
| 48 virtual ~UnsizedCombobox() {} | 48 virtual ~UnsizedCombobox() {} |
| 49 | 49 |
| 50 virtual gfx::Size GetPreferredSize() const OVERRIDE { | 50 virtual gfx::Size GetPreferredSize() const override { |
| 51 return gfx::Size(0, views::Combobox::GetPreferredSize().height()); | 51 return gfx::Size(0, views::Combobox::GetPreferredSize().height()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(UnsizedCombobox); | 55 DISALLOW_COPY_AND_ASSIGN(UnsizedCombobox); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL; | 60 BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL; |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 if (node) { | 364 if (node) { |
| 365 const base::string16 new_title = title_tf_->text(); | 365 const base::string16 new_title = title_tf_->text(); |
| 366 if (new_title != node->GetTitle()) { | 366 if (new_title != node->GetTitle()) { |
| 367 model->SetTitle(node, new_title); | 367 model->SetTitle(node, new_title); |
| 368 content::RecordAction( | 368 content::RecordAction( |
| 369 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); | 369 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); |
| 370 } | 370 } |
| 371 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); | 371 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); |
| 372 } | 372 } |
| 373 } | 373 } |
| OLD | NEW |