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

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

Issue 6349101: Create a new autocomplete popup for touch. This CL depends on (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: addressed reviewer comments 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
Index: chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h
diff --git a/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..7b82faeaa432fab01170c3859288fe7cd80e6297
--- /dev/null
+++ b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h
@@ -0,0 +1,72 @@
+// 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_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_
+#pragma once
+
+#include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h"
+#include "chrome/browser/ui/views/autocomplete/autocomplete_result_view.h"
+
+class AutocompleteEditView;
+class AutocompleteEditModel;
+class Profile;
oshima 2011/02/16 20:00:27 add new line between namespaces.
varunjain 2011/02/16 23:12:37 Done.
+namespace gfx {
+class Canvas;
+class CanvasSkia;
+}
+namespace views {
+class View;
+}
+
+class TouchAutocompleteResultView : public AutocompleteResultView {
+ public:
+ TouchAutocompleteResultView(AutocompleteResultViewModel* model,
+ int model_index,
+ const gfx::Font& font,
+ const gfx::Font& bold_font);
+ virtual ~TouchAutocompleteResultView();
+
+ // AutocompleteResultView overrides.
+ virtual void Layout();
+ virtual gfx::Size GetPreferredSize();
+
+ protected:
+ virtual void PaintMatch(gfx::Canvas* canvas,
+ const AutocompleteMatch& match,
+ int x);
+
+ private:
+ int GetFontHeight();
oshima 2011/02/16 20:00:27 can this be const? DISALLOW_COPY_AND_ASSIGN
varunjain 2011/02/16 23:12:37 Done.
+};
+
+class TouchAutocompletePopupContentsView: public AutocompletePopupContentsView {
+ public:
+ TouchAutocompletePopupContentsView(const gfx::Font& font,
+ AutocompleteEditView* edit_view,
+ AutocompleteEditModel* edit_model,
+ Profile* profile,
+ const views::View* location_bar);
+ virtual ~TouchAutocompletePopupContentsView();
+
+ // AutocompletePopupContentsView overrides.
+ virtual void UpdatePopupAppearance();
+ virtual void PaintChildren(gfx::CanvasSkia* canvas);
+ virtual void LayoutChildren();
+
+ protected:
+ // AutocompletePopupContentsView overrides.
+ virtual int CalculatePopupHeight();
+ virtual AutocompleteResultView* CreateResultView(
+ AutocompleteResultViewModel* model,
+ int model_index,
+ const gfx::Font& font,
+ const gfx::Font& bold_font);
+
+ private:
+ int GetVisibleChildCount();
oshima 2011/02/16 20:00:27 const?
varunjain 2011/02/16 23:12:37 Done.
+
oshima 2011/02/16 20:00:27 DISALLOW_COPY_AND_ASSIGN
varunjain 2011/02/16 23:12:37 Done.
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698