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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_dialog_views.h

Issue 319013002: Reland Fix Views web-modal dialog widget creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert MediaGalleriesScanResultDialogViews::AcceptDialogForTesting. Created 6 years, 6 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) 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 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void ShowContextMenu(const gfx::Point& point, 79 void ShowContextMenu(const gfx::Point& point,
80 ui::MenuSourceType source_type, 80 ui::MenuSourceType source_type,
81 GalleryDialogId id); 81 GalleryDialogId id);
82 82
83 // Whether |controller_| has a valid WebContents or not. 83 // Whether |controller_| has a valid WebContents or not.
84 // In unit tests, it may not. 84 // In unit tests, it may not.
85 bool ControllerHasWebContents() const; 85 bool ControllerHasWebContents() const;
86 86
87 MediaGalleriesDialogController* controller_; 87 MediaGalleriesDialogController* controller_;
88 88
89 // The containing window (a weak pointer). 89 // The contents of the dialog. Owned by the view hierarchy, except in tests.
90 views::Widget* window_;
91
92 // The contents of the dialog. Owned by |window_|'s RootView except for tests.
93 views::View* contents_; 90 views::View* contents_;
94 91
95 // A map from gallery ID to views::Checkbox view. 92 // A map from gallery ID to views::Checkbox view.
96 CheckboxMap checkbox_map_; 93 CheckboxMap checkbox_map_;
97 94
98 // Pointer to the button to add a new gallery. Owned by parent in 95 // Pointer to the button to add a new gallery. Owned by parent in
99 // the dialog views tree. 96 // the dialog views tree.
100 views::LabelButton* add_gallery_button_; 97 views::LabelButton* add_gallery_button_;
101 98
102 // This tracks whether the confirm button can be clicked. It starts as false 99 // This tracks whether the confirm button can be clicked. It starts as false
103 // if no checkboxes are ticked. After there is any interaction, or some 100 // if no checkboxes are ticked. After there is any interaction, or some
104 // checkboxes start checked, this will be true. 101 // checkboxes start checked, this will be true.
105 bool confirm_available_; 102 bool confirm_available_;
106 103
107 // True if the user has pressed accept. 104 // True if the user has pressed accept.
108 bool accepted_; 105 bool accepted_;
109 106
110 scoped_ptr<views::MenuRunner> context_menu_runner_; 107 scoped_ptr<views::MenuRunner> context_menu_runner_;
111 108
112 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews); 109 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews);
113 }; 110 };
114 111
115 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 112 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698