| 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/bookmark_editor_view.h" | 5 #include "chrome/browser/ui/views/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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 void BookmarkEditorView::Layout() { | 133 void BookmarkEditorView::Layout() { |
| 134 // Let the grid layout manager lay out most of the dialog... | 134 // Let the grid layout manager lay out most of the dialog... |
| 135 GetLayoutManager()->Layout(this); | 135 GetLayoutManager()->Layout(this); |
| 136 | 136 |
| 137 if (!show_tree_) | 137 if (!show_tree_) |
| 138 return; | 138 return; |
| 139 | 139 |
| 140 // Manually lay out the New Folder button in the same row as the OK/Cancel | 140 // Manually lay out the New Folder button in the same row as the OK/Cancel |
| 141 // buttons... | 141 // buttons... |
| 142 gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); | 142 gfx::Rect parent_bounds = GetParent()->GetContentsBounds(); |
| 143 gfx::Size prefsize = new_group_button_->GetPreferredSize(); | 143 gfx::Size prefsize = new_group_button_->GetPreferredSize(); |
| 144 int button_y = | 144 int button_y = |
| 145 parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin; | 145 parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin; |
| 146 new_group_button_->SetBounds(kPanelHorizMargin, button_y, prefsize.width(), | 146 new_group_button_->SetBounds(kPanelHorizMargin, button_y, prefsize.width(), |
| 147 prefsize.height()); | 147 prefsize.height()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 gfx::Size BookmarkEditorView::GetPreferredSize() { | 150 gfx::Size BookmarkEditorView::GetPreferredSize() { |
| 151 if (!show_tree_) | 151 if (!show_tree_) |
| 152 return views::View::GetPreferredSize(); | 152 return views::View::GetPreferredSize(); |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 break; | 579 break; |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 DCHECK(child_bb_node); | 582 DCHECK(child_bb_node); |
| 583 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle()); | 583 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle()); |
| 584 } | 584 } |
| 585 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node, | 585 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node, |
| 586 parent_b_node, parent_bb_node); | 586 parent_b_node, parent_bb_node); |
| 587 } | 587 } |
| 588 } | 588 } |
| OLD | NEW |