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

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

Issue 215047: Gets the drop arrow to show when dragging URLs over the tab strip.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_TAB_STRIP_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
7 7
8 #include "base/gfx/point.h" 8 #include "base/gfx/point.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/tabs/tab_strip_model.h" 10 #include "chrome/browser/tabs/tab_strip_model.h"
11 #include "chrome/browser/views/tabs/tab.h" 11 #include "chrome/browser/views/tabs/tab.h"
12 #include "chrome/browser/views/tabs/tab_strip_wrapper.h" 12 #include "chrome/browser/views/tabs/tab_strip_wrapper.h"
13 #include "views/controls/button/image_button.h" 13 #include "views/controls/button/image_button.h"
14 #include "views/view.h" 14 #include "views/view.h"
15 #if defined(OS_WIN)
16 #include "views/widget/widget_win.h"
17 #endif
18 15
19 class DraggedTabController; 16 class DraggedTabController;
20 class ScopedMouseCloseWidthCalculator; 17 class ScopedMouseCloseWidthCalculator;
21 class TabStripModel; 18 class TabStripModel;
22 19
23 namespace views { 20 namespace views {
24 class ImageView; 21 class ImageView;
22 #if defined(OS_LINUX)
23 class WidgetGtk;
24 #elif defined(OS_WIN)
25 class WidgetWin;
26 #endif
25 } 27 }
26 28
27 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
28 // 30 //
29 // TabStrip 31 // TabStrip
30 // 32 //
31 // A View that represents the TabStripModel. The TabStrip has the 33 // A View that represents the TabStripModel. The TabStrip has the
32 // following responsibilities: 34 // following responsibilities:
33 // - It implements the TabStripModelObserver interface, and acts as a 35 // - It implements the TabStripModelObserver interface, and acts as a
34 // container for Tabs, and is also responsible for creating them. 36 // container for Tabs, and is also responsible for creating them.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 365
364 // Direction the arrow should point in. If true, the arrow is displayed 366 // Direction the arrow should point in. If true, the arrow is displayed
365 // above the tab and points down. If false, the arrow is displayed beneath 367 // above the tab and points down. If false, the arrow is displayed beneath
366 // the tab and points up. 368 // the tab and points up.
367 bool point_down; 369 bool point_down;
368 370
369 // Renders the drop indicator. 371 // Renders the drop indicator.
370 // TODO(beng): should be views::Widget. 372 // TODO(beng): should be views::Widget.
371 #if defined(OS_WIN) 373 #if defined(OS_WIN)
372 views::WidgetWin* arrow_window; 374 views::WidgetWin* arrow_window;
375 #else
376 views::WidgetGtk* arrow_window;
373 #endif 377 #endif
374 views::ImageView* arrow_view; 378 views::ImageView* arrow_view;
375 379
376 private: 380 private:
377 DISALLOW_COPY_AND_ASSIGN(DropInfo); 381 DISALLOW_COPY_AND_ASSIGN(DropInfo);
378 }; 382 };
379 383
380 // Valid for the lifetime of a drag over us. 384 // Valid for the lifetime of a drag over us.
381 scoped_ptr<DropInfo> drop_info_; 385 scoped_ptr<DropInfo> drop_info_;
382 386
383 // The controller for a drag initiated from a Tab. Valid for the lifetime of 387 // The controller for a drag initiated from a Tab. Valid for the lifetime of
384 // the drag session. 388 // the drag session.
385 scoped_ptr<DraggedTabController> drag_controller_; 389 scoped_ptr<DraggedTabController> drag_controller_;
386 390
387 // The Tabs we contain, and their last generated "good" bounds. 391 // The Tabs we contain, and their last generated "good" bounds.
388 struct TabData { 392 struct TabData {
389 Tab* tab; 393 Tab* tab;
390 gfx::Rect ideal_bounds; 394 gfx::Rect ideal_bounds;
391 }; 395 };
392 std::vector<TabData> tab_data_; 396 std::vector<TabData> tab_data_;
393 397
394 // The currently running animation. 398 // The currently running animation.
395 scoped_ptr<TabAnimation> active_animation_; 399 scoped_ptr<TabAnimation> active_animation_;
396 400
397 DISALLOW_COPY_AND_ASSIGN(TabStrip); 401 DISALLOW_COPY_AND_ASSIGN(TabStrip);
398 }; 402 };
399 403
400 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ 404 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698