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

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

Issue 8771006: views: Move the remaining file from views/ to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
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_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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/bookmarks/bookmark_model.h" 13 #include "chrome/browser/bookmarks/bookmark_model.h"
14 #include "chrome/browser/bookmarks/bookmark_utils.h" 14 #include "chrome/browser/bookmarks/bookmark_utils.h"
15 #include "chrome/browser/history/history.h" 15 #include "chrome/browser/history/history.h"
16 #include "chrome/browser/net/url_fixer_upper.h" 16 #include "chrome/browser/net/url_fixer_upper.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
20 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
21 #include "grit/chromium_strings.h" 21 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
23 #include "grit/locale_settings.h" 23 #include "grit/locale_settings.h"
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/views/background.h"
26 #include "ui/views/controls/button/text_button.h" 27 #include "ui/views/controls/button/text_button.h"
27 #include "ui/views/controls/label.h" 28 #include "ui/views/controls/label.h"
28 #include "ui/views/controls/menu/menu_2.h" 29 #include "ui/views/controls/menu/menu_2.h"
29 #include "ui/views/controls/textfield/textfield.h" 30 #include "ui/views/controls/textfield/textfield.h"
30 #include "ui/views/focus/focus_manager.h" 31 #include "ui/views/focus/focus_manager.h"
31 #include "ui/views/layout/grid_layout.h" 32 #include "ui/views/layout/grid_layout.h"
32 #include "ui/views/layout/layout_constants.h" 33 #include "ui/views/layout/layout_constants.h"
33 #include "ui/views/widget/widget.h" 34 #include "ui/views/widget/widget.h"
34 #include "views/background.h"
35 35
36 using views::GridLayout; 36 using views::GridLayout;
37 37
38 namespace { 38 namespace {
39 39
40 // Background color of text field when URL is invalid. 40 // Background color of text field when URL is invalid.
41 const SkColor kErrorColor = SkColorSetRGB(0xFF, 0xBC, 0xBC); 41 const SkColor kErrorColor = SkColorSetRGB(0xFF, 0xBC, 0xBC);
42 42
43 // Preferred width of the tree. 43 // Preferred width of the tree.
44 const int kTreeWidth = 300; 44 const int kTreeWidth = 300;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 EditorNode* editor_node, 653 EditorNode* editor_node,
654 BookmarkExpandedStateTracker::Nodes* expanded_nodes) { 654 BookmarkExpandedStateTracker::Nodes* expanded_nodes) {
655 if (!tree_view_->IsExpanded(editor_node)) 655 if (!tree_view_->IsExpanded(editor_node))
656 return; 656 return;
657 657
658 if (editor_node->value != 0) // The root is 0 658 if (editor_node->value != 0) // The root is 0
659 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value)); 659 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value));
660 for (int i = 0; i < editor_node->child_count(); ++i) 660 for (int i = 0; i < editor_node->child_count(); ++i)
661 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes); 661 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes);
662 } 662 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698