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

Side by Side Diff: chrome/browser/ui/views/menu_model_adapter_test.cc

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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/automation/ui_controls.h" 5 #include "chrome/browser/automation/ui_controls.h"
6 #include "chrome/test/base/view_event_test_base.h" 6 #include "chrome/test/base/view_event_test_base.h"
7 #include "ui/base/models/menu_model.h" 7 #include "ui/base/models/menu_model.h"
8 #include "views/controls/button/menu_button.h" 8 #include "views/controls/button/menu_button.h"
9 #include "views/controls/menu/menu_controller.h" 9 #include "views/controls/menu/menu_controller.h"
10 #include "views/controls/menu/menu_item_view.h" 10 #include "views/controls/menu/menu_item_view.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 virtual views::View* GetDefaultParentView() OVERRIDE 39 virtual views::View* GetDefaultParentView() OVERRIDE
40 { 40 {
41 return NULL; 41 return NULL;
42 } 42 }
43 43
44 virtual void SaveWindowPlacement(const views::Widget* widget, 44 virtual void SaveWindowPlacement(const views::Widget* widget,
45 const std::wstring& window_name, 45 const std::wstring& window_name,
46 const gfx::Rect& bounds, 46 const gfx::Rect& bounds,
47 bool maximized) OVERRIDE { 47 ui::WindowShowState show_state) OVERRIDE {
48 } 48 }
49 49
50 virtual bool GetSavedWindowBounds(const std::wstring& window_name, 50 virtual bool GetSavedWindowBounds(const std::wstring& window_name,
51 gfx::Rect* bounds) const OVERRIDE { 51 gfx::Rect* bounds) const OVERRIDE {
52 return false; 52 return false;
53 } 53 }
54 54
55 virtual bool GetSavedMaximizedState(const std::wstring& window_name, 55 virtual bool GetSavedWindowShowState(
56 bool* maximized) const OVERRIDE { 56 const std::wstring& window_name,
57 ui::WindowShowState* show_state) const OVERRIDE {
57 return false; 58 return false;
58 } 59 }
59 60
60 virtual void NotifyAccessibilityEvent( 61 virtual void NotifyAccessibilityEvent(
61 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE { 62 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE {
62 } 63 }
63 64
64 virtual void NotifyMenuItemFocused( 65 virtual void NotifyMenuItemFocused(
65 const std::wstring& menu_name, 66 const std::wstring& menu_name,
66 const std::wstring& menu_item_name, 67 const std::wstring& menu_item_name,
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 TestViewsDelegate views_delegate_; 368 TestViewsDelegate views_delegate_;
368 369
369 views::MenuButton* button_; 370 views::MenuButton* button_;
370 TopMenuModel top_menu_model_; 371 TopMenuModel top_menu_model_;
371 views::MenuModelAdapter menu_model_adapter_; 372 views::MenuModelAdapter menu_model_adapter_;
372 views::MenuItemView* menu_; 373 views::MenuItemView* menu_;
373 scoped_ptr<views::MenuRunner> menu_runner_; 374 scoped_ptr<views::MenuRunner> menu_runner_;
374 }; 375 };
375 376
376 VIEW_TEST(MenuModelAdapterTest, RebuildMenu) 377 VIEW_TEST(MenuModelAdapterTest, RebuildMenu)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698