Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / tabs / fake_base_tab_strip_controller.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_
7
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
10 #include "ui/base/models/list_selection_model.h"
11
12 class TabStrip;
13
14 class FakeBaseTabStripController : public TabStripController {
15  public:
16   FakeBaseTabStripController();
17   ~FakeBaseTabStripController() override;
18
19   void AddTab(int index, bool is_active);
20   void RemoveTab(int index);
21
22   void set_tab_strip(TabStrip* tab_strip) { tab_strip_ = tab_strip; }
23
24   // TabStripController overrides:
25   const ui::ListSelectionModel& GetSelectionModel() override;
26   int GetCount() const override;
27   bool IsValidIndex(int index) const override;
28   bool IsActiveTab(int index) const override;
29   int GetActiveIndex() const override;
30   bool IsTabSelected(int index) const override;
31   bool IsTabPinned(int index) const override;
32   bool IsNewTabPage(int index) const override;
33   void SelectTab(int index) override;
34   void ExtendSelectionTo(int index) override;
35   void ToggleSelected(int index) override;
36   void AddSelectionFromAnchorTo(int index) override;
37   void CloseTab(int index, CloseTabSource source) override;
38   void ToggleTabAudioMute(int index) override;
39   void ShowContextMenuForTab(Tab* tab,
40                              const gfx::Point& p,
41                              ui::MenuSourceType source_type) override;
42   void UpdateLoadingAnimations() override;
43   int HasAvailableDragActions() const override;
44   void OnDropIndexUpdate(int index, bool drop_before) override;
45   void PerformDrop(bool drop_before, int index, const GURL& url) override;
46   bool IsCompatibleWith(TabStrip* other) const override;
47   void CreateNewTab() override;
48   void CreateNewTabWithLocation(const base::string16& loc) override;
49   bool IsIncognito() override;
50   void StackedLayoutMaybeChanged() override;
51   void OnStartedDraggingTabs() override;
52   void OnStoppedDraggingTabs() override;
53   void CheckFileSupported(const GURL& url) override;
54
55  private:
56   TabStrip* tab_strip_;
57
58   int num_tabs_;
59   int active_index_;
60
61   ui::ListSelectionModel selection_model_;
62
63   DISALLOW_COPY_AND_ASSIGN(FakeBaseTabStripController);
64 };
65
66 #endif  // CHROME_BROWSER_UI_VIEWS_TABS_FAKE_BASE_TAB_STRIP_CONTROLLER_H_