Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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_ |
| OLD | NEW |