OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/bookmark_bubble_view.h" | 5 #include "chrome/browser/views/bookmark_bubble_view.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.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/metrics/user_metrics.h" | 14 #include "chrome/browser/metrics/user_metrics.h" |
15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
16 #include "chrome/browser/views/info_bubble.h" | 16 #include "chrome/browser/views/info_bubble.h" |
17 #include "chrome/common/notification_service.h" | 17 #include "chrome/common/notification_service.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
20 #include "views/standard_layout.h" | 20 #include "views/standard_layout.h" |
21 #include "views/controls/button/native_button.h" | 21 #include "views/controls/button/native_button.h" |
22 #include "views/controls/text_field.h" | 22 #include "views/controls/textfield/textfield.h" |
23 | 23 |
24 using views::ComboBox; | 24 using views::ComboBox; |
25 using views::ColumnSet; | 25 using views::ColumnSet; |
26 using views::GridLayout; | 26 using views::GridLayout; |
27 using views::Label; | 27 using views::Label; |
28 using views::Link; | 28 using views::Link; |
29 using views::NativeButton; | 29 using views::NativeButton; |
30 using views::View; | 30 using views::View; |
31 | 31 |
32 // Color of the title. | 32 // Color of the title. |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 GridLayout::USE_PREF, 0, 0); | 278 GridLayout::USE_PREF, 0, 0); |
279 | 279 |
280 layout->StartRow(0, 0); | 280 layout->StartRow(0, 0); |
281 layout->AddView(title_label); | 281 layout->AddView(title_label); |
282 layout->AddView(remove_link_); | 282 layout->AddView(remove_link_); |
283 | 283 |
284 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); | 284 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); |
285 layout->StartRow(0, 2); | 285 layout->StartRow(0, 2); |
286 layout->AddView( | 286 layout->AddView( |
287 new Label(l10n_util::GetString(IDS_BOOMARK_BUBBLE_TITLE_TEXT))); | 287 new Label(l10n_util::GetString(IDS_BOOMARK_BUBBLE_TITLE_TEXT))); |
288 title_tf_ = new views::TextField(); | 288 title_tf_ = new views::Textfield(); |
289 title_tf_->SetText(GetTitle()); | 289 title_tf_->SetText(GetTitle()); |
290 layout->AddView(title_tf_); | 290 layout->AddView(title_tf_); |
291 | 291 |
292 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); | 292 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); |
293 | 293 |
294 layout->StartRow(0, 2); | 294 layout->StartRow(0, 2); |
295 layout->AddView( | 295 layout->AddView( |
296 new Label(l10n_util::GetString(IDS_BOOMARK_BUBBLE_FOLDER_TEXT))); | 296 new Label(l10n_util::GetString(IDS_BOOMARK_BUBBLE_FOLDER_TEXT))); |
297 layout->AddView(parent_combobox_); | 297 layout->AddView(parent_combobox_); |
298 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); | 298 layout->AddPaddingRow(0, kRelatedControlSmallVerticalSpacing); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 parent_model_.GetItemCount(parent_combobox_) - 1) { | 421 parent_model_.GetItemCount(parent_combobox_) - 1) { |
422 BookmarkNode* new_parent = | 422 BookmarkNode* new_parent = |
423 parent_model_.GetNodeAt(parent_combobox_->GetSelectedItem()); | 423 parent_model_.GetNodeAt(parent_combobox_->GetSelectedItem()); |
424 if (new_parent != node->GetParent()) { | 424 if (new_parent != node->GetParent()) { |
425 UserMetrics::RecordAction(L"BookmarkBubble_ChangeParent", profile_); | 425 UserMetrics::RecordAction(L"BookmarkBubble_ChangeParent", profile_); |
426 model->Move(node, new_parent, new_parent->GetChildCount()); | 426 model->Move(node, new_parent, new_parent->GetChildCount()); |
427 } | 427 } |
428 } | 428 } |
429 } | 429 } |
430 } | 430 } |
OLD | NEW |