OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_EXTERNAL_TAB_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ | 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 bool Init(Profile* profile, | 60 bool Init(Profile* profile, |
61 HWND parent, | 61 HWND parent, |
62 const gfx::Rect& bounds, | 62 const gfx::Rect& bounds, |
63 DWORD style, | 63 DWORD style, |
64 bool load_requests_via_automation, | 64 bool load_requests_via_automation, |
65 bool handle_top_level_requests, | 65 bool handle_top_level_requests, |
66 TabContents* existing_tab_contents, | 66 TabContents* existing_tab_contents, |
67 const GURL& initial_url, | 67 const GURL& initial_url, |
68 const GURL& referrer); | 68 const GURL& referrer, |
| 69 bool infobars_enabled); |
69 | 70 |
70 // Unhook the keystroke listener and notify about the closing TabContents. | 71 // Unhook the keystroke listener and notify about the closing TabContents. |
71 // This function gets called from three places, which is fine. | 72 // This function gets called from three places, which is fine. |
72 // 1. OnFinalMessage | 73 // 1. OnFinalMessage |
73 // 2. In the destructor. | 74 // 2. In the destructor. |
74 // 3. In AutomationProvider::CreateExternalTab | 75 // 3. In AutomationProvider::CreateExternalTab |
75 void Uninitialize(); | 76 void Uninitialize(); |
76 | 77 |
77 // Used to reinitialize the automation channel and related information | 78 // Used to reinitialize the automation channel and related information |
78 // for this container. Typically used when an ExternalTabContainer | 79 // for this container. Typically used when an ExternalTabContainer |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 196 |
196 void set_pending(bool pending) { | 197 void set_pending(bool pending) { |
197 pending_ = pending; | 198 pending_ = pending; |
198 } | 199 } |
199 | 200 |
200 // InfoBarContainer::Delegate overrides | 201 // InfoBarContainer::Delegate overrides |
201 virtual void InfoBarSizeChanged(bool is_animating); | 202 virtual void InfoBarSizeChanged(bool is_animating); |
202 | 203 |
203 virtual void TabContentsCreated(TabContents* new_contents); | 204 virtual void TabContentsCreated(TabContents* new_contents); |
204 | 205 |
| 206 virtual bool infobars_enabled(); |
| 207 |
205 protected: | 208 protected: |
206 // Overridden from views::WidgetWin: | 209 // Overridden from views::WidgetWin: |
207 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); | 210 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); |
208 virtual void OnDestroy(); | 211 virtual void OnDestroy(); |
209 virtual void OnFinalMessage(HWND window); | 212 virtual void OnFinalMessage(HWND window); |
210 | 213 |
211 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, | 214 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, |
212 NavigationType::Type nav_type, | 215 NavigationType::Type nav_type, |
213 int relative_offset); | 216 int relative_offset); |
214 void Navigate(const GURL& url, const GURL& referrer); | 217 void Navigate(const GURL& url, const GURL& referrer); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 static ExternalTabContainer* innermost_tab_for_unload_event_; | 321 static ExternalTabContainer* innermost_tab_for_unload_event_; |
319 | 322 |
320 // Contains the list of URL requests which are pending waiting for an ack | 323 // Contains the list of URL requests which are pending waiting for an ack |
321 // from the external host. | 324 // from the external host. |
322 std::vector<PendingTopLevelNavigation> pending_open_url_requests_; | 325 std::vector<PendingTopLevelNavigation> pending_open_url_requests_; |
323 | 326 |
324 // Set to true if the ExternalTabContainer instance is waiting for an ack | 327 // Set to true if the ExternalTabContainer instance is waiting for an ack |
325 // from the host. | 328 // from the host. |
326 bool pending_; | 329 bool pending_; |
327 | 330 |
| 331 // Set to true if the ExternalTabContainer if infobars should be enabled. |
| 332 bool infobars_enabled_; |
| 333 |
328 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); | 334 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); |
329 }; | 335 }; |
330 | 336 |
331 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ | 337 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
OLD | NEW |