OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string16.h" | 7 #include "base/string16.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
11 #include "chrome/browser/bookmarks/bookmark_editor.h" | 11 #include "chrome/browser/bookmarks/bookmark_editor.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
18 #include "content/browser/user_metrics.h" | 18 #include "content/browser/user_metrics.h" |
19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
22 #include "ui/base/keycodes/keyboard_codes.h" | 22 #include "ui/base/keycodes/keyboard_codes.h" |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/views/events/event.h" | 25 #include "ui/views/events/event.h" |
26 #include "ui/views/layout/grid_layout.h" | 26 #include "ui/views/layout/grid_layout.h" |
27 #include "ui/views/layout/layout_constants.h" | 27 #include "ui/views/layout/layout_constants.h" |
| 28 #include "ui/views/widget/widget.h" |
28 #include "views/controls/button/text_button.h" | 29 #include "views/controls/button/text_button.h" |
29 #include "views/controls/label.h" | 30 #include "views/controls/label.h" |
30 #include "views/controls/link.h" | 31 #include "views/controls/link.h" |
31 #include "views/controls/textfield/textfield.h" | 32 #include "views/controls/textfield/textfield.h" |
32 #include "views/widget/widget.h" | |
33 | 33 |
34 using views::ColumnSet; | 34 using views::ColumnSet; |
35 using views::GridLayout; | 35 using views::GridLayout; |
36 | 36 |
37 // Padding between "Title:" and the actual title. | 37 // Padding between "Title:" and the actual title. |
38 static const int kTitlePadding = 4; | 38 static const int kTitlePadding = 4; |
39 | 39 |
40 // Minimum width for the fields - they will push out the size of the bubble if | 40 // Minimum width for the fields - they will push out the size of the bubble if |
41 // necessary. This should be big enough so that the field pushes the right side | 41 // necessary. This should be big enough so that the field pushes the right side |
42 // of the bubble far enough so that the edit button's left edge is to the right | 42 // of the bubble far enough so that the edit button's left edge is to the right |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 const BookmarkNode* new_parent = | 331 const BookmarkNode* new_parent = |
332 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 332 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
333 if (new_parent != node->parent()) { | 333 if (new_parent != node->parent()) { |
334 UserMetrics::RecordAction( | 334 UserMetrics::RecordAction( |
335 UserMetricsAction("BookmarkBubble_ChangeParent")); | 335 UserMetricsAction("BookmarkBubble_ChangeParent")); |
336 model->Move(node, new_parent, new_parent->child_count()); | 336 model->Move(node, new_parent, new_parent->child_count()); |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 } | 340 } |
OLD | NEW |