| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual TabContents* OpenURLFromTab(TabContents* source, | 68 virtual TabContents* OpenURLFromTab(TabContents* source, |
| 69 const OpenURLParams& params); | 69 const OpenURLParams& params); |
| 70 | 70 |
| 71 // Called to inform the delegate that the tab content's navigation state | 71 // Called to inform the delegate that the tab content's navigation state |
| 72 // changed. The |changed_flags| indicates the parts of the navigation state | 72 // changed. The |changed_flags| indicates the parts of the navigation state |
| 73 // that have been updated, and is any combination of the | 73 // that have been updated, and is any combination of the |
| 74 // |TabContents::InvalidateTypes| bits. | 74 // |TabContents::InvalidateTypes| bits. |
| 75 virtual void NavigationStateChanged(const TabContents* source, | 75 virtual void NavigationStateChanged(const TabContents* source, |
| 76 unsigned changed_flags); | 76 unsigned changed_flags); |
| 77 | 77 |
| 78 // Returns the set of headers to add to the navigation request. Use | 78 // Adds the navigation request headers to |headers|. Use |
| 79 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. | 79 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. |
| 80 virtual std::string GetNavigationHeaders(const GURL& url); | 80 virtual void AddNavigationHeaders(const GURL& url, std::string* headers); |
| 81 | 81 |
| 82 // Creates a new tab with the already-created TabContents 'new_contents'. | 82 // Creates a new tab with the already-created TabContents 'new_contents'. |
| 83 // The window for the added contents should be reparented correctly when this | 83 // The window for the added contents should be reparented correctly when this |
| 84 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the | 84 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the |
| 85 // initial position. | 85 // initial position. |
| 86 virtual void AddNewContents(TabContents* source, | 86 virtual void AddNewContents(TabContents* source, |
| 87 TabContents* new_contents, | 87 TabContents* new_contents, |
| 88 WindowOpenDisposition disposition, | 88 WindowOpenDisposition disposition, |
| 89 const gfx::Rect& initial_pos, | 89 const gfx::Rect& initial_pos, |
| 90 bool user_gesture); | 90 bool user_gesture); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 void Attach(TabContents* source); | 348 void Attach(TabContents* source); |
| 349 | 349 |
| 350 // Called when |this| is no longer the TabContentsDelegate for |source|. | 350 // Called when |this| is no longer the TabContentsDelegate for |source|. |
| 351 void Detach(TabContents* source); | 351 void Detach(TabContents* source); |
| 352 | 352 |
| 353 // The TabContents that this is currently a delegate for. | 353 // The TabContents that this is currently a delegate for. |
| 354 std::set<TabContents*> attached_contents_; | 354 std::set<TabContents*> attached_contents_; |
| 355 }; | 355 }; |
| 356 | 356 |
| 357 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 357 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |