diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 22:36:26 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 22:36:26 +0000 |
commit | 15d9c0c8432dc9b0bd700ebfdb5542534e7b2e00 (patch) | |
tree | 5fbd5eb8932485758f17be2060bd2d3179fed704 /chrome/browser/tab_contents | |
parent | b665bf2b7418b0820a677d11d50da12b5b800351 (diff) | |
download | chromium_src-15d9c0c8432dc9b0bd700ebfdb5542534e7b2e00.zip chromium_src-15d9c0c8432dc9b0bd700ebfdb5542534e7b2e00.tar.gz chromium_src-15d9c0c8432dc9b0bd700ebfdb5542534e7b2e00.tar.bz2 |
Plumbs through window.chrome.setSuggestResult. It's currently hidden behind a flag.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3312017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59165 0039d316-1c4b-4281-b951-d872f2087c98
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 | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 3 |
4 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 3c35e61..01a303f 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2112,6 +2112,11 @@ void TabContents::OnPageTranslated(int32 page_id, Details<PageTranslatedDetails>(&details)); } +void TabContents::OnSetSuggestResult(int32 page_id, const std::string& result) { + if (delegate()) + delegate()->OnSetSuggestResult(page_id, result); +} + void TabContents::DidStartProvisionalLoadForFrame( RenderViewHost* render_view_host, bool is_main_frame, diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 94b2ca7..56b2844 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -864,6 +864,7 @@ class TabContents : public PageNavigator, const std::string& original_lang, const std::string& translated_lang, TranslateErrors::Type error_type); + virtual void OnSetSuggestResult(int32 page_id, const std::string& result); // RenderViewHostDelegate::Resource implementation. virtual void DidStartProvisionalLoadForFrame(RenderViewHost* render_view_host, diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc index 2735a2c..615a438 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.cc +++ b/chrome/browser/tab_contents/tab_contents_delegate.cc @@ -168,5 +168,9 @@ void TabContentsDelegate::ContentTypeChanged(TabContents* source) { void TabContentsDelegate::CommitMatchPreview(TabContents* source) { } +void TabContentsDelegate::OnSetSuggestResult(int32 page_id, + const std::string& result) { +} + TabContentsDelegate::~TabContentsDelegate() { } diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 629a8d4..56b4c9f 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -290,6 +290,9 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { // preview TabContents. virtual void CommitMatchPreview(TabContents* source); + // Notifies the delegate that the page has a suggest result. + virtual void OnSetSuggestResult(int32 page_id, const std::string& result); + protected: virtual ~TabContentsDelegate(); }; |