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

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

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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) 2012 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 #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.h" 10 #include "ui/gfx/canvas.h"
11 #include "ui/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 "ui/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 "ui/gfx/win/dpi.h" 16 #include "ui/gfx/win/dpi.h"
17 #include "ui/views/widget/native_widget_win.h" 17 #include "ui/views/widget/native_widget_win.h"
18 #endif 18 #endif
19 19
20 static const int kTransparentAlpha = 200; 20 static const int kTransparentAlpha = 200;
21 static const int kOpaqueAlpha = 255;
22 static const int kDragFrameBorderSize = 2; 21 static const int kDragFrameBorderSize = 2;
23 static const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; 22 static const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize;
24 static const float kScalingFactor = 0.5; 23 static const float kScalingFactor = 0.5;
25 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162); 24 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162);
26 25
27 //////////////////////////////////////////////////////////////////////////////// 26 ////////////////////////////////////////////////////////////////////////////////
28 // DraggedTabView, public: 27 // DraggedTabView, public:
29 28
30 DraggedTabView::DraggedTabView(const std::vector<views::View*>& renderers, 29 DraggedTabView::DraggedTabView(const std::vector<views::View*>& renderers,
31 const std::vector<gfx::Rect>& renderer_bounds, 30 const std::vector<gfx::Rect>& renderer_bounds,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 182 }
184 183
185 gfx::Size DraggedTabView::PreferredContainerSize() { 184 gfx::Size DraggedTabView::PreferredContainerSize() {
186 gfx::Size ps = GetPreferredSize(); 185 gfx::Size ps = GetPreferredSize();
187 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height())); 186 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height()));
188 } 187 }
189 188
190 int DraggedTabView::ScaleValue(int value) { 189 int DraggedTabView::ScaleValue(int value) {
191 return static_cast<int>(value * kScalingFactor); 190 return static_cast<int>(value * kScalingFactor);
192 } 191 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/speech_recognition_bubble_views.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698