| OLD | NEW |
| 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/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "ui/base/models/combobox_model.h" | 10 #include "ui/base/models/combobox_model.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const int kHelpLinkID = count++; | 82 const int kHelpLinkID = count++; |
| 83 | 83 |
| 84 const int kThumbnailContainerID = count++; // 45 | 84 const int kThumbnailContainerID = count++; // 45 |
| 85 const int kThumbnailStarID = count++; | 85 const int kThumbnailStarID = count++; |
| 86 const int kThumbnailSuperStarID = count++; | 86 const int kThumbnailSuperStarID = count++; |
| 87 | 87 |
| 88 class DummyComboboxModel : public ui::ComboboxModel { | 88 class DummyComboboxModel : public ui::ComboboxModel { |
| 89 public: | 89 public: |
| 90 // Overridden from ui::ComboboxModel: | 90 // Overridden from ui::ComboboxModel: |
| 91 virtual int GetItemCount() const OVERRIDE { return 10; } | 91 virtual int GetItemCount() const OVERRIDE { return 10; } |
| 92 virtual string16 GetItemAt(int index) OVERRIDE { | 92 virtual base::string16 GetItemAt(int index) OVERRIDE { |
| 93 return ASCIIToUTF16("Item ") + base::IntToString16(index); | 93 return ASCIIToUTF16("Item ") + base::IntToString16(index); |
| 94 } | 94 } |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 // A View that can act as a pane. | 97 // A View that can act as a pane. |
| 98 class PaneView : public View, public FocusTraversable { | 98 class PaneView : public View, public FocusTraversable { |
| 99 public: | 99 public: |
| 100 PaneView() : focus_search_(NULL) {} | 100 PaneView() : focus_search_(NULL) {} |
| 101 | 101 |
| 102 // If this method is called, this view will use GetPaneFocusTraversable to | 102 // If this method is called, this view will use GetPaneFocusTraversable to |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 GetFocusManager()->AdvanceFocus(true); | 782 GetFocusManager()->AdvanceFocus(true); |
| 783 View* focused_view = GetFocusManager()->GetFocusedView(); | 783 View* focused_view = GetFocusManager()->GetFocusedView(); |
| 784 EXPECT_TRUE(focused_view != NULL); | 784 EXPECT_TRUE(focused_view != NULL); |
| 785 if (focused_view) | 785 if (focused_view) |
| 786 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); | 786 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); |
| 787 } | 787 } |
| 788 } | 788 } |
| 789 } | 789 } |
| 790 | 790 |
| 791 } // namespace views | 791 } // namespace views |
| OLD | NEW |