| 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" |
| 11 | 11 |
| 12 class Browser; | |
| 13 class Profile; | 12 class Profile; |
| 14 | 13 |
| 15 // This class implements (and mostly ignores) most of TabContentsDelegate for | 14 // This class implements (and mostly ignores) most of TabContentsDelegate for |
| 16 // use in an HTML dialog. Subclasses need only override a few methods instead | 15 // use in an HTML dialog. Subclasses need only override a few methods instead |
| 17 // of the everything from TabContentsDelegate; this way, implementations on | 16 // of the everything from TabContentsDelegate; this way, implementations on |
| 18 // all platforms behave consistently. | 17 // all platforms behave consistently. |
| 19 | 18 |
| 20 class HtmlDialogTabContentsDelegate : public TabContentsDelegate { | 19 class HtmlDialogTabContentsDelegate : public TabContentsDelegate { |
| 21 public: | 20 public: |
| 22 // Profile must be non-NULL. | 21 // Profile must be non-NULL. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 53 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; | 52 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; |
| 54 virtual bool ShouldAddNavigationToHistory( | 53 virtual bool ShouldAddNavigationToHistory( |
| 55 const history::HistoryAddPageArgs& add_page_args, | 54 const history::HistoryAddPageArgs& add_page_args, |
| 56 content::NavigationType navigation_type) OVERRIDE; | 55 content::NavigationType navigation_type) OVERRIDE; |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 Profile* profile_; // Weak pointer. Always an original profile. | 58 Profile* profile_; // Weak pointer. Always an original profile. |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ | 61 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |