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

Side by Side Diff: components/toolbar/toolbar_model_impl.h

Issue 1652153003: Move toolbar_model_{impl,delegate}.{cc,h} to components/toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3
Patch Set: Rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « components/toolbar/toolbar_model_delegate.h ('k') | components/toolbar/toolbar_model_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ 5 #ifndef COMPONENTS_TOOLBAR_TOOLBAR_MODEL_IMPL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ 6 #define COMPONENTS_TOOLBAR_TOOLBAR_MODEL_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "components/toolbar/toolbar_model.h" 15 #include "components/toolbar/toolbar_model.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 class ToolbarModelDelegate; 18 class ToolbarModelDelegate;
19 19
20 namespace content {
21 class NavigationController;
22 class WebContents;
23 }
24
25 namespace net { 20 namespace net {
26 class X509Certificate; 21 class X509Certificate;
27 } 22 }
28 23
29 // This class is the model used by the toolbar, location bar and autocomplete 24 // This class is the model used by the toolbar, location bar and autocomplete
30 // edit. It populates its states from the current navigation entry retrieved 25 // edit. It populates its states from the current navigation entry retrieved
31 // from the navigation controller returned by GetNavigationController(). 26 // from the navigation controller returned by GetNavigationController().
32 class ToolbarModelImpl : public ToolbarModel { 27 class ToolbarModelImpl : public ToolbarModel {
Peter Kasting 2016/02/02 23:38:56 Do we still need to separate the abstract base out
sdefresne 2016/02/04 10:35:34 => crbug.com/584195
33 public: 28 public:
34 ToolbarModelImpl(ToolbarModelDelegate* delegate, 29 ToolbarModelImpl(ToolbarModelDelegate* delegate,
35 size_t max_url_display_chars); 30 size_t max_url_display_chars);
36 ~ToolbarModelImpl() override; 31 ~ToolbarModelImpl() override;
37 32
38 private: 33 private:
39 // ToolbarModel: 34 // ToolbarModel:
40 base::string16 GetText() const override; 35 base::string16 GetText() const override;
41 base::string16 GetFormattedURL(size_t* prefix_end) const override; 36 base::string16 GetFormattedURL(size_t* prefix_end) const override;
42 base::string16 GetCorpusNameForMobile() const override; 37 base::string16 GetCorpusNameForMobile() const override;
(...skipping 11 matching lines...) Expand all
54 // replacement is enabled, editing is not in progress, etc.). If 49 // replacement is enabled, editing is not in progress, etc.). If
55 // |ignore_editing| is true, the "editing not in progress" check is skipped. 50 // |ignore_editing| is true, the "editing not in progress" check is skipped.
56 base::string16 GetSearchTerms(bool ignore_editing) const; 51 base::string16 GetSearchTerms(bool ignore_editing) const;
57 52
58 ToolbarModelDelegate* delegate_; 53 ToolbarModelDelegate* delegate_;
59 const size_t max_url_display_chars_; 54 const size_t max_url_display_chars_;
60 55
61 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl); 56 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl);
62 }; 57 };
63 58
64 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ 59 #endif // COMPONENTS_TOOLBAR_TOOLBAR_MODEL_IMPL_H_
OLDNEW
« no previous file with comments | « components/toolbar/toolbar_model_delegate.h ('k') | components/toolbar/toolbar_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698