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

Side by Side Diff: ui/views/controls/tree/tree_view.cc

Issue 2289143004: Add ink drop ripple (but no highlight) to comboboxes in harmony. (Closed)
Patch Set: remove explicit and improve combobox example Created 4 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
« no previous file with comments | « ui/views/controls/tree/tree_view.h ('k') | ui/views/examples/combobox_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/controls/tree/tree_view.h" 5 #include "ui/views/controls/tree/tree_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 if (!internal_node->loaded_children()) 1028 if (!internal_node->loaded_children())
1029 LoadChildren(internal_node); 1029 LoadChildren(internal_node);
1030 internal_node->set_is_expanded(true); 1030 internal_node->set_is_expanded(true);
1031 return_value = true; 1031 return_value = true;
1032 } 1032 }
1033 return return_value; 1033 return return_value;
1034 } 1034 }
1035 1035
1036 PrefixSelector* TreeView::GetPrefixSelector() { 1036 PrefixSelector* TreeView::GetPrefixSelector() {
1037 if (!selector_) 1037 if (!selector_)
1038 selector_.reset(new PrefixSelector(this)); 1038 selector_.reset(new PrefixSelector(this, this));
1039 return selector_.get(); 1039 return selector_.get();
1040 } 1040 }
1041 1041
1042 bool TreeView::IsPointInExpandControl(InternalNode* node, 1042 bool TreeView::IsPointInExpandControl(InternalNode* node,
1043 const gfx::Point& point) { 1043 const gfx::Point& point) {
1044 if (!model_->GetChildCount(node->model_node())) 1044 if (!model_->GetChildCount(node->model_node()))
1045 return false; 1045 return false;
1046 1046
1047 int depth = -1; 1047 int depth = -1;
1048 int row = GetRowForInternalNode(node, &depth); 1048 int row = GetRowForInternalNode(node, &depth);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 if (!is_expanded_) 1089 if (!is_expanded_)
1090 return max_width; 1090 return max_width;
1091 for (int i = 0; i < child_count(); ++i) { 1091 for (int i = 0; i < child_count(); ++i) {
1092 max_width = std::max(max_width, 1092 max_width = std::max(max_width,
1093 GetChild(i)->GetMaxWidth(indent, depth + 1)); 1093 GetChild(i)->GetMaxWidth(indent, depth + 1));
1094 } 1094 }
1095 return max_width; 1095 return max_width;
1096 } 1096 }
1097 1097
1098 } // namespace views 1098 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/tree/tree_view.h ('k') | ui/views/examples/combobox_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698