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