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

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

Issue 7670041: Add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with trunk. Created 9 years, 3 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 | 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 29 matching lines...) Expand all
40 40
41 // Preferred width of the tree. 41 // Preferred width of the tree.
42 const int kTreeWidth = 300; 42 const int kTreeWidth = 300;
43 43
44 // ID for various children. 44 // ID for various children.
45 const int kNewFolderButtonID = 1002; 45 const int kNewFolderButtonID = 1002;
46 46
47 } // namespace 47 } // namespace
48 48
49 // static 49 // static
50 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, 50 void BookmarkEditor::ShowNative(gfx::NativeWindow parent_hwnd,
51 Profile* profile, 51 Profile* profile,
52 const BookmarkNode* parent, 52 const BookmarkNode* parent,
53 const EditDetails& details, 53 const EditDetails& details,
54 Configuration configuration) { 54 Configuration configuration) {
55 DCHECK(profile); 55 DCHECK(profile);
56 BookmarkEditorView* editor = 56 BookmarkEditorView* editor =
57 new BookmarkEditorView(profile, parent, details, configuration); 57 new BookmarkEditorView(profile, parent, details, configuration);
58 editor->Show(parent_hwnd); 58 editor->Show(parent_hwnd);
59 } 59 }
60 60
61 BookmarkEditorView::BookmarkEditorView( 61 BookmarkEditorView::BookmarkEditorView(
62 Profile* profile, 62 Profile* profile,
63 const BookmarkNode* parent, 63 const BookmarkNode* parent,
64 const EditDetails& details, 64 const EditDetails& details,
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 EditorNode* editor_node, 647 EditorNode* editor_node,
648 BookmarkExpandedStateTracker::Nodes* expanded_nodes) { 648 BookmarkExpandedStateTracker::Nodes* expanded_nodes) {
649 if (!tree_view_->IsExpanded(editor_node)) 649 if (!tree_view_->IsExpanded(editor_node))
650 return; 650 return;
651 651
652 if (editor_node->value != 0) // The root is 0 652 if (editor_node->value != 0) // The root is 0
653 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value)); 653 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value));
654 for (int i = 0; i < editor_node->child_count(); ++i) 654 for (int i = 0; i < editor_node->child_count(); ++i)
655 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes); 655 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes);
656 } 656 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698