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

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

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // provided disposition. 127 // provided disposition.
128 void OpenIndex(size_t index, WindowOpenDisposition disposition); 128 void OpenIndex(size_t index, WindowOpenDisposition disposition);
129 129
130 // Find the index of the match under the given |point|, specified in window 130 // Find the index of the match under the given |point|, specified in window
131 // coordinates. Returns OmniboxPopupModel::kNoMatch if there isn't a match at 131 // coordinates. Returns OmniboxPopupModel::kNoMatch if there isn't a match at
132 // the specified point. 132 // the specified point.
133 size_t GetIndexForPoint(const gfx::Point& point); 133 size_t GetIndexForPoint(const gfx::Point& point);
134 134
135 // Processes a located event (e.g. mouse/gesture) and sets the selection/hover 135 // Processes a located event (e.g. mouse/gesture) and sets the selection/hover
136 // state of a line in the list. 136 // state of a line in the list.
137 void UpdateLineEvent(const views::LocatedEvent& event, 137 void UpdateLineEvent(const ui::LocatedEvent& event,
138 bool should_set_selected_line); 138 bool should_set_selected_line);
139 139
140 // Opens an entry from the list depending on the event and the selected 140 // Opens an entry from the list depending on the event and the selected
141 // disposition. 141 // disposition.
142 void OpenSelectedLine(const views::LocatedEvent& event, 142 void OpenSelectedLine(const ui::LocatedEvent& event,
143 WindowOpenDisposition disposition); 143 WindowOpenDisposition disposition);
144 144
145 // Returns the target bounds given the specified content height. 145 // Returns the target bounds given the specified content height.
146 gfx::Rect CalculateTargetBounds(int h); 146 gfx::Rect CalculateTargetBounds(int h);
147 147
148 // The popup that contains this view. We create this, but it deletes itself 148 // The popup that contains this view. We create this, but it deletes itself
149 // when its window is destroyed. This is a WeakPtr because it's possible for 149 // when its window is destroyed. This is a WeakPtr because it's possible for
150 // the OS to destroy the window and thus delete this object before we're 150 // the OS to destroy the window and thus delete this object before we're
151 // deleted, or without our knowledge. 151 // deleted, or without our knowledge.
152 base::WeakPtr<AutocompletePopupWidget> popup_; 152 base::WeakPtr<AutocompletePopupWidget> popup_;
(...skipping 27 matching lines...) Expand all
180 // The popup sizes vertically using an animation when the popup is getting 180 // The popup sizes vertically using an animation when the popup is getting
181 // shorter (not larger, that makes it look "slow"). 181 // shorter (not larger, that makes it look "slow").
182 ui::SlideAnimation size_animation_; 182 ui::SlideAnimation size_animation_;
183 gfx::Rect start_bounds_; 183 gfx::Rect start_bounds_;
184 gfx::Rect target_bounds_; 184 gfx::Rect target_bounds_;
185 185
186 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); 186 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView);
187 }; 187 };
188 188
189 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 189 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698