Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/omnibox_search_hint.h

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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 7
8 #include <map>
9 #include <string>
10
11 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
12 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
14 #include "content/public/browser/web_contents_user_data.h" 11 #include "content/public/browser/web_contents_user_data.h"
15 12
16 class Profile; 13 class Profile;
17 14
18 namespace content { 15 namespace content {
19 class WebContents; 16 class WebContents;
20 } 17 }
(...skipping 22 matching lines...) Expand all
43 void DisableHint(); 40 void DisableHint();
44 41
45 // Returns true if the profile and current environment make the showing of the 42 // Returns true if the profile and current environment make the showing of the
46 // hint infobar possible. 43 // hint infobar possible.
47 static bool IsEnabled(Profile* profile); 44 static bool IsEnabled(Profile* profile);
48 45
49 private: 46 private:
50 explicit OmniboxSearchHint(content::WebContents* web_contents); 47 explicit OmniboxSearchHint(content::WebContents* web_contents);
51 friend class content::WebContentsUserData<OmniboxSearchHint>; 48 friend class content::WebContentsUserData<OmniboxSearchHint>;
52 49
53 void ShowInfoBar();
54
55 content::NotificationRegistrar notification_registrar_; 50 content::NotificationRegistrar notification_registrar_;
56 51
57 // The contents we are associated with. 52 // The contents we are associated with.
58 content::WebContents* web_contents_; 53 content::WebContents* web_contents_;
59 54
60 // A map containing the URLs of the search engine for which we want to
61 // trigger the hint.
62 std::map<std::string, int> search_engine_urls_;
63
64 DISALLOW_COPY_AND_ASSIGN(OmniboxSearchHint); 55 DISALLOW_COPY_AND_ASSIGN(OmniboxSearchHint);
65 }; 56 };
66 57
67 #endif // CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_ 58 #endif // CHROME_BROWSER_OMNIBOX_SEARCH_HINT_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/omnibox_search_hint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698