| 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_OMNIBOX_SEARCH_HINT_H_ | 5 #ifndef CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ |
| 6 #define CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ | 6 #define CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 | 15 |
| 16 class Profile; | 16 class Profile; |
| 17 class TabContentsWrapper; | 17 class TabContents; |
| 18 typedef TabContents TabContentsWrapper; |
| 18 | 19 |
| 19 // This class is responsible for showing an info-bar that tells the user she | 20 // This class is responsible for showing an info-bar that tells the user she |
| 20 // can type her search query directly in the omnibox. | 21 // can type her search query directly in the omnibox. |
| 21 // It is displayed when the user visits a known search engine URL and has not | 22 // It is displayed when the user visits a known search engine URL and has not |
| 22 // searched from the omnibox before, or has not previously dismissed a similar | 23 // searched from the omnibox before, or has not previously dismissed a similar |
| 23 // info-bar. | 24 // info-bar. |
| 24 class OmniboxSearchHint : public content::NotificationObserver { | 25 class OmniboxSearchHint : public content::NotificationObserver { |
| 25 public: | 26 public: |
| 26 explicit OmniboxSearchHint(TabContentsWrapper* tab); | 27 explicit OmniboxSearchHint(TabContentsWrapper* tab); |
| 27 virtual ~OmniboxSearchHint(); | 28 virtual ~OmniboxSearchHint(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 53 TabContentsWrapper* tab_; | 54 TabContentsWrapper* tab_; |
| 54 | 55 |
| 55 // A map containing the URLs of the search engine for which we want to | 56 // A map containing the URLs of the search engine for which we want to |
| 56 // trigger the hint. | 57 // trigger the hint. |
| 57 std::map<std::string, int> search_engine_urls_; | 58 std::map<std::string, int> search_engine_urls_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(OmniboxSearchHint); | 60 DISALLOW_COPY_AND_ASSIGN(OmniboxSearchHint); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 #endif // CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ | 63 #endif // CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ |
| OLD | NEW |