Index: ios/chrome/browser/ui/toolbar/toolbar_model_ios.h |
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_ios.h b/ios/chrome/browser/ui/toolbar/toolbar_model_ios.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8c1780b1b3a9496344439c2249d17dffc038a37 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_ios.h |
@@ -0,0 +1,50 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |
+#define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |
+ |
+#import <UIKit/UIKit.h> |
+ |
+#include "components/toolbar/toolbar_model.h" |
+ |
+class ToolbarModelIOS { |
+ public: |
+ virtual ~ToolbarModelIOS() {} |
+ |
+ // Returns the |ToolbarModel| contained by this instance. |
+ virtual ToolbarModel* GetToolbarModel() = 0; |
+ |
+ // Returns true if the current tab is currently loading. |
+ virtual bool IsLoading() = 0; |
+ |
+ // Returns the fraction of the current tab's page load that has completed as a |
+ // number between 0.0 and 1.0. |
+ virtual CGFloat GetLoadProgressFraction() = 0; |
+ |
+ // Returns true if the current tab can go back in history. |
+ virtual bool CanGoBack() = 0; |
+ |
+ // Returns true if the current tab can go forward in history. |
+ virtual bool CanGoForward() = 0; |
+ |
+ // Returns true if the current tab is a native page. |
+ virtual bool IsCurrentTabNativePage() = 0; |
+ |
+ // Returns true if the current tab's URL is bookmarked, either by the user or |
+ // by a managed bookmarks. |
+ virtual bool IsCurrentTabBookmarked() = 0; |
+ |
+ // Returns true if the current tab's URL is bookmarked by the user; returns |
+ // false if the URL is bookmarked only in managed bookmarks. |
+ virtual bool IsCurrentTabBookmarkedByUser() = 0; |
+ |
+ // Returns true if the current toolbar should display the hint text. |
+ virtual bool ShouldDisplayHintText() = 0; |
+ |
+ protected: |
+ ToolbarModelIOS() {} |
+}; |
+ |
+#endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IOS_H_ |