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 "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 void WebContentsViewWin::CloseTabAfterEventTracking() { | 257 void WebContentsViewWin::CloseTabAfterEventTracking() { |
258 } | 258 } |
259 | 259 |
260 gfx::Rect WebContentsViewWin::GetViewBounds() const { | 260 gfx::Rect WebContentsViewWin::GetViewBounds() const { |
261 RECT r; | 261 RECT r; |
262 GetWindowRect(hwnd(), &r); | 262 GetWindowRect(hwnd(), &r); |
263 return gfx::Rect(r); | 263 return gfx::Rect(r); |
264 } | 264 } |
265 | 265 |
266 void WebContentsViewWin::ShowContextMenu( | 266 void WebContentsViewWin::ShowContextMenu( |
267 const content::ContextMenuParams& params) { | 267 const content::ContextMenuParams& params, |
| 268 const content::ContextMenuSourceType& type) { |
268 if (delegate_.get()) | 269 if (delegate_.get()) |
269 delegate_->ShowContextMenu(params); | 270 delegate_->ShowContextMenu(params, type); |
270 } | 271 } |
271 | 272 |
272 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, | 273 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, |
273 int item_height, | 274 int item_height, |
274 double item_font_size, | 275 double item_font_size, |
275 int selected_item, | 276 int selected_item, |
276 const std::vector<WebMenuItem>& items, | 277 const std::vector<WebMenuItem>& items, |
277 bool right_aligned, | 278 bool right_aligned, |
278 bool allow_multiple_selection) { | 279 bool allow_multiple_selection) { |
279 // External popup menus are only used on Mac and Android. | 280 // External popup menus are only used on Mac and Android. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 si.nMin = 1; | 488 si.nMin = 1; |
488 si.nMax = 100; | 489 si.nMax = 100; |
489 si.nPage = 10; | 490 si.nPage = 10; |
490 si.nPos = 50; | 491 si.nPos = 50; |
491 | 492 |
492 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 493 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
493 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 494 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
494 | 495 |
495 return 1; | 496 return 1; |
496 } | 497 } |
OLD | NEW |