| 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_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/common/web_contents_user_data.h" | 8 #include "chrome/browser/common/web_contents_user_data.h" |
| 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 10 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 10 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void set_delegate(SearchEngineTabHelperDelegate* d) { delegate_ = d; } | 25 void set_delegate(SearchEngineTabHelperDelegate* d) { delegate_ = d; } |
| 26 | 26 |
| 27 // content::WebContentsObserver overrides. | 27 // content::WebContentsObserver overrides. |
| 28 virtual void DidNavigateMainFrame( | 28 virtual void DidNavigateMainFrame( |
| 29 const content::LoadCommittedDetails& details, | 29 const content::LoadCommittedDetails& details, |
| 30 const content::FrameNavigateParams& params) OVERRIDE; | 30 const content::FrameNavigateParams& params) OVERRIDE; |
| 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 explicit SearchEngineTabHelper(content::WebContents* web_contents); | 34 explicit SearchEngineTabHelper(content::WebContents* web_contents); |
| 35 static int kUserDataKey; | |
| 36 friend class WebContentsUserData<SearchEngineTabHelper>; | 35 friend class WebContentsUserData<SearchEngineTabHelper>; |
| 37 | 36 |
| 38 // Handles when a page specifies an OSDD (OpenSearch Description Document). | 37 // Handles when a page specifies an OSDD (OpenSearch Description Document). |
| 39 void OnPageHasOSDD(int32 page_id, | 38 void OnPageHasOSDD(int32 page_id, |
| 40 const GURL& doc_url, | 39 const GURL& doc_url, |
| 41 const search_provider::OSDDType& msg_provider_type); | 40 const search_provider::OSDDType& msg_provider_type); |
| 42 | 41 |
| 43 // If params has a searchable form, this tries to create a new keyword. | 42 // If params has a searchable form, this tries to create a new keyword. |
| 44 void GenerateKeywordIfNecessary( | 43 void GenerateKeywordIfNecessary( |
| 45 const content::FrameNavigateParams& params); | 44 const content::FrameNavigateParams& params); |
| 46 | 45 |
| 47 // Delegate for notifying our owner about stuff. Not owned by us. | 46 // Delegate for notifying our owner about stuff. Not owned by us. |
| 48 SearchEngineTabHelperDelegate* delegate_; | 47 SearchEngineTabHelperDelegate* delegate_; |
| 49 | 48 |
| 50 DISALLOW_COPY_AND_ASSIGN(SearchEngineTabHelper); | 49 DISALLOW_COPY_AND_ASSIGN(SearchEngineTabHelper); |
| 51 }; | 50 }; |
| 52 | 51 |
| 53 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ | 52 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_ |
| OLD | NEW |