| 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);
|
| };
|
|
|