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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void WebContentsViewWin::StoreFocus() { | 186 void WebContentsViewWin::StoreFocus() { |
187 if (delegate_) | 187 if (delegate_) |
188 delegate_->StoreFocus(); | 188 delegate_->StoreFocus(); |
189 } | 189 } |
190 | 190 |
191 void WebContentsViewWin::RestoreFocus() { | 191 void WebContentsViewWin::RestoreFocus() { |
192 if (delegate_) | 192 if (delegate_) |
193 delegate_->RestoreFocus(); | 193 delegate_->RestoreFocus(); |
194 } | 194 } |
195 | 195 |
196 WebDropData* WebContentsViewWin::GetDropData() const { | 196 DropData* WebContentsViewWin::GetDropData() const { |
197 return drag_dest_->current_drop_data(); | 197 return drag_dest_->current_drop_data(); |
198 } | 198 } |
199 | 199 |
200 gfx::Rect WebContentsViewWin::GetViewBounds() const { | 200 gfx::Rect WebContentsViewWin::GetViewBounds() const { |
201 RECT r; | 201 RECT r; |
202 GetWindowRect(hwnd(), &r); | 202 GetWindowRect(hwnd(), &r); |
203 return gfx::Rect(r); | 203 return gfx::Rect(r); |
204 } | 204 } |
205 | 205 |
206 RenderWidgetHostView* WebContentsViewWin::CreateViewForWidget( | 206 RenderWidgetHostView* WebContentsViewWin::CreateViewForWidget( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 int item_height, | 252 int item_height, |
253 double item_font_size, | 253 double item_font_size, |
254 int selected_item, | 254 int selected_item, |
255 const std::vector<WebMenuItem>& items, | 255 const std::vector<WebMenuItem>& items, |
256 bool right_aligned, | 256 bool right_aligned, |
257 bool allow_multiple_selection) { | 257 bool allow_multiple_selection) { |
258 // External popup menus are only used on Mac and Android. | 258 // External popup menus are only used on Mac and Android. |
259 NOTIMPLEMENTED(); | 259 NOTIMPLEMENTED(); |
260 } | 260 } |
261 | 261 |
262 void WebContentsViewWin::StartDragging(const WebDropData& drop_data, | 262 void WebContentsViewWin::StartDragging(const DropData& drop_data, |
263 WebKit::WebDragOperationsMask operations, | 263 WebKit::WebDragOperationsMask operations, |
264 const gfx::ImageSkia& image, | 264 const gfx::ImageSkia& image, |
265 const gfx::Vector2d& image_offset, | 265 const gfx::Vector2d& image_offset, |
266 const DragEventSourceInfo& event_info) { | 266 const DragEventSourceInfo& event_info) { |
267 drag_handler_ = new WebContentsDragWin( | 267 drag_handler_ = new WebContentsDragWin( |
268 GetNativeView(), | 268 GetNativeView(), |
269 web_contents_, | 269 web_contents_, |
270 drag_dest_, | 270 drag_dest_, |
271 base::Bind(&WebContentsViewWin::EndDragging, base::Unretained(this))); | 271 base::Bind(&WebContentsViewWin::EndDragging, base::Unretained(this))); |
272 drag_handler_->StartDragging(drop_data, operations, image, image_offset); | 272 drag_handler_->StartDragging(drop_data, operations, image, image_offset); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 si.nPage = 10; | 455 si.nPage = 10; |
456 si.nPos = 50; | 456 si.nPos = 50; |
457 | 457 |
458 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 458 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
459 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 459 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
460 | 460 |
461 return 1; | 461 return 1; |
462 } | 462 } |
463 | 463 |
464 } // namespace content | 464 } // namespace content |
OLD | NEW |