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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h

Issue 10580039: Adds ability to render omnibox as a view above the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows Created 8 years, 6 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_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/autocomplete/autocomplete.h" 10 #include "chrome/browser/autocomplete/autocomplete.h"
(...skipping 14 matching lines...) Expand all
25 namespace views { 25 namespace views {
26 class BubbleBorder; 26 class BubbleBorder;
27 } 27 }
28 28
29 // A view representing the contents of the autocomplete popup. 29 // A view representing the contents of the autocomplete popup.
30 class OmniboxPopupContentsView : public views::View, 30 class OmniboxPopupContentsView : public views::View,
31 public OmniboxResultViewModel, 31 public OmniboxResultViewModel,
32 public OmniboxPopupView, 32 public OmniboxPopupView,
33 public ui::AnimationDelegate { 33 public ui::AnimationDelegate {
34 public: 34 public:
35 // Creates the appropriate type of omnibox dropdown for the 35 // Factory method for creating the AutocompletePopupView.
36 // current environment, e.g. desktop vs. touch optimized layout. 36 static OmniboxPopupView* Create(const gfx::Font& font,
37 static OmniboxPopupContentsView* CreateForEnvironment( 37 OmniboxView* omnibox_view,
38 const gfx::Font& font, 38 AutocompleteEditModel* edit_model,
39 OmniboxView* omnibox_view, 39 views::View* location_bar,
40 AutocompleteEditModel* edit_model, 40 views::View* popup_parent_view);
41 views::View* location_bar);
42 41
43 // Returns the bounds the popup should be shown at. This is the display bounds 42 // Returns the bounds the popup should be shown at. This is the display bounds
44 // and includes offsets for the dropshadow which this view's border renders. 43 // and includes offsets for the dropshadow which this view's border renders.
45 gfx::Rect GetPopupBounds() const; 44 gfx::Rect GetPopupBounds() const;
46 45
47 virtual void LayoutChildren(); 46 virtual void LayoutChildren();
48 47
49 // Overridden from OmniboxPopupView: 48 // Overridden from OmniboxPopupView:
50 virtual bool IsOpen() const OVERRIDE; 49 virtual bool IsOpen() const OVERRIDE;
51 virtual void InvalidateLine(size_t line) OVERRIDE; 50 virtual void InvalidateLine(size_t line) OVERRIDE;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // The popup sizes vertically using an animation when the popup is getting 181 // The popup sizes vertically using an animation when the popup is getting
183 // shorter (not larger, that makes it look "slow"). 182 // shorter (not larger, that makes it look "slow").
184 ui::SlideAnimation size_animation_; 183 ui::SlideAnimation size_animation_;
185 gfx::Rect start_bounds_; 184 gfx::Rect start_bounds_;
186 gfx::Rect target_bounds_; 185 gfx::Rect target_bounds_;
187 186
188 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); 187 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView);
189 }; 188 };
190 189
191 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 190 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698