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

Side by Side Diff: ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h

Issue 2589803002: Upstream Chrome on iOS source code [6/11]. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_VIEW_IOS_H_
6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_VIEW_IOS_H_
7
8 #include <UIKit/UIKit.h>
9
10 #include <memory>
11
12 #include "base/mac/scoped_nsobject.h"
13 #include "base/strings/string16.h"
14 #include "components/omnibox/browser/omnibox_popup_view.h"
15
16 struct AutocompleteMatch;
17 class OmniboxEditModel;
18 @class OmniboxPopupMaterialViewController;
19 class OmniboxPopupModel;
20 @protocol OmniboxPopupPositioner;
21 class OmniboxViewIOS;
22
23 // iOS implementation of AutocompletePopupView.
24 class OmniboxPopupViewIOS : public OmniboxPopupView {
25 public:
26 OmniboxPopupViewIOS(OmniboxViewIOS* edit_view,
27 OmniboxEditModel* edit_model,
28 id<OmniboxPopupPositioner> positioner);
29 ~OmniboxPopupViewIOS() override;
30
31 // AutocompletePopupView implementation.
32 bool IsOpen() const override;
33 void InvalidateLine(size_t line) override {}
34 void OnLineSelected(size_t line) override {}
35 void UpdatePopupAppearance() override;
36 gfx::Rect GetTargetBounds() override;
37 void PaintUpdatesNow() override {}
38 void OnDragCanceled() override {}
39
40 void OpenURLForRow(size_t row);
41 void DidScroll();
42 void UpdateEditViewIcon();
43 void CopyToOmnibox(const base::string16& text);
44 void SetTextAlignment(NSTextAlignment alignment);
45 bool IsStarredMatch(const AutocompleteMatch& match) const;
46 void DeleteMatch(const AutocompleteMatch& match) const;
47
48 private:
49 std::unique_ptr<OmniboxPopupModel> model_;
50 OmniboxViewIOS* edit_view_; // weak, owns this instance
51 id<OmniboxPopupPositioner> positioner_; // weak
52 // View that contains the omnibox popup table view and shadow.
53 base::scoped_nsobject<UIView> popupView_;
54 base::scoped_nsobject<OmniboxPopupMaterialViewController> popup_controller_;
55 bool is_open_;
56 // Animate the appearance of the omnibox popup view.
57 void AnimateDropdownExpansion(CGFloat parentHeight);
58 // Animate the disappearance of the omnibox popup view.
59 void AnimateDropdownCollapse();
60 };
61
62 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_VIEW_IOS_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h ('k') | ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698