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

Side by Side Diff: chrome/browser/views/tabs/base_tab_renderer.h

Issue 2124003: More TabStrip refactoring. (Closed)
Patch Set: Merge with trunk Created 10 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_
6 #define CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_
7 7
8 #include "chrome/browser/views/tabs/tab_renderer_data.h" 8 #include "chrome/browser/views/tabs/tab_renderer_data.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Sets the data this tabs displays. Invokes DataChanged for subclasses to 52 // Sets the data this tabs displays. Invokes DataChanged for subclasses to
53 // update themselves appropriately. 53 // update themselves appropriately.
54 void SetData(const TabRendererData& data); 54 void SetData(const TabRendererData& data);
55 const TabRendererData& data() const { return data_; } 55 const TabRendererData& data() const { return data_; }
56 56
57 // Sets the network state. If the network state changes NetworkStateChanged is 57 // Sets the network state. If the network state changes NetworkStateChanged is
58 // invoked. 58 // invoked.
59 virtual void UpdateLoadingAnimation(TabRendererData::NetworkState state); 59 virtual void UpdateLoadingAnimation(TabRendererData::NetworkState state);
60 60
61 // Used to set/check whether this Tab is being animated closed.
62 void set_closing(bool closing) { closing_ = closing; }
63 bool closing() const { return closing_; }
64
65 // See description above field.
66 void set_dragging(bool dragging) { dragging_ = dragging; }
67 bool dragging() const { return dragging_; }
68
61 protected: 69 protected:
62 // Invoked from SetData after |data_| has been updated to the new data. 70 // Invoked from SetData after |data_| has been updated to the new data.
63 virtual void DataChanged(const TabRendererData& old) {} 71 virtual void DataChanged(const TabRendererData& old) {}
64 72
65 // Invoked if data_.network_state changes, or the network_state is not none. 73 // Invoked if data_.network_state changes, or the network_state is not none.
66 virtual void AdvanceLoadingAnimation(TabRendererData::NetworkState state) {} 74 virtual void AdvanceLoadingAnimation(TabRendererData::NetworkState state) {}
67 75
68 TabController* controller() const { return controller_; } 76 TabController* controller() const { return controller_; }
69 77
70 private: 78 private:
71 // The controller. 79 // The controller.
72 // WARNING: this is null during detached tab dragging. 80 // WARNING: this is null during detached tab dragging.
73 TabController* controller_; 81 TabController* controller_;
74 82
75 TabRendererData data_; 83 TabRendererData data_;
76 84
85 // True if the tab is being animated closed.
86 bool closing_;
87
88 // True if the tab is being dragged.
89 bool dragging_;
90
77 DISALLOW_COPY_AND_ASSIGN(BaseTabRenderer); 91 DISALLOW_COPY_AND_ASSIGN(BaseTabRenderer);
78 }; 92 };
79 93
80 #endif // CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_ 94 #endif // CHROME_BROWSER_VIEWS_TABS_BASE_TAB_RENDERER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/compact_location_bar_host.cc ('k') | chrome/browser/views/tabs/base_tab_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698