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

Side by Side Diff: ash/drag_drop/drag_image_view.cc

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « ash/drag_drop/drag_image_view.h ('k') | ash/extended_desktop_unittest.cc » ('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 "ash/drag_drop/drag_image_view.h" 5 #include "ash/drag_drop/drag_image_view.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "skia/ext/image_operations.h" 8 #include "skia/ext/image_operations.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/compositor/dip_util.h" 11 #include "ui/compositor/dip_util.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/size_conversions.h" 13 #include "ui/gfx/size_conversions.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 #include "ui/wm/core/shadow_types.h" 15 #include "ui/wm/core/shadow_types.h"
16 16
17 namespace ash { 17 namespace ash {
18 namespace internal {
19
20 namespace { 18 namespace {
21 using views::Widget; 19 using views::Widget;
22 20
23 Widget* CreateDragWidget(gfx::NativeView context) { 21 Widget* CreateDragWidget(gfx::NativeView context) {
24 Widget* drag_widget = new Widget; 22 Widget* drag_widget = new Widget;
25 Widget::InitParams params; 23 Widget::InitParams params;
26 params.type = Widget::InitParams::TYPE_TOOLTIP; 24 params.type = Widget::InitParams::TYPE_TOOLTIP;
27 params.keep_on_top = true; 25 params.keep_on_top = true;
28 params.context = context; 26 params.context = context;
29 params.accept_events = false; 27 params.accept_events = false;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 drag_hint_position.Offset(-drag_hint_size.width() / 2, 0); 162 drag_hint_position.Offset(-drag_hint_size.width() / 2, 0);
165 gfx::Rect drag_hint_bounds(drag_hint_position, drag_hint_size); 163 gfx::Rect drag_hint_bounds(drag_hint_position, drag_hint_size);
166 drag_hint_bounds.AdjustToFit(gfx::Rect(widget_size_)); 164 drag_hint_bounds.AdjustToFit(gfx::Rect(widget_size_));
167 165
168 // Draw image. 166 // Draw image.
169 canvas->DrawImageInt(*(drag_hint->ToImageSkia()), 167 canvas->DrawImageInt(*(drag_hint->ToImageSkia()),
170 drag_hint_bounds.x(), drag_hint_bounds.y()); 168 drag_hint_bounds.x(), drag_hint_bounds.y());
171 } 169 }
172 } 170 }
173 171
174 } // namespace internal
175 } // namespace ash 172 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_image_view.h ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698