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

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

Issue 391036: Forbid reloading the Inspector window (Closed)
Patch Set: Follow codereview Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_BROWSER_H_
6 #define CHROME_BROWSER_BROWSER_H_ 6 #define CHROME_BROWSER_BROWSER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public SelectFileDialog::Listener { 49 public SelectFileDialog::Listener {
50 public: 50 public:
51 // If you change the values in this enum you'll need to update browser_proxy. 51 // If you change the values in this enum you'll need to update browser_proxy.
52 // TODO(sky): move into a common place that is referenced by both ui_tests 52 // TODO(sky): move into a common place that is referenced by both ui_tests
53 // and chrome. 53 // and chrome.
54 enum Type { 54 enum Type {
55 TYPE_NORMAL = 1, 55 TYPE_NORMAL = 1,
56 TYPE_POPUP = 2, 56 TYPE_POPUP = 2,
57 TYPE_APP = 4, 57 TYPE_APP = 4,
58 TYPE_APP_POPUP = TYPE_APP | TYPE_POPUP, 58 TYPE_APP_POPUP = TYPE_APP | TYPE_POPUP,
59 TYPE_ANY = TYPE_NORMAL | TYPE_POPUP | TYPE_APP 59 TYPE_DEVTOOLS = TYPE_APP | 8,
60 TYPE_ANY = TYPE_NORMAL | TYPE_POPUP | TYPE_APP | TYPE_DEVTOOLS
60 }; 61 };
61 62
62 // Possible elements of the Browser window. 63 // Possible elements of the Browser window.
63 enum WindowFeature { 64 enum WindowFeature {
64 FEATURE_TITLEBAR = 1, 65 FEATURE_TITLEBAR = 1,
65 FEATURE_TABSTRIP = 2, 66 FEATURE_TABSTRIP = 2,
66 FEATURE_TOOLBAR = 4, 67 FEATURE_TOOLBAR = 4,
67 FEATURE_LOCATIONBAR = 8, 68 FEATURE_LOCATIONBAR = 8,
68 FEATURE_BOOKMARKBAR = 16, 69 FEATURE_BOOKMARKBAR = 16,
69 FEATURE_INFOBAR = 32, 70 FEATURE_INFOBAR = 32,
(...skipping 27 matching lines...) Expand all
97 static Browser* Create(Profile* profile); 98 static Browser* Create(Profile* profile);
98 99
99 // Like Create, but creates a tabstrip-less popup window. 100 // Like Create, but creates a tabstrip-less popup window.
100 static Browser* CreateForPopup(Profile* profile); 101 static Browser* CreateForPopup(Profile* profile);
101 102
102 // Like Create, but creates a tabstrip-less and toolbar-less "app" window for 103 // Like Create, but creates a tabstrip-less and toolbar-less "app" window for
103 // the specified app. Passing popup=true will create a TYPE_APP_POPUP browser 104 // the specified app. Passing popup=true will create a TYPE_APP_POPUP browser
104 static Browser* CreateForApp(const std::wstring& app_name, Profile* profile, 105 static Browser* CreateForApp(const std::wstring& app_name, Profile* profile,
105 bool is_popup); 106 bool is_popup);
106 107
108 // Like Create, but creates a tabstrip-less and toolbar-less
109 // DevTools "app" window.
110 static Browser* CreateForDevTools(Profile* profile);
111
107 // Set overrides for the initial window bounds and maximized state. 112 // Set overrides for the initial window bounds and maximized state.
108 void set_override_bounds(const gfx::Rect& bounds) { 113 void set_override_bounds(const gfx::Rect& bounds) {
109 override_bounds_ = bounds; 114 override_bounds_ = bounds;
110 } 115 }
111 void set_maximized_state(MaximizedState state) { 116 void set_maximized_state(MaximizedState state) {
112 maximized_state_ = state; 117 maximized_state_ = state;
113 } 118 }
114 // Return true if the initial window bounds have been overridden. 119 // Return true if the initial window bounds have been overridden.
115 bool bounds_overridden() const { 120 bool bounds_overridden() const {
116 return !override_bounds_.IsEmpty(); 121 return !override_bounds_.IsEmpty();
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 TabContents* new_contents, 557 TabContents* new_contents,
553 WindowOpenDisposition disposition, 558 WindowOpenDisposition disposition,
554 const gfx::Rect& initial_pos, 559 const gfx::Rect& initial_pos,
555 bool user_gesture); 560 bool user_gesture);
556 virtual void ActivateContents(TabContents* contents); 561 virtual void ActivateContents(TabContents* contents);
557 virtual void LoadingStateChanged(TabContents* source); 562 virtual void LoadingStateChanged(TabContents* source);
558 virtual void CloseContents(TabContents* source); 563 virtual void CloseContents(TabContents* source);
559 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); 564 virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
560 virtual void DetachContents(TabContents* source); 565 virtual void DetachContents(TabContents* source);
561 virtual bool IsPopup(TabContents* source); 566 virtual bool IsPopup(TabContents* source);
567 virtual bool CanReloadContents(TabContents* source) const;
562 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); 568 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating);
563 virtual void URLStarredChanged(TabContents* source, bool starred); 569 virtual void URLStarredChanged(TabContents* source, bool starred);
564 virtual void UpdateTargetURL(TabContents* source, const GURL& url); 570 virtual void UpdateTargetURL(TabContents* source, const GURL& url);
565 virtual void ContentsMouseEvent( 571 virtual void ContentsMouseEvent(
566 TabContents* source, const gfx::Point& location, bool motion); 572 TabContents* source, const gfx::Point& location, bool motion);
567 virtual void ContentsZoomChange(bool zoom_in); 573 virtual void ContentsZoomChange(bool zoom_in);
568 virtual void TabContentsFocused(TabContents* tab_content); 574 virtual void TabContentsFocused(TabContents* tab_content);
569 virtual bool TakeFocus(bool reverse); 575 virtual bool TakeFocus(bool reverse);
570 virtual bool IsApplication() const; 576 virtual bool IsApplication() const;
571 virtual void ConvertContentsToApplication(TabContents* source); 577 virtual void ConvertContentsToApplication(TabContents* source);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 }; 866 };
861 867
862 // Which deferred action to perform when OnDidGetApplicationInfo is notified 868 // Which deferred action to perform when OnDidGetApplicationInfo is notified
863 // from a TabContents. Currently, only one pending action is allowed. 869 // from a TabContents. Currently, only one pending action is allowed.
864 WebAppAction pending_web_app_action_; 870 WebAppAction pending_web_app_action_;
865 871
866 DISALLOW_COPY_AND_ASSIGN(Browser); 872 DISALLOW_COPY_AND_ASSIGN(Browser);
867 }; 873 };
868 874
869 #endif // CHROME_BROWSER_BROWSER_H_ 875 #endif // CHROME_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | chrome/browser/tab_contents/render_view_context_menu.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698