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

Side by Side Diff: chrome/browser/tab_contents/web_drag_source_win.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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/tab_contents/web_drag_source_win.h" 5 #include "chrome/browser/tab_contents/web_drag_source_win.h"
6 6
7 #include "base/task.h" 7 #include "base/task.h"
8 #include "chrome/browser/tab_contents/web_drag_utils_win.h" 8 #include "chrome/browser/tab_contents/web_drag_utils_win.h"
9 #include "content/browser/renderer_host/render_view_host.h" 9 #include "content/browser/renderer_host/render_view_host.h"
10 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
13 #include "content/public/browser/notification_types.h" 13 #include "content/public/browser/notification_types.h"
14 14
15 using content::BrowserThread;
15 using WebKit::WebDragOperationNone; 16 using WebKit::WebDragOperationNone;
16 17
17 namespace { 18 namespace {
18 19
19 static void GetCursorPositions(gfx::NativeWindow wnd, gfx::Point* client, 20 static void GetCursorPositions(gfx::NativeWindow wnd, gfx::Point* client,
20 gfx::Point* screen) { 21 gfx::Point* screen) {
21 POINT cursor_pos; 22 POINT cursor_pos;
22 GetCursorPos(&cursor_pos); 23 GetCursorPos(&cursor_pos);
23 screen->SetPoint(cursor_pos.x, cursor_pos.y); 24 screen->SetPoint(cursor_pos.x, cursor_pos.y);
24 ScreenToClient(wnd, &cursor_pos); 25 ScreenToClient(wnd, &cursor_pos);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // That's OK, we can continue the drag, we just can't send messages back to 116 // That's OK, we can continue the drag, we just can't send messages back to
116 // our drag source. 117 // our drag source.
117 render_view_host_ = NULL; 118 render_view_host_ = NULL;
118 } else if (content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED == type) { 119 } else if (content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED == type) {
119 // This could be possible when we close the tab and the source is still 120 // This could be possible when we close the tab and the source is still
120 // being used in DoDragDrop at the time that the virtual file is being 121 // being used in DoDragDrop at the time that the virtual file is being
121 // downloaded. 122 // downloaded.
122 render_view_host_ = NULL; 123 render_view_host_ = NULL;
123 } 124 }
124 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents_unittest.cc ('k') | chrome/browser/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698