| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 34 // Sets the offset of the mouse from the upper left corner of the tab. | 34 // Sets the offset of the mouse from the upper left corner of the tab. |
| 35 void set_mouse_tab_offset(const gfx::Point& offset) { | 35 void set_mouse_tab_offset(const gfx::Point& offset) { |
| 36 mouse_tab_offset_ = offset; | 36 mouse_tab_offset_ = offset; |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Notifies the DraggedTabView that it should update itself. | 39 // Notifies the DraggedTabView that it should update itself. |
| 40 void Update(); | 40 void Update(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // Overridden from views::View: | 43 // Overridden from views::View: |
| 44 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 44 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
| 45 virtual void Layout() OVERRIDE; | 45 virtual void Layout() OVERRIDE; |
| 46 virtual gfx::Size GetPreferredSize() OVERRIDE; | 46 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 47 | 47 |
| 48 // Paint the view, when it's not attached to any TabStrip. | 48 // Paint the view, when it's not attached to any TabStrip. |
| 49 void PaintDetachedView(gfx::Canvas* canvas); | 49 void PaintDetachedView(gfx::CanvasSkia* canvas); |
| 50 | 50 |
| 51 // Paint the view, when "Show window contents while dragging" is disabled. | 51 // Paint the view, when "Show window contents while dragging" is disabled. |
| 52 void PaintFocusRect(gfx::Canvas* canvas); | 52 void PaintFocusRect(gfx::CanvasSkia* canvas); |
| 53 | 53 |
| 54 // Returns the preferred size of the container. | 54 // Returns the preferred size of the container. |
| 55 gfx::Size PreferredContainerSize(); | 55 gfx::Size PreferredContainerSize(); |
| 56 | 56 |
| 57 // Utility for scaling a size by the current scaling factor. | 57 // Utility for scaling a size by the current scaling factor. |
| 58 int ScaleValue(int value); | 58 int ScaleValue(int value); |
| 59 | 59 |
| 60 // The window that contains the DraggedTabView. | 60 // The window that contains the DraggedTabView. |
| 61 scoped_ptr<views::Widget> container_; | 61 scoped_ptr<views::Widget> container_; |
| 62 | 62 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 82 // we are dragging. | 82 // we are dragging. |
| 83 scoped_ptr<NativeViewPhotobooth> photobooth_; | 83 scoped_ptr<NativeViewPhotobooth> photobooth_; |
| 84 | 84 |
| 85 // Size of the TabContents being dragged. | 85 // Size of the TabContents being dragged. |
| 86 gfx::Size contents_size_; | 86 gfx::Size contents_size_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(DraggedTabView); | 88 DISALLOW_COPY_AND_ASSIGN(DraggedTabView); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 91 #endif // CHROME_BROWSER_UI_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| OLD | NEW |