| OLD | NEW |
| 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/views/tabs/dragged_tab_controller.h" | 5 #include "chrome/browser/views/tabs/dragged_tab_controller.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| 11 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 11 #include "chrome/browser/tab_contents/tab_contents.h" | 12 #include "chrome/browser/tab_contents/tab_contents.h" |
| 12 #include "chrome/browser/metrics/user_metrics.h" | 13 #include "chrome/browser/metrics/user_metrics.h" |
| 13 #include "chrome/browser/views/frame/browser_view.h" | 14 #include "chrome/browser/views/frame/browser_view.h" |
| 14 #include "chrome/browser/views/tabs/dragged_tab_view.h" | 15 #include "chrome/browser/views/tabs/dragged_tab_view.h" |
| 15 #include "chrome/browser/views/tabs/hwnd_photobooth.h" | 16 #include "chrome/browser/views/tabs/hwnd_photobooth.h" |
| 16 #include "chrome/browser/views/tabs/tab.h" | 17 #include "chrome/browser/views/tabs/tab.h" |
| 17 #include "chrome/browser/views/tabs/tab_strip.h" | 18 #include "chrome/browser/views/tabs/tab_strip.h" |
| 18 #include "chrome/browser/tab_contents/web_contents.h" | 19 #include "chrome/browser/tab_contents/web_contents.h" |
| 19 #include "chrome/common/animation.h" | 20 #include "chrome/common/animation.h" |
| 20 #include "chrome/common/gfx/chrome_canvas.h" | 21 #include "chrome/common/gfx/chrome_canvas.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 void DraggedTabController::URLStarredChanged(TabContents* source, | 390 void DraggedTabController::URLStarredChanged(TabContents* source, |
| 390 bool starred) { | 391 bool starred) { |
| 391 // Ignored. | 392 // Ignored. |
| 392 } | 393 } |
| 393 | 394 |
| 394 void DraggedTabController::UpdateTargetURL(TabContents* source, | 395 void DraggedTabController::UpdateTargetURL(TabContents* source, |
| 395 const GURL& url) { | 396 const GURL& url) { |
| 396 // Ignored. | 397 // Ignored. |
| 397 } | 398 } |
| 398 | 399 |
| 400 ExtensionFunctionDispatcher* DraggedTabController:: |
| 401 CreateExtensionFunctionDispatcher(RenderViewHost* render_view_host, |
| 402 const std::string& extension_id) { |
| 403 return new ExtensionFunctionDispatcher(render_view_host, NULL, extension_id); |
| 404 } |
| 405 |
| 399 /////////////////////////////////////////////////////////////////////////////// | 406 /////////////////////////////////////////////////////////////////////////////// |
| 400 // DraggedTabController, NotificationObserver implementation: | 407 // DraggedTabController, NotificationObserver implementation: |
| 401 | 408 |
| 402 void DraggedTabController::Observe(NotificationType type, | 409 void DraggedTabController::Observe(NotificationType type, |
| 403 const NotificationSource& source, | 410 const NotificationSource& source, |
| 404 const NotificationDetails& details) { | 411 const NotificationDetails& details) { |
| 405 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); | 412 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); |
| 406 DCHECK(Source<TabContents>(source).ptr() == dragged_contents_); | 413 DCHECK(Source<TabContents>(source).ptr() == dragged_contents_); |
| 407 EndDragImpl(TAB_DESTROYED); | 414 EndDragImpl(TAB_DESTROYED); |
| 408 } | 415 } |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 // Move the window to the front. | 1143 // Move the window to the front. |
| 1137 SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, | 1144 SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, |
| 1138 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); | 1145 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); |
| 1139 | 1146 |
| 1140 // The previous call made the window appear on top of the dragged window, | 1147 // The previous call made the window appear on top of the dragged window, |
| 1141 // move the dragged window to the front. | 1148 // move the dragged window to the front. |
| 1142 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, | 1149 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, |
| 1143 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); | 1150 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); |
| 1144 } | 1151 } |
| 1145 } | 1152 } |
| OLD | NEW |