Home | History | Annotate | Download | only in tabs
      1 // Copyright (c) 2011 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_ABSTRACT_TAB_STRIP_VIEW_H_
      6 #define CHROME_BROWSER_UI_VIEWS_TABS_ABSTRACT_TAB_STRIP_VIEW_H_
      7 #pragma once
      8 
      9 #include "views/view.h"
     10 
     11 // This interface is the way the browser view sees a tab strip's view.
     12 class AbstractTabStripView : public views::View {
     13  public:
     14   virtual ~AbstractTabStripView() {}
     15 
     16   // Returns true if the tab strip is editable.
     17   // Returns false if the tab strip is being dragged or animated to prevent
     18   // extensions from messing things up while that's happening.
     19   virtual bool IsTabStripEditable() const = 0;
     20 
     21   // Returns false when there is a drag operation in progress so that the frame
     22   // doesn't close.
     23   virtual bool IsTabStripCloseable() const = 0;
     24 
     25   // Updates the loading animations displayed by tabs in the tabstrip to the
     26   // next frame.
     27   virtual void UpdateLoadingAnimations() = 0;
     28 
     29   // Returns true if the specified point(TabStrip coordinates) is
     30   // in the window caption area of the browser window.
     31   virtual bool IsPositionInWindowCaption(const gfx::Point& point) = 0;
     32 
     33   // Set the background offset used by inactive tabs to match the frame image.
     34   virtual void SetBackgroundOffset(const gfx::Point& offset) = 0;
     35 };
     36 
     37 #endif  // CHROME_BROWSER_UI_VIEWS_TABS_ABSTRACT_TAB_STRIP_VIEW_H_
     38 
     39