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

Unified Diff: ios/chrome/browser/ui/toolbar/toolbar_model_ios.h

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm ('k') | ios/chrome/browser/ui/toolbar/toolbar_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698