| OLD | NEW |
| 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 "content/browser/web_contents/web_contents_view_win.h" | 5 #include "content/browser/web_contents/web_contents_view_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/renderer_host/render_view_host_factory.h" | 8 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 10 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 GetWindowRect(hwnd(), &r); | 238 GetWindowRect(hwnd(), &r); |
| 239 *out = gfx::Rect(r); | 239 *out = gfx::Rect(r); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void WebContentsViewWin::ShowContextMenu( | 242 void WebContentsViewWin::ShowContextMenu( |
| 243 const content::ContextMenuParams& params) { | 243 const content::ContextMenuParams& params) { |
| 244 if (delegate_.get()) | 244 if (delegate_.get()) |
| 245 delegate_->ShowContextMenu(params); | 245 delegate_->ShowContextMenu(params); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, |
| 249 int item_height, |
| 250 double item_font_size, |
| 251 int selected_item, |
| 252 const std::vector<WebMenuItem>& items, |
| 253 bool right_aligned, |
| 254 bool allow_multiple_selection) { |
| 255 // External popup menus are only used on Mac and Android. |
| 256 NOTIMPLEMENTED(); |
| 257 } |
| 258 |
| 248 void WebContentsViewWin::StartDragging(const WebDropData& drop_data, | 259 void WebContentsViewWin::StartDragging(const WebDropData& drop_data, |
| 249 WebKit::WebDragOperationsMask operations, | 260 WebKit::WebDragOperationsMask operations, |
| 250 const SkBitmap& image, | 261 const SkBitmap& image, |
| 251 const gfx::Point& image_offset) { | 262 const gfx::Point& image_offset) { |
| 252 drag_handler_ = new WebContentsDragWin( | 263 drag_handler_ = new WebContentsDragWin( |
| 253 GetNativeView(), | 264 GetNativeView(), |
| 254 web_contents_, | 265 web_contents_, |
| 255 drag_dest_, | 266 drag_dest_, |
| 256 base::Bind(&WebContentsViewWin::EndDragging, base::Unretained(this))); | 267 base::Bind(&WebContentsViewWin::EndDragging, base::Unretained(this))); |
| 257 drag_handler_->StartDragging(drop_data, operations, image, image_offset); | 268 drag_handler_->StartDragging(drop_data, operations, image, image_offset); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 si.nMin = 1; | 447 si.nMin = 1; |
| 437 si.nMax = 100; | 448 si.nMax = 100; |
| 438 si.nPage = 10; | 449 si.nPage = 10; |
| 439 si.nPos = 50; | 450 si.nPos = 50; |
| 440 | 451 |
| 441 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 452 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
| 442 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 453 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
| 443 | 454 |
| 444 return 1; | 455 return 1; |
| 445 } | 456 } |
| OLD | NEW |