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

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

Issue 9428018: Create BaseWindow and ExtensionWindowWrapper for extension API access to Panels (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 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
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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "content/public/browser/web_contents_delegate.h" 49 #include "content/public/browser/web_contents_delegate.h"
50 #include "content/public/common/page_transition_types.h" 50 #include "content/public/common/page_transition_types.h"
51 #include "content/public/common/page_zoom.h" 51 #include "content/public/common/page_zoom.h"
52 #include "ui/base/ui_base_types.h" 52 #include "ui/base/ui_base_types.h"
53 #include "ui/gfx/rect.h" 53 #include "ui/gfx/rect.h"
54 54
55 class BrowserSyncedWindowDelegate; 55 class BrowserSyncedWindowDelegate;
56 class BrowserTabRestoreServiceDelegate; 56 class BrowserTabRestoreServiceDelegate;
57 class BrowserWindow; 57 class BrowserWindow;
58 class Extension; 58 class Extension;
59 class ExtensionWindowWrapper;
59 class FindBarController; 60 class FindBarController;
60 class FullscreenController; 61 class FullscreenController;
61 class HtmlDialogUIDelegate; 62 class HtmlDialogUIDelegate;
62 class InstantController; 63 class InstantController;
63 class InstantUnloadHandler; 64 class InstantUnloadHandler;
64 class PrefService; 65 class PrefService;
65 class Profile; 66 class Profile;
66 class SessionStorageNamespace; 67 class SessionStorageNamespace;
67 class SkBitmap; 68 class SkBitmap;
68 class StatusBubble; 69 class StatusBubble;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // this Browser. 227 // this Browser.
227 InstantController* instant() const { return instant_.get(); } 228 InstantController* instant() const { return instant_.get(); }
228 229
229 // |window()| will return NULL if called before |CreateBrowserWindow()| 230 // |window()| will return NULL if called before |CreateBrowserWindow()|
230 // is done. 231 // is done.
231 BrowserWindow* window() const { return window_; } 232 BrowserWindow* window() const { return window_; }
232 ToolbarModel* toolbar_model() { return &toolbar_model_; } 233 ToolbarModel* toolbar_model() { return &toolbar_model_; }
233 const SessionID& session_id() const { return session_id_; } 234 const SessionID& session_id() const { return session_id_; }
234 CommandUpdater* command_updater() { return &command_updater_; } 235 CommandUpdater* command_updater() { return &command_updater_; }
235 bool block_command_execution() const { return block_command_execution_; } 236 bool block_command_execution() const { return block_command_execution_; }
236 BrowserTabRestoreServiceDelegate* tab_restore_service_delegate() { 237 BrowserTabRestoreServiceDelegate* tab_restore_service_delegate() const {
237 return tab_restore_service_delegate_.get(); 238 return tab_restore_service_delegate_.get();
238 } 239 }
239 BrowserSyncedWindowDelegate* synced_window_delegate() { 240 BrowserSyncedWindowDelegate* synced_window_delegate() const {
240 return synced_window_delegate_.get(); 241 return synced_window_delegate_.get();
241 } 242 }
242 243
243 // Get the FindBarController for this browser, creating it if it does not 244 // Get the FindBarController for this browser, creating it if it does not
244 // yet exist. 245 // yet exist.
245 FindBarController* GetFindBarController(); 246 FindBarController* GetFindBarController();
246 247
247 // Returns true if a FindBarController exists for this browser. 248 // Returns true if a FindBarController exists for this browser.
248 bool HasFindBarController() const; 249 bool HasFindBarController() const;
249 250
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // True when the current tab is in fullscreen mode, requested by 875 // True when the current tab is in fullscreen mode, requested by
875 // webkitRequestFullScreen. 876 // webkitRequestFullScreen.
876 bool IsFullscreenForTab() const; 877 bool IsFullscreenForTab() const;
877 878
878 // Called each time the browser window is shown. 879 // Called each time the browser window is shown.
879 void OnWindowDidShow(); 880 void OnWindowDidShow();
880 881
881 // Show the first run search engine bubble on the location bar. 882 // Show the first run search engine bubble on the location bar.
882 void ShowFirstRunBubble(); 883 void ShowFirstRunBubble();
883 884
885 ExtensionWindowWrapper* extension_window_wrapper() const {
886 return extension_window_wrapper_.get();
887 }
888
884 protected: 889 protected:
885 // Wrapper for the factory method in BrowserWindow. This allows subclasses to 890 // Wrapper for the factory method in BrowserWindow. This allows subclasses to
886 // set their own window. 891 // set their own window.
887 virtual BrowserWindow* CreateBrowserWindow(); 892 virtual BrowserWindow* CreateBrowserWindow();
888 893
889 private: 894 private:
890 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest); 895 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest);
891 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); 896 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
892 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut); 897 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut);
893 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp); 898 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp);
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 // Helper which implements the SyncedWindowDelegate interface. 1450 // Helper which implements the SyncedWindowDelegate interface.
1446 scoped_ptr<BrowserSyncedWindowDelegate> synced_window_delegate_; 1451 scoped_ptr<BrowserSyncedWindowDelegate> synced_window_delegate_;
1447 1452
1448 scoped_ptr<InstantController> instant_; 1453 scoped_ptr<InstantController> instant_;
1449 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1454 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1450 1455
1451 BookmarkBar::State bookmark_bar_state_; 1456 BookmarkBar::State bookmark_bar_state_;
1452 1457
1453 scoped_refptr<FullscreenController> fullscreen_controller_; 1458 scoped_refptr<FullscreenController> fullscreen_controller_;
1454 1459
1460 scoped_ptr<ExtensionWindowWrapper> extension_window_wrapper_;
1461
1455 // True if the browser window has been shown at least once. 1462 // True if the browser window has been shown at least once.
1456 bool window_has_shown_; 1463 bool window_has_shown_;
1457 1464
1458 DISALLOW_COPY_AND_ASSIGN(Browser); 1465 DISALLOW_COPY_AND_ASSIGN(Browser);
1459 }; 1466 };
1460 1467
1461 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1468 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698