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

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

Issue 10871077: Move more code from NWW to HWNDMessageHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 container_.reset(new views::Widget); 42 container_.reset(new views::Widget);
43 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 43 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
44 params.transparent = true; 44 params.transparent = true;
45 params.keep_on_top = true; 45 params.keep_on_top = true;
46 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 46 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
47 params.bounds = gfx::Rect(PreferredContainerSize()); 47 params.bounds = gfx::Rect(PreferredContainerSize());
48 container_->Init(params); 48 container_->Init(params);
49 container_->SetContentsView(this); 49 container_->SetContentsView(this);
50 #if defined(OS_WIN) && !defined(USE_AURA) 50 #if defined(OS_WIN) && !defined(USE_AURA)
51 static_cast<views::NativeWidgetWin*>(container_->native_widget())-> 51 static_cast<views::NativeWidgetWin*>(container_->native_widget())->
52 set_can_update_layered_window(false); 52 SetCanUpdateLayeredWindow(false);
53 53
54 BOOL drag; 54 BOOL drag;
55 if ((::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, &drag, 0) != 0) && 55 if ((::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, &drag, 0) != 0) &&
56 (drag == FALSE)) { 56 (drag == FALSE)) {
57 show_contents_on_drag_ = false; 57 show_contents_on_drag_ = false;
58 } 58 }
59 #endif 59 #endif
60 container_->SetOpacity(kTransparentAlpha); 60 container_->SetOpacity(kTransparentAlpha);
61 container_->SetBounds(gfx::Rect(params.bounds.size())); 61 container_->SetBounds(gfx::Rect(params.bounds.size()));
62 } 62 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 gfx::Size DraggedTabView::PreferredContainerSize() { 189 gfx::Size DraggedTabView::PreferredContainerSize() {
190 gfx::Size ps = GetPreferredSize(); 190 gfx::Size ps = GetPreferredSize();
191 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height())); 191 return gfx::Size(ScaleValue(ps.width()), ScaleValue(ps.height()));
192 } 192 }
193 193
194 int DraggedTabView::ScaleValue(int value) { 194 int DraggedTabView::ScaleValue(int value) {
195 return static_cast<int>(value * kScalingFactor); 195 return static_cast<int>(value * kScalingFactor);
196 } 196 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698