OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_APP_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ |
6 #define CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ | 6 #define CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 9 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
10 #include "chrome/browser/views/pinned_contents_info_bubble.h" | 10 #include "chrome/browser/views/pinned_contents_info_bubble.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const gfx::Rect& initial_pos, | 90 const gfx::Rect& initial_pos, |
91 bool user_gesture); | 91 bool user_gesture); |
92 virtual void ActivateContents(TabContents* contents) {} | 92 virtual void ActivateContents(TabContents* contents) {} |
93 virtual void LoadingStateChanged(TabContents* source) {} | 93 virtual void LoadingStateChanged(TabContents* source) {} |
94 virtual void CloseContents(TabContents* source) {} | 94 virtual void CloseContents(TabContents* source) {} |
95 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} | 95 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} |
96 virtual bool IsPopup(TabContents* source) { return false; } | 96 virtual bool IsPopup(TabContents* source) { return false; } |
97 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} | 97 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} |
98 virtual void URLStarredChanged(TabContents* source, bool starred) {} | 98 virtual void URLStarredChanged(TabContents* source, bool starred) {} |
99 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} | 99 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
| 100 virtual bool ShouldEnablePreferredSizeNotifications() { return true; } |
100 virtual void UpdatePreferredSize(const gfx::Size& pref_size); | 101 virtual void UpdatePreferredSize(const gfx::Size& pref_size); |
101 | 102 |
102 private: | 103 private: |
103 friend class DeleteTask<AppLauncher>; | 104 friend class DeleteTask<AppLauncher>; |
104 friend class NavigationBar; | 105 friend class NavigationBar; |
105 friend class InfoBubbleContentsView; | 106 friend class InfoBubbleContentsView; |
106 | 107 |
107 explicit AppLauncher(Browser* browser); | 108 explicit AppLauncher(Browser* browser); |
108 ~AppLauncher(); | 109 ~AppLauncher(); |
109 | 110 |
110 void AddTabWithURL(const GURL& url, PageTransition::Type transition); | 111 void AddTabWithURL(const GURL& url, PageTransition::Type transition); |
111 | 112 |
112 // The currently active browser. We use this to open urls. | 113 // The currently active browser. We use this to open urls. |
113 Browser* browser_; | 114 Browser* browser_; |
114 | 115 |
115 // The InfoBubble displaying the Omnibox and app contents. | 116 // The InfoBubble displaying the Omnibox and app contents. |
116 PinnedContentsInfoBubble* info_bubble_; | 117 PinnedContentsInfoBubble* info_bubble_; |
117 | 118 |
118 // The view with the navigation bar and render view, shown in the info-bubble. | 119 // The view with the navigation bar and render view, shown in the info-bubble. |
119 InfoBubbleContentsView* info_bubble_content_; | 120 InfoBubbleContentsView* info_bubble_content_; |
120 | 121 |
121 // An optional string containing querystring-encoded name/value pairs to be | 122 // An optional string containing querystring-encoded name/value pairs to be |
122 // sent into the launcher's HTML page via its hash. | 123 // sent into the launcher's HTML page via its hash. |
123 std::string hash_params_; | 124 std::string hash_params_; |
124 | 125 |
125 DISALLOW_COPY_AND_ASSIGN(AppLauncher); | 126 DISALLOW_COPY_AND_ASSIGN(AppLauncher); |
126 }; | 127 }; |
127 | 128 |
128 #endif // CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ | 129 #endif // CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ |
OLD | NEW |