| OLD | NEW |
| 1 // Copyright (c) 2011 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/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "ui/base/models/combobox_model.h" | 9 #include "ui/base/models/combobox_model.h" |
| 10 #include "ui/views/controls/button/checkbox.h" | 10 #include "ui/views/controls/button/checkbox.h" |
| 11 #include "ui/views/controls/button/radio_button.h" | 11 #include "ui/views/controls/button/radio_button.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 const int kSearchTextfieldID = count++; | 81 const int kSearchTextfieldID = count++; |
| 82 const int kSearchButtonID = count++; | 82 const int kSearchButtonID = count++; |
| 83 const int kHelpLinkID = count++; | 83 const int kHelpLinkID = count++; |
| 84 | 84 |
| 85 const int kThumbnailContainerID = count++; // 45 | 85 const int kThumbnailContainerID = count++; // 45 |
| 86 const int kThumbnailStarID = count++; | 86 const int kThumbnailStarID = count++; |
| 87 const int kThumbnailSuperStarID = count++; | 87 const int kThumbnailSuperStarID = count++; |
| 88 | 88 |
| 89 class DummyComboboxModel : public ui::ComboboxModel { | 89 class DummyComboboxModel : public ui::ComboboxModel { |
| 90 public: | 90 public: |
| 91 virtual int GetItemCount() { return 10; } | 91 // Overridden from ui::ComboboxModel: |
| 92 | 92 virtual int GetItemCount() const OVERRIDE { return 10; } |
| 93 virtual string16 GetItemAt(int index) { | 93 virtual string16 GetItemAt(int index) OVERRIDE { |
| 94 return ASCIIToUTF16("Item ") + base::IntToString16(index); | 94 return ASCIIToUTF16("Item ") + base::IntToString16(index); |
| 95 } | 95 } |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // A View that can act as a pane. | 98 // A View that can act as a pane. |
| 99 class PaneView : public View, public FocusTraversable { | 99 class PaneView : public View, public FocusTraversable { |
| 100 public: | 100 public: |
| 101 PaneView() : focus_search_(NULL) {} | 101 PaneView() : focus_search_(NULL) {} |
| 102 | 102 |
| 103 // If this method is called, this view will use GetPaneFocusTraversable to | 103 // If this method is called, this view will use GetPaneFocusTraversable to |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 GetFocusManager()->AdvanceFocus(true); | 801 GetFocusManager()->AdvanceFocus(true); |
| 802 View* focused_view = GetFocusManager()->GetFocusedView(); | 802 View* focused_view = GetFocusManager()->GetFocusedView(); |
| 803 EXPECT_TRUE(focused_view != NULL); | 803 EXPECT_TRUE(focused_view != NULL); |
| 804 if (focused_view) | 804 if (focused_view) |
| 805 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); | 805 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); |
| 806 } | 806 } |
| 807 } | 807 } |
| 808 } | 808 } |
| 809 | 809 |
| 810 } // namespace views | 810 } // namespace views |
| OLD | NEW |