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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_result_view_model.h

Issue 6286092: Refactor AutocompletePopupContentView so that it can be extended to create (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix merge conflicts Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autocomplete/autocomplete_result_view_model.h
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view_model.h b/chrome/browser/ui/views/autocomplete/autocomplete_result_view_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3a4d463779d653073cb489922777f5c6940d9e4
--- /dev/null
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view_model.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H_
+#define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H_
+#pragma once
+
+class SkBitmap;
+
+// An interface implemented by an object that provides data to populate
+// individual result views.
+class AutocompleteResultViewModel {
+ public:
+ // Returns true if the index is selected.
+ virtual bool IsSelectedIndex(size_t index) const = 0;
+
+ // Returns true if the index is hovered.
+ virtual bool IsHoveredIndex(size_t index) const = 0;
+
+ // Returns the special-case icon we should use for the given index, or NULL
+ // if we should use the default icon.
+ virtual const SkBitmap* GetSpecialIcon(size_t index) const = 0;
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H_
« no previous file with comments | « chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698