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

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

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 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 "chrome/browser/ui/views/tabs/native_view_photobooth.h" 7 #include "chrome/browser/ui/views/tabs/native_view_photobooth.h"
8 #include "third_party/skia/include/core/SkShader.h" 8 #include "third_party/skia/include/core/SkShader.h"
9 #include "ui/gfx/canvas_skia.h" 9 #include "ui/gfx/canvas_skia.h"
10 #include "views/widget/widget.h" 10 #include "views/widget/widget.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #else 55 #else
56 container_.reset(new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP)); 56 container_.reset(new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP));
57 container_->MakeTransparent(); 57 container_->MakeTransparent();
58 container_->set_delete_on_destroy(false); 58 container_->set_delete_on_destroy(false);
59 container_->Init(NULL, gfx::Rect(0, 0, 0, 0)); 59 container_->Init(NULL, gfx::Rect(0, 0, 0, 0));
60 container_->SetContentsView(this); 60 container_->SetContentsView(this);
61 #endif 61 #endif
62 } 62 }
63 63
64 DraggedTabView::~DraggedTabView() { 64 DraggedTabView::~DraggedTabView() {
65 GetParent()->RemoveChildView(this); 65 parent()->RemoveChildView(this);
66 container_->CloseNow(); 66 container_->CloseNow();
67 } 67 }
68 68
69 void DraggedTabView::MoveTo(const gfx::Point& screen_point) { 69 void DraggedTabView::MoveTo(const gfx::Point& screen_point) {
70 int x; 70 int x;
71 if (base::i18n::IsRTL()) { 71 if (base::i18n::IsRTL()) {
72 // On RTL locales, a dragged tab (when it is not attached to a tab strip) 72 // On RTL locales, a dragged tab (when it is not attached to a tab strip)
73 // is rendered using a right-to-left orientation so we should calculate the 73 // is rendered using a right-to-left orientation so we should calculate the
74 // window position differently. 74 // window position differently.
75 gfx::Size ps = GetPreferredSize(); 75 gfx::Size ps = GetPreferredSize();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 #else 212 #else
213 gfx::Rect bounds; 213 gfx::Rect bounds;
214 container_->GetBounds(&bounds, true); 214 container_->GetBounds(&bounds, true);
215 container_->SetBounds(gfx::Rect(bounds.x(), bounds.y(), w, h)); 215 container_->SetBounds(gfx::Rect(bounds.x(), bounds.y(), w, h));
216 #endif 216 #endif
217 } 217 }
218 218
219 int DraggedTabView::ScaleValue(int value) { 219 int DraggedTabView::ScaleValue(int value) {
220 return static_cast<int>(value * kScalingFactor); 220 return static_cast<int>(value * kScalingFactor);
221 } 221 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698