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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/automation/ui_controls.h" | 7 #include "chrome/browser/automation/ui_controls.h" |
8 #include "chrome/test/base/view_event_test_base.h" | 8 #include "chrome/test/base/view_event_test_base.h" |
9 #include "ui/base/models/menu_model.h" | 9 #include "ui/base/models/menu_model.h" |
10 #include "ui/views/test/test_views_delegate.h" | 10 #include "ui/views/test/test_views_delegate.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 ~TestViewsDelegate() { | 33 ~TestViewsDelegate() { |
34 } | 34 } |
35 | 35 |
36 // views::ViewsDelegate implementation | 36 // views::ViewsDelegate implementation |
37 virtual ui::Clipboard* GetClipboard() const OVERRIDE { | 37 virtual ui::Clipboard* GetClipboard() const OVERRIDE { |
38 return NULL; | 38 return NULL; |
39 } | 39 } |
40 | 40 |
41 virtual views::View* GetDefaultParentView() OVERRIDE { | |
42 return NULL; | |
43 } | |
44 | |
45 virtual void SaveWindowPlacement(const views::Widget* widget, | 41 virtual void SaveWindowPlacement(const views::Widget* widget, |
46 const std::string& window_name, | 42 const std::string& window_name, |
47 const gfx::Rect& bounds, | 43 const gfx::Rect& bounds, |
48 ui::WindowShowState show_state) OVERRIDE { | 44 ui::WindowShowState show_state) OVERRIDE { |
49 } | 45 } |
50 | 46 |
51 virtual bool GetSavedWindowPlacement( | 47 virtual bool GetSavedWindowPlacement( |
52 const std::string& window_name, | 48 const std::string& window_name, |
53 gfx::Rect* bounds, | 49 gfx::Rect* bounds, |
54 ui::WindowShowState* show_state) const OVERRIDE { | 50 ui::WindowShowState* show_state) const OVERRIDE { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 TestViewsDelegate views_delegate_; | 360 TestViewsDelegate views_delegate_; |
365 | 361 |
366 views::MenuButton* button_; | 362 views::MenuButton* button_; |
367 TopMenuModel top_menu_model_; | 363 TopMenuModel top_menu_model_; |
368 views::MenuModelAdapter menu_model_adapter_; | 364 views::MenuModelAdapter menu_model_adapter_; |
369 views::MenuItemView* menu_; | 365 views::MenuItemView* menu_; |
370 scoped_ptr<views::MenuRunner> menu_runner_; | 366 scoped_ptr<views::MenuRunner> menu_runner_; |
371 }; | 367 }; |
372 | 368 |
373 VIEW_TEST(MenuModelAdapterTest, RebuildMenu) | 369 VIEW_TEST(MenuModelAdapterTest, RebuildMenu) |
OLD | NEW |