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

Unified Diff: chrome/browser/views/tabs/browser_tab_strip.cc

Issue 155242: Add temporary TabStripWrapper interface that is implemented by both TabStrip ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « chrome/browser/views/tabs/browser_tab_strip.h ('k') | chrome/browser/views/tabs/dragged_tab_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/browser_tab_strip.cc
===================================================================
--- chrome/browser/views/tabs/browser_tab_strip.cc (revision 20183)
+++ chrome/browser/views/tabs/browser_tab_strip.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/compiler_specific.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/views/tabs/tab_strip.h" // for CreateTabStrip only.
namespace {
@@ -147,3 +148,60 @@
model_->delegate()->ContinueDraggingDetachedTab(contents, window_bounds,
tab_bounds);
}
+
+////////////////////////////////////////////////////////////////////////////////
+// BrowserTabStrip, TabStripWrapper implementation:
+
+int BrowserTabStrip::GetPreferredHeight() {
+ return GetPreferredSize().height();
+}
+
+bool BrowserTabStrip::IsAnimating() const {
+ return false;
+}
+
+void BrowserTabStrip::SetBackgroundOffset(gfx::Point offset) {
+}
+
+bool BrowserTabStrip::PointIsWithinWindowCaption(
+ const gfx::Point& point) {
+ return false;
+}
+
+bool BrowserTabStrip::IsDragSessionActive() const {
+ return false;
+}
+
+bool BrowserTabStrip::IsCompatibleWith(TabStripWrapper* other) const {
+ return false;
+}
+
+void BrowserTabStrip::SetDraggedTabBounds(int tab_index,
+ const gfx::Rect& tab_bounds) {
+ TabStrip2::SetDraggedTabBounds(tab_index, tab_bounds);
+}
+
+void BrowserTabStrip::UpdateLoadingAnimations() {
+}
+
+views::View* BrowserTabStrip::GetView() {
+ return this;
+}
+
+BrowserTabStrip* BrowserTabStrip::AsBrowserTabStrip() {
+ return this;
+}
+
+TabStrip* BrowserTabStrip::AsTabStrip() {
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// TabStripWrapper, public:
+
+// static
+TabStripWrapper* TabStripWrapper::CreateTabStrip(TabStripModel* model) {
+ if (TabStrip2::Enabled())
+ return new BrowserTabStrip(model);
+ return new TabStrip(model);
+}
« no previous file with comments | « chrome/browser/views/tabs/browser_tab_strip.h ('k') | chrome/browser/views/tabs/dragged_tab_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698