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 CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/browser/tab_contents/tab_contents_delegate.h" | 10 #include "content/browser/tab_contents/tab_contents_delegate.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // The returned profile is guaranteed to be original if non-NULL. | 26 // The returned profile is guaranteed to be original if non-NULL. |
27 Profile* profile() const; | 27 Profile* profile() const; |
28 | 28 |
29 // Calling this causes all following events sent from the | 29 // Calling this causes all following events sent from the |
30 // TabContents object to be ignored. It also makes all following | 30 // TabContents object to be ignored. It also makes all following |
31 // calls to profile() return NULL. | 31 // calls to profile() return NULL. |
32 void Detach(); | 32 void Detach(); |
33 | 33 |
34 // TabContentsDelegate declarations. | 34 // TabContentsDelegate declarations. |
35 | 35 |
36 // Deprecated. Use two-arguments variant instead. | |
37 // TODO(adriansc): Remove this method once refactoring changed all call sites. | |
38 virtual TabContents* OpenURLFromTab( | |
39 TabContents* source, | |
40 const GURL& url, | |
41 const GURL& referrer, | |
42 WindowOpenDisposition disposition, | |
43 content::PageTransition transition) OVERRIDE; | |
44 virtual TabContents* OpenURLFromTab(TabContents* source, | 36 virtual TabContents* OpenURLFromTab(TabContents* source, |
45 const OpenURLParams& params) OVERRIDE; | 37 const OpenURLParams& params) OVERRIDE; |
46 | 38 |
47 virtual void AddNewContents(TabContents* source, | 39 virtual void AddNewContents(TabContents* source, |
48 TabContents* new_contents, | 40 TabContents* new_contents, |
49 WindowOpenDisposition disposition, | 41 WindowOpenDisposition disposition, |
50 const gfx::Rect& initial_pos, | 42 const gfx::Rect& initial_pos, |
51 bool user_gesture) OVERRIDE; | 43 bool user_gesture) OVERRIDE; |
52 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; | 44 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; |
53 virtual bool ShouldAddNavigationToHistory( | 45 virtual bool ShouldAddNavigationToHistory( |
54 const history::HistoryAddPageArgs& add_page_args, | 46 const history::HistoryAddPageArgs& add_page_args, |
55 content::NavigationType navigation_type) OVERRIDE; | 47 content::NavigationType navigation_type) OVERRIDE; |
56 | 48 |
57 private: | 49 private: |
58 Profile* profile_; // Weak pointer. Always an original profile. | 50 Profile* profile_; // Weak pointer. Always an original profile. |
59 }; | 51 }; |
60 | 52 |
61 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ | 53 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |