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

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, 7 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 | « no previous file | chrome/browser/ui/browser.cc » ('j') | components/web_modal/popup_manager.cc » ('J')
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() const {
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 815
812 // This Browser's type. 816 // This Browser's type.
813 const Type type_; 817 const Type type_;
814 818
815 // This Browser's profile. 819 // This Browser's profile.
816 Profile* const profile_; 820 Profile* const profile_;
817 821
818 // This Browser's window. 822 // This Browser's window.
819 BrowserWindow* window_; 823 BrowserWindow* window_;
820 824
825 // Manages popup windows (bubbles, tab-modals) visible overlapping this
826 // window.
827 scoped_ptr<web_modal::PopupManager> popup_manager_;
828
821 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; 829 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_;
822 scoped_ptr<TabStripModel> tab_strip_model_; 830 scoped_ptr<TabStripModel> tab_strip_model_;
823 831
824 // The application name that is also the name of the window to the shell. 832 // The application name that is also the name of the window to the shell.
825 // This name should be set when: 833 // This name should be set when:
826 // 1) we launch an application via an application shortcut or extension API. 834 // 1) we launch an application via an application shortcut or extension API.
827 // 2) we launch an undocked devtool window. 835 // 2) we launch an undocked devtool window.
828 std::string app_name_; 836 std::string app_name_;
829 837
830 // True if the source is trusted (i.e. we do not need to show the URL in a 838 // 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
936 base::WeakPtrFactory<Browser> weak_factory_; 944 base::WeakPtrFactory<Browser> weak_factory_;
937 945
938 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; 946 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_;
939 947
940 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; 948 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_;
941 949
942 DISALLOW_COPY_AND_ASSIGN(Browser); 950 DISALLOW_COPY_AND_ASSIGN(Browser);
943 }; 951 };
944 952
945 #endif // CHROME_BROWSER_UI_BROWSER_H_ 953 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | components/web_modal/popup_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698