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

Side by Side Diff: chrome/browser/ui/browser_instant_controller.h

Issue 11369137: Implement {Start,Stop}CapturingKeyStrokes for Instant. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Save focus visibility state per tab. Created 8 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_UI_BROWSER_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/prefs/public/pref_change_registrar.h" 10 #include "base/prefs/public/pref_change_registrar.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void SetInstantSuggestion(const InstantSuggestion& suggestion); 54 void SetInstantSuggestion(const InstantSuggestion& suggestion);
55 55
56 // Invoked by |instant_| to get the bounds that the preview is placed at, 56 // Invoked by |instant_| to get the bounds that the preview is placed at,
57 // in screen coordinated. 57 // in screen coordinated.
58 gfx::Rect GetInstantBounds(); 58 gfx::Rect GetInstantBounds();
59 59
60 // Invoked by |instant_| to notify that the preview gained focus, usually due 60 // Invoked by |instant_| to notify that the preview gained focus, usually due
61 // to the user clicking on it. 61 // to the user clicking on it.
62 void InstantPreviewFocused(); 62 void InstantPreviewFocused();
63 63
64 // Invoked by |instant_| to set invisible focus in the omnibox.
65 void SetInvisibleFocus();
66
64 // Invoked by |instant_| to get the currently active tab, over which the 67 // Invoked by |instant_| to get the currently active tab, over which the
65 // preview would be shown. 68 // preview would be shown.
66 TabContents* GetActiveTabContents() const; 69 TabContents* GetActiveTabContents() const;
67 70
68 // Invoked by |browser_| when the active tab changes. 71 // Invoked by |browser_| when the active tab changes.
69 void ActiveTabChanged(); 72 void ActiveTabChanged();
70 73
71 private: 74 private:
72 // Overridden from PrefObserver: 75 // Overridden from PrefObserver:
73 virtual void OnPreferenceChanged(PrefServiceBase* service, 76 virtual void OnPreferenceChanged(PrefServiceBase* service,
74 const std::string& pref_name) OVERRIDE; 77 const std::string& pref_name) OVERRIDE;
75 78
76 // Overridden from search::SearchModelObserver: 79 // Overridden from search::SearchModelObserver:
77 virtual void ModeChanged(const search::Mode& old_mode, 80 virtual void ModeChanged(const search::Mode& old_mode,
78 const search::Mode& new_mode) OVERRIDE; 81 const search::Mode& new_mode) OVERRIDE;
79 82
80 Browser* const browser_; 83 Browser* const browser_;
81 84
82 InstantController instant_; 85 InstantController instant_;
83 InstantUnloadHandler instant_unload_handler_; 86 InstantUnloadHandler instant_unload_handler_;
84 87
85 PrefChangeRegistrar profile_pref_registrar_; 88 PrefChangeRegistrar profile_pref_registrar_;
86 89
87 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); 90 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController);
88 }; 91 };
89 92
90 } // namespace chrome 93 } // namespace chrome
91 94
92 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 95 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698