| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INTENTS_WEB_INTENT_INLINE_DISPOSITION_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_INLINE_DISPOSITION_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_INLINE_DISPOSITION_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_INLINE_DISPOSITION_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/public/browser/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
| 11 | 11 |
| 12 class WebIntentPicker; |
| 13 |
| 12 // This class is the policy delegate for the rendered page in the intents | 14 // This class is the policy delegate for the rendered page in the intents |
| 13 // inline disposition bubble. | 15 // inline disposition bubble. |
| 14 class WebIntentInlineDispositionDelegate : public content::WebContentsDelegate { | 16 class WebIntentInlineDispositionDelegate : public content::WebContentsDelegate { |
| 15 public: | 17 public: |
| 16 WebIntentInlineDispositionDelegate(); | 18 // |picker| is notified when the web contents loading state changes. Must not |
| 19 // be NULL. |
| 20 explicit WebIntentInlineDispositionDelegate(WebIntentPicker* picker); |
| 17 virtual ~WebIntentInlineDispositionDelegate(); | 21 virtual ~WebIntentInlineDispositionDelegate(); |
| 18 | 22 |
| 19 // WebContentsDelegate implementation. | 23 // WebContentsDelegate implementation. |
| 20 virtual bool IsPopupOrPanel( | 24 virtual bool IsPopupOrPanel( |
| 21 const content::WebContents* source) const OVERRIDE; | 25 const content::WebContents* source) const OVERRIDE; |
| 22 virtual bool ShouldAddNavigationToHistory( | 26 virtual bool ShouldAddNavigationToHistory( |
| 23 const history::HistoryAddPageArgs& add_page_args, | 27 const history::HistoryAddPageArgs& add_page_args, |
| 24 content::NavigationType navigation_type) OVERRIDE; | 28 content::NavigationType navigation_type) OVERRIDE; |
| 25 virtual content::WebContents* OpenURLFromTab( | 29 virtual content::WebContents* OpenURLFromTab( |
| 26 content::WebContents* source, | 30 content::WebContents* source, |
| 27 const content::OpenURLParams& params) OVERRIDE; | 31 const content::OpenURLParams& params) OVERRIDE; |
| 32 virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE; |
| 33 |
| 34 private: |
| 35 // Picker to notify when loading state changes. Weak pointer. |
| 36 WebIntentPicker* picker_; |
| 28 }; | 37 }; |
| 29 | 38 |
| 30 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_INLINE_DISPOSITION_DELEGATE_H_ | 39 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_INLINE_DISPOSITION_DELEGATE_H_ |
| OLD | NEW |