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 IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |
6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ | 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "components/toolbar/toolbar_model.h" | 10 #include "components/toolbar/toolbar_model.h" |
11 | 11 |
12 class ToolbarModelIOS { | 12 class ToolbarModelIOS : public ToolbarModel { |
13 public: | 13 public: |
14 virtual ~ToolbarModelIOS() {} | |
15 | |
16 // Returns the |ToolbarModel| contained by this instance. | |
17 virtual ToolbarModel* GetToolbarModel() = 0; | |
18 | |
19 // Returns true if the current tab is currently loading. | 14 // Returns true if the current tab is currently loading. |
20 virtual bool IsLoading() = 0; | 15 virtual bool IsLoading() = 0; |
21 | 16 |
22 // Returns the fraction of the current tab's page load that has completed as a | 17 // Returns the fraction of the current tab's page load that has completed as a |
23 // number between 0.0 and 1.0. | 18 // number between 0.0 and 1.0. |
24 virtual CGFloat GetLoadProgressFraction() = 0; | 19 virtual CGFloat GetLoadProgressFraction() = 0; |
25 | 20 |
26 // Returns true if the current tab can go back in history. | 21 // Returns true if the current tab can go back in history. |
27 virtual bool CanGoBack() = 0; | 22 virtual bool CanGoBack() = 0; |
28 | 23 |
(...skipping 12 matching lines...) Expand all Loading... |
41 virtual bool IsCurrentTabBookmarkedByUser() = 0; | 36 virtual bool IsCurrentTabBookmarkedByUser() = 0; |
42 | 37 |
43 // Returns true if the current toolbar should display the hint text. | 38 // Returns true if the current toolbar should display the hint text. |
44 virtual bool ShouldDisplayHintText() = 0; | 39 virtual bool ShouldDisplayHintText() = 0; |
45 | 40 |
46 protected: | 41 protected: |
47 ToolbarModelIOS() {} | 42 ToolbarModelIOS() {} |
48 }; | 43 }; |
49 | 44 |
50 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ | 45 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |
OLD | NEW |