| 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 CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ | 6 #define CHROME_BROWSER_UI_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 "chrome/browser/ui/toolbar/chrome_toolbar_model.h" | 15 #include "components/toolbar/toolbar_model.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
| 19 class ToolbarModelDelegate; | 19 class ToolbarModelDelegate; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class NavigationController; | 22 class NavigationController; |
| 23 class WebContents; | 23 class WebContents; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 class X509Certificate; | 27 class X509Certificate; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // This class is the model used by the toolbar, location bar and autocomplete | 30 // This class is the model used by the toolbar, location bar and autocomplete |
| 31 // edit. It populates its states from the current navigation entry retrieved | 31 // edit. It populates its states from the current navigation entry retrieved |
| 32 // from the navigation controller returned by GetNavigationController(). | 32 // from the navigation controller returned by GetNavigationController(). |
| 33 class ToolbarModelImpl : public ChromeToolbarModel { | 33 class ToolbarModelImpl : public ToolbarModel { |
| 34 public: | 34 public: |
| 35 explicit ToolbarModelImpl(ToolbarModelDelegate* delegate); | 35 explicit ToolbarModelImpl(ToolbarModelDelegate* delegate); |
| 36 ~ToolbarModelImpl() override; | 36 ~ToolbarModelImpl() override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // ToolbarModel: | 39 // ToolbarModel: |
| 40 base::string16 GetText() const override; | 40 base::string16 GetText() const override; |
| 41 base::string16 GetFormattedURL(size_t* prefix_end) const override; | 41 base::string16 GetFormattedURL(size_t* prefix_end) const override; |
| 42 base::string16 GetCorpusNameForMobile() const override; | 42 base::string16 GetCorpusNameForMobile() const override; |
| 43 GURL GetURL() const override; | 43 GURL GetURL() const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 62 // replacement is enabled, editing is not in progress, etc.). If | 62 // replacement is enabled, editing is not in progress, etc.). If |
| 63 // |ignore_editing| is true, the "editing not in progress" check is skipped. | 63 // |ignore_editing| is true, the "editing not in progress" check is skipped. |
| 64 base::string16 GetSearchTerms(bool ignore_editing) const; | 64 base::string16 GetSearchTerms(bool ignore_editing) const; |
| 65 | 65 |
| 66 ToolbarModelDelegate* delegate_; | 66 ToolbarModelDelegate* delegate_; |
| 67 | 67 |
| 68 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl); | 68 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ | 71 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ |
| OLD | NEW |