diff options
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 1 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 5 |
4 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 3631575..c846d62 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2061,6 +2061,11 @@ void TabContents::OnDidGetApplicationInfo(int32 page_id, delegate()->OnDidGetApplicationInfo(this, page_id); } +void TabContents::OnInstallApplication(const WebApplicationInfo& info) { + if (delegate()) + delegate()->OnInstallApplication(this, info); +} + void TabContents::OnDisabledOutdatedPlugin(const string16& name, const GURL& update_url) { new DisabledPluginInfoBar(this, name, update_url); diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 4d54db5..19a61a8 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -868,6 +868,7 @@ class TabContents : public PageNavigator, virtual void OnCrashedWorker(); virtual void OnDidGetApplicationInfo(int32 page_id, const WebApplicationInfo& info); + virtual void OnInstallApplication(const WebApplicationInfo& info); virtual void OnDisabledOutdatedPlugin(const string16& name, const GURL& update_url); virtual void OnPageContents(const GURL& url, diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc index 89eef5c..6c54933 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.cc +++ b/chrome/browser/tab_contents/tab_contents_delegate.cc @@ -162,6 +162,12 @@ void TabContentsDelegate::OnDidGetApplicationInfo(TabContents* tab_contents, int32 page_id) { } +// Notification when an application programmatically requests installation. +void TabContentsDelegate::OnInstallApplication( + TabContents* tab_contents, + const WebApplicationInfo& app_info) { +} + gfx::NativeWindow TabContentsDelegate::GetFrameNativeWindow() { return NULL; } diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 5d9ee37..e748229 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -38,6 +38,7 @@ class RenderViewHost; class TabContents; class TemplateURL; class TemplateURLModel; +struct WebApplicationInfo; // Objects implement this interface to get notified about changes in the // TabContents and to provide necessary functionality. @@ -274,6 +275,10 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { virtual void OnDidGetApplicationInfo(TabContents* tab_contents, int32 page_id); + // Notification when an application programmatically requests installation. + virtual void OnInstallApplication(TabContents* tab_contents, + const WebApplicationInfo& app_info); + // Returns the native window framing the view containing the tab contents. virtual gfx::NativeWindow GetFrameNativeWindow(); |