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

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

Issue 2775943002: Revert of [ios] Switches ToolbarModelDelegateIOS to use WebStateList. (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « ios/chrome/browser/ui/toolbar/BUILD.gn ('k') | ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
index 0a196a8a5dd92d6833c2dae46bcc53b43b864b02..1da6a5d14dd7276d9f1d178d371572368703345a 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
@@ -9,23 +9,25 @@
#include "base/macros.h"
#include "components/toolbar/toolbar_model_delegate.h"
-class WebStateList;
+@class Tab;
+@class TabModel;
namespace web {
class NavigationItem;
-class WebState;
}
// Implementation of ToolbarModelDelegate which uses an instance of
// TabModel in order to fulfil its duties.
class ToolbarModelDelegateIOS : public ToolbarModelDelegate {
public:
- // |web_state_list| must outlive this ToolbarModelDelegateIOS object.
- explicit ToolbarModelDelegateIOS(WebStateList* web_state_list);
+ explicit ToolbarModelDelegateIOS(TabModel* tab_model);
~ToolbarModelDelegateIOS() override;
- // Returns the active WebState.
- web::WebState* GetActiveWebState() const;
+ // Sets the |tab_model_| with provided values.
+ void SetTabModel(TabModel* tab_model);
+
+ // Returns the current tab.
+ Tab* GetCurrentTab() const;
private:
// Helper method to extract the NavigationItem from which the states are
@@ -44,7 +46,7 @@
bool FailsMalwareCheck() const override;
const gfx::VectorIcon* GetVectorIconOverride() const override;
- WebStateList* web_state_list_; // weak
+ base::scoped_nsobject<TabModel> tab_model_;
DISALLOW_COPY_AND_ASSIGN(ToolbarModelDelegateIOS);
};
« no previous file with comments | « ios/chrome/browser/ui/toolbar/BUILD.gn ('k') | ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698