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

Side by Side Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/infobars/core/infobar_delegate.h" 13 #include "components/infobars/core/infobar_delegate.h"
13 #include "components/omnibox/browser/autocomplete_match.h" 14 #include "components/omnibox/browser/autocomplete_match.h"
14 15
15 class Profile; 16 class Profile;
16 17
17 namespace content { 18 namespace content {
18 class WebContents; 19 class WebContents;
19 } 20 }
20 21
21 class AlternateNavInfoBarDelegate : public infobars::InfoBarDelegate { 22 class AlternateNavInfoBarDelegate : public infobars::InfoBarDelegate {
(...skipping 12 matching lines...) Expand all
34 GURL GetLinkURL() const; 35 GURL GetLinkURL() const;
35 bool LinkClicked(WindowOpenDisposition disposition); 36 bool LinkClicked(WindowOpenDisposition disposition);
36 37
37 private: 38 private:
38 AlternateNavInfoBarDelegate(Profile* profile, 39 AlternateNavInfoBarDelegate(Profile* profile,
39 const base::string16& text, 40 const base::string16& text,
40 const AutocompleteMatch& match, 41 const AutocompleteMatch& match,
41 const GURL& search_url); 42 const GURL& search_url);
42 43
43 // Returns an alternate nav infobar that owns |delegate|. 44 // Returns an alternate nav infobar that owns |delegate|.
44 static scoped_ptr<infobars::InfoBar> CreateInfoBar( 45 static std::unique_ptr<infobars::InfoBar> CreateInfoBar(
45 scoped_ptr<AlternateNavInfoBarDelegate> delegate); 46 std::unique_ptr<AlternateNavInfoBarDelegate> delegate);
46 47
47 // InfoBarDelegate: 48 // InfoBarDelegate:
48 Type GetInfoBarType() const override; 49 Type GetInfoBarType() const override;
49 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 50 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
50 int GetIconId() const override; 51 int GetIconId() const override;
51 gfx::VectorIconId GetVectorIconId() const override; 52 gfx::VectorIconId GetVectorIconId() const override;
52 53
53 Profile* profile_; 54 Profile* profile_;
54 const base::string16 text_; 55 const base::string16 text_;
55 const AutocompleteMatch match_; 56 const AutocompleteMatch match_;
56 const GURL search_url_; 57 const GURL search_url_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(AlternateNavInfoBarDelegate); 59 DISALLOW_COPY_AND_ASSIGN(AlternateNavInfoBarDelegate);
59 }; 60 };
60 61
61 #endif // CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_ 62 #endif // CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/navigation_correction_tab_observer.h ('k') | chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698