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

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: minor changes 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..0bebea212c1d9ae7940d1337e0b7807603559a29
--- /dev/null
+++ b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h
@@ -0,0 +1,77 @@
+// 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;
+
+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);
+
+ private:
+ virtual ~TouchAutocompleteResultView();
+
+ // AutocompleteResultView:
+ virtual void Layout();
+ virtual gfx::Size GetPreferredSize();
+ virtual void PaintMatch(gfx::Canvas* canvas,
+ const AutocompleteMatch& match,
+ int x);
+
+ int GetFontHeight() const;
+
+ DISALLOW_COPY_AND_ASSIGN(TouchAutocompleteResultView);
+};
+
+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:
+ virtual void UpdatePopupAppearance();
+ virtual void PaintChildren(gfx::CanvasSkia* canvas);
+ virtual void LayoutChildren();
+
+ protected:
+ // AutocompletePopupContentsView:
+ virtual int CalculatePopupHeight();
+ virtual AutocompleteResultView* CreateResultView(
+ AutocompleteResultViewModel* model,
+ int model_index,
+ const gfx::Font& font,
+ const gfx::Font& bold_font);
+
+ private:
+ std::vector<View*> GetVisibleChildren();
+
+ DISALLOW_COPY_AND_ASSIGN(TouchAutocompletePopupContentsView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698