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

Side by Side Diff: chrome/browser/ui/views/tabs/dragged_tab_view.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/ui/views/tabs/dragged_tab_view.h" 5 #include "chrome/browser/ui/views/tabs/dragged_tab_view.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/ui/views/tabs/native_view_photobooth.h" 8 #include "chrome/browser/ui/views/tabs/native_view_photobooth.h"
9 #include "third_party/skia/include/core/SkShader.h" 9 #include "third_party/skia/include/core/SkShader.h"
10 #include "ui/gfx/canvas_skia.h" 10 #include "ui/gfx/canvas_skia.h"
11 #include "views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 12
13 #if defined(USE_AURA) 13 #if defined(USE_AURA)
14 #include "views/widget/native_widget_aura.h" 14 #include "ui/views/widget/native_widget_aura.h"
15 #elif defined(OS_WIN) 15 #elif defined(OS_WIN)
16 #include "views/widget/native_widget_win.h" 16 #include "ui/views/widget/native_widget_win.h"
17 #elif defined(TOOLKIT_USES_GTK) 17 #elif defined(TOOLKIT_USES_GTK)
18 #include "views/widget/native_widget_gtk.h" 18 #include "ui/views/widget/native_widget_gtk.h"
19 #endif 19 #endif
20 20
21 static const int kTransparentAlpha = 200; 21 static const int kTransparentAlpha = 200;
22 static const int kOpaqueAlpha = 255; 22 static const int kOpaqueAlpha = 255;
23 static const int kDragFrameBorderSize = 2; 23 static const int kDragFrameBorderSize = 2;
24 static const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; 24 static const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize;
25 static const float kScalingFactor = 0.5; 25 static const float kScalingFactor = 0.5;
26 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162); 26 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162);
27 27
28 //////////////////////////////////////////////////////////////////////////////// 28 ////////////////////////////////////////////////////////////////////////////////
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 gfx::Size DraggedTabView::PreferredContainerSize() { 190 gfx::Size DraggedTabView::PreferredContainerSize() {
191 gfx::Size ps = GetPreferredSize(); 191 gfx::Size ps = GetPreferredSize();
192 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height())); 192 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height()));
193 } 193 }
194 194
195 int DraggedTabView::ScaleValue(int value) { 195 int DraggedTabView::ScaleValue(int value) {
196 return static_cast<int>(value * kScalingFactor); 196 return static_cast<int>(value * kScalingFactor);
197 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/ui/views/tabs/native_view_photobooth_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698