Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc

Issue 1958453002: Update some secondary UI buttons to MD style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const qualifier Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" 14 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
15 #include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h" 15 #include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h"
16 #include "chrome/browser/ui/browser_dialogs.h" 16 #include "chrome/browser/ui/browser_dialogs.h"
17 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
18 #include "chrome/grit/locale_settings.h" 18 #include "chrome/grit/locale_settings.h"
19 #include "components/bookmarks/browser/bookmark_model.h" 19 #include "components/bookmarks/browser/bookmark_model.h"
20 #include "components/bookmarks/browser/bookmark_utils.h" 20 #include "components/bookmarks/browser/bookmark_utils.h"
21 #include "components/constrained_window/constrained_window_views.h" 21 #include "components/constrained_window/constrained_window_views.h"
22 #include "components/history/core/browser/history_service.h" 22 #include "components/history/core/browser/history_service.h"
23 #include "components/url_formatter/url_fixer.h" 23 #include "components/url_formatter/url_fixer.h"
24 #include "components/user_prefs/user_prefs.h" 24 #include "components/user_prefs/user_prefs.h"
25 #include "grit/components_strings.h" 25 #include "grit/components_strings.h"
26 #include "ui/accessibility/ax_view_state.h" 26 #include "ui/accessibility/ax_view_state.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/events/event.h" 28 #include "ui/events/event.h"
29 #include "ui/views/background.h" 29 #include "ui/views/background.h"
30 #include "ui/views/controls/button/label_button.h" 30 #include "ui/views/controls/button/label_button.h"
msw 2016/05/12 19:17:04 nit: remove
Evan Stade 2016/05/12 19:32:01 Done.
31 #include "ui/views/controls/button/md_text_button.h"
31 #include "ui/views/controls/label.h" 32 #include "ui/views/controls/label.h"
32 #include "ui/views/controls/menu/menu_runner.h" 33 #include "ui/views/controls/menu/menu_runner.h"
33 #include "ui/views/controls/textfield/textfield.h" 34 #include "ui/views/controls/textfield/textfield.h"
34 #include "ui/views/controls/tree/tree_view.h" 35 #include "ui/views/controls/tree/tree_view.h"
35 #include "ui/views/focus/focus_manager.h" 36 #include "ui/views/focus/focus_manager.h"
36 #include "ui/views/layout/grid_layout.h" 37 #include "ui/views/layout/grid_layout.h"
37 #include "ui/views/layout/layout_constants.h" 38 #include "ui/views/layout/layout_constants.h"
38 #include "ui/views/widget/widget.h" 39 #include "ui/views/widget/widget.h"
39 #include "ui/views/window/dialog_client_view.h" 40 #include "ui/views/window/dialog_client_view.h"
40 #include "url/gurl.h" 41 #include "url/gurl.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 title_tf_->SetAccessibleName( 325 title_tf_->SetAccessibleName(
325 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_EDITOR_NAME_LABEL)); 326 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_EDITOR_NAME_LABEL));
326 title_tf_->SetText(title); 327 title_tf_->SetText(title);
327 title_tf_->set_controller(this); 328 title_tf_->set_controller(this);
328 329
329 if (show_tree_) { 330 if (show_tree_) {
330 tree_view_ = new views::TreeView; 331 tree_view_ = new views::TreeView;
331 tree_view_->SetRootShown(false); 332 tree_view_->SetRootShown(false);
332 tree_view_->set_context_menu_controller(this); 333 tree_view_->set_context_menu_controller(this);
333 334
334 new_folder_button_.reset(new views::LabelButton(this, 335 new_folder_button_.reset(views::MdTextButton::CreateSecondaryUiButton(
336 this,
335 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON))); 337 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON)));
336 new_folder_button_->SetStyle(views::Button::STYLE_BUTTON);
337 new_folder_button_->set_owned_by_client(); 338 new_folder_button_->set_owned_by_client();
338 new_folder_button_->SetEnabled(false); 339 new_folder_button_->SetEnabled(false);
339 } 340 }
340 341
341 GridLayout* layout = GridLayout::CreatePanel(this); 342 GridLayout* layout = GridLayout::CreatePanel(this);
342 SetLayoutManager(layout); 343 SetLayoutManager(layout);
343 344
344 const int labels_column_set_id = 0; 345 const int labels_column_set_id = 0;
345 const int single_column_view_set_id = 1; 346 const int single_column_view_set_id = 1;
346 const int buttons_column_set_id = 2; 347 const int buttons_column_set_id = 2;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 Profile* profile, 650 Profile* profile,
650 const BookmarkEditor::EditDetails& details, 651 const BookmarkEditor::EditDetails& details,
651 BookmarkEditor::Configuration configuration) { 652 BookmarkEditor::Configuration configuration) {
652 DCHECK(profile); 653 DCHECK(profile);
653 BookmarkEditorView* editor = new BookmarkEditorView( 654 BookmarkEditorView* editor = new BookmarkEditorView(
654 profile, details.parent_node, details, configuration); 655 profile, details.parent_node, details, configuration);
655 editor->Show(parent_window); 656 editor->Show(parent_window);
656 } 657 }
657 658
658 } // namespace chrome 659 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/certificate_selector.cc » ('j') | chrome/browser/ui/views/certificate_selector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698