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

Side by Side Diff: chrome/browser/bookmarks/bookmark_drop_info.cc

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/bookmarks/bookmark_drop_info.h" 5 #include "chrome/browser/bookmarks/bookmark_drop_info.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 BookmarkDropInfo::~BookmarkDropInfo() { 25 BookmarkDropInfo::~BookmarkDropInfo() {
26 } 26 }
27 27
28 void BookmarkDropInfo::Update(const views::DropTargetEvent& event) { 28 void BookmarkDropInfo::Update(const views::DropTargetEvent& event) {
29 source_operations_ = event.source_operations(); 29 source_operations_ = event.source_operations();
30 is_control_down_ = event.IsControlDown(); 30 is_control_down_ = event.IsControlDown();
31 last_y_ = event.y(); 31 last_y_ = event.y();
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN) && !defined(USE_AURA)
34 RECT client_rect; 34 RECT client_rect;
35 GetClientRect(wnd_, &client_rect); 35 GetClientRect(wnd_, &client_rect);
36 bool scroll_down = (last_y_ >= client_rect.bottom - views::kAutoscrollSize); 36 bool scroll_down = (last_y_ >= client_rect.bottom - views::kAutoscrollSize);
37 #else 37 #else
38 // TODO(port): Get the dimensions of the appropriate view/widget. 38 // TODO(port): Get the dimensions of the appropriate view/widget.
39 NOTIMPLEMENTED(); 39 NOTIMPLEMENTED();
40 bool scroll_down = false; 40 bool scroll_down = false;
41 #endif 41 #endif
42 scroll_up_ = (last_y_ <= top_margin_ + views::kAutoscrollSize); 42 scroll_up_ = (last_y_ <= top_margin_ + views::kAutoscrollSize);
43 if (scroll_up_ || scroll_down) { 43 if (scroll_up_ || scroll_down) {
44 if (!scroll_timer_.IsRunning()) { 44 if (!scroll_timer_.IsRunning()) {
45 scroll_timer_.Start(FROM_HERE, 45 scroll_timer_.Start(FROM_HERE,
46 base::TimeDelta::FromMilliseconds(views::kAutoscrollRowTimerMS), 46 base::TimeDelta::FromMilliseconds(views::kAutoscrollRowTimerMS),
47 this, 47 this,
48 &BookmarkDropInfo::Scroll); 48 &BookmarkDropInfo::Scroll);
49 } 49 }
50 } else { 50 } else {
51 scroll_timer_.Stop(); 51 scroll_timer_.Stop();
52 } 52 }
53 } 53 }
54 54
55 void BookmarkDropInfo::Scroll() { 55 void BookmarkDropInfo::Scroll() {
56 #if defined(OS_WIN) 56 #if defined(OS_WIN) && !defined(USE_AURA)
57 SendMessage(wnd_, WM_VSCROLL, scroll_up_ ? SB_LINEUP : SB_LINEDOWN, NULL); 57 SendMessage(wnd_, WM_VSCROLL, scroll_up_ ? SB_LINEUP : SB_LINEDOWN, NULL);
58 Scrolled(); 58 Scrolled();
59 #else 59 #else
60 // TODO(port): Scroll the appropriate view/widget. 60 // TODO(port): Scroll the appropriate view/widget.
61 NOTIMPLEMENTED(); 61 NOTIMPLEMENTED();
62 #endif 62 #endif
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698