| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 content::ContextMenuSourceType type) { |
| 269 if (delegate_.get()) | 269 if (delegate_.get()) |
| 270 delegate_->ShowContextMenu(params, type); | 270 delegate_->ShowContextMenu(params, type); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, | 273 void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, |
| 274 int item_height, | 274 int item_height, |
| 275 double item_font_size, | 275 double item_font_size, |
| 276 int selected_item, | 276 int selected_item, |
| 277 const std::vector<WebMenuItem>& items, | 277 const std::vector<WebMenuItem>& items, |
| 278 bool right_aligned, | 278 bool right_aligned, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 si.nMin = 1; | 488 si.nMin = 1; |
| 489 si.nMax = 100; | 489 si.nMax = 100; |
| 490 si.nPage = 10; | 490 si.nPage = 10; |
| 491 si.nPos = 50; | 491 si.nPos = 50; |
| 492 | 492 |
| 493 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 493 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
| 494 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 494 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
| 495 | 495 |
| 496 return 1; | 496 return 1; |
| 497 } | 497 } |
| OLD | NEW |