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

Side by Side Diff: chrome/browser/ui/browser.h

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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
« no previous file with comments | « chrome/browser/extensions/extension_view_host.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_
6 #define CHROME_BROWSER_UI_BROWSER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 class Image; 84 class Image;
85 class Point; 85 class Point;
86 } 86 }
87 87
88 namespace ui { 88 namespace ui {
89 struct SelectedFileInfo; 89 struct SelectedFileInfo;
90 class WebDialogDelegate; 90 class WebDialogDelegate;
91 } 91 }
92 92
93 namespace web_modal { 93 namespace web_modal {
94 class PopupManager;
94 class WebContentsModalDialogHost; 95 class WebContentsModalDialogHost;
95 } 96 }
96 97
97 class Browser : public TabStripModelObserver, 98 class Browser : public TabStripModelObserver,
98 public content::WebContentsDelegate, 99 public content::WebContentsDelegate,
99 public CoreTabHelperDelegate, 100 public CoreTabHelperDelegate,
100 public SearchEngineTabHelperDelegate, 101 public SearchEngineTabHelperDelegate,
101 public SearchTabHelperDelegate, 102 public SearchTabHelperDelegate,
102 public ChromeWebModalDialogManagerDelegate, 103 public ChromeWebModalDialogManagerDelegate,
103 public BookmarkTabHelperDelegate, 104 public BookmarkTabHelperDelegate,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // |window()| will return NULL if called before |CreateBrowserWindow()| 236 // |window()| will return NULL if called before |CreateBrowserWindow()|
236 // is done. 237 // is done.
237 BrowserWindow* window() const { return window_; } 238 BrowserWindow* window() const { return window_; }
238 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } 239 ToolbarModel* toolbar_model() { return toolbar_model_.get(); }
239 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } 240 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); }
240 #if defined(UNIT_TEST) 241 #if defined(UNIT_TEST)
241 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { 242 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) {
242 toolbar_model->swap(toolbar_model_); 243 toolbar_model->swap(toolbar_model_);
243 } 244 }
244 #endif 245 #endif
246 web_modal::PopupManager* popup_manager() {
247 return popup_manager_.get();
248 }
245 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } 249 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); }
246 chrome::BrowserCommandController* command_controller() { 250 chrome::BrowserCommandController* command_controller() {
247 return command_controller_.get(); 251 return command_controller_.get();
248 } 252 }
249 SearchModel* search_model() { return search_model_.get(); } 253 SearchModel* search_model() { return search_model_.get(); }
250 const SearchModel* search_model() const { 254 const SearchModel* search_model() const {
251 return search_model_.get(); 255 return search_model_.get();
252 } 256 }
253 SearchDelegate* search_delegate() { 257 SearchDelegate* search_delegate() {
254 return search_delegate_.get(); 258 return search_delegate_.get();
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 816
813 // This Browser's type. 817 // This Browser's type.
814 const Type type_; 818 const Type type_;
815 819
816 // This Browser's profile. 820 // This Browser's profile.
817 Profile* const profile_; 821 Profile* const profile_;
818 822
819 // This Browser's window. 823 // This Browser's window.
820 BrowserWindow* window_; 824 BrowserWindow* window_;
821 825
826 // Manages popup windows (bubbles, tab-modals) visible overlapping this
827 // window. JS alerts are not handled by this manager.
828 scoped_ptr<web_modal::PopupManager> popup_manager_;
829
822 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; 830 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_;
823 scoped_ptr<TabStripModel> tab_strip_model_; 831 scoped_ptr<TabStripModel> tab_strip_model_;
824 832
825 // The application name that is also the name of the window to the shell. 833 // The application name that is also the name of the window to the shell.
826 // This name should be set when: 834 // This name should be set when:
827 // 1) we launch an application via an application shortcut or extension API. 835 // 1) we launch an application via an application shortcut or extension API.
828 // 2) we launch an undocked devtool window. 836 // 2) we launch an undocked devtool window.
829 std::string app_name_; 837 std::string app_name_;
830 838
831 // True if the source is trusted (i.e. we do not need to show the URL in a 839 // True if the source is trusted (i.e. we do not need to show the URL in a
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 base::WeakPtrFactory<Browser> weak_factory_; 945 base::WeakPtrFactory<Browser> weak_factory_;
938 946
939 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; 947 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_;
940 948
941 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; 949 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_;
942 950
943 DISALLOW_COPY_AND_ASSIGN(Browser); 951 DISALLOW_COPY_AND_ASSIGN(Browser);
944 }; 952 };
945 953
946 #endif // CHROME_BROWSER_UI_BROWSER_H_ 954 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view_host.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698