| 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/renderer/render_widget.h" | 5 #include "chrome/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/gfx/point.h" | 7 #include "base/gfx/point.h" |
| 8 #include "base/gfx/size.h" | 8 #include "base/gfx/size.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/common/render_messages.h" | 13 #include "chrome/common/render_messages.h" |
| 14 #include "chrome/common/transport_dib.h" | 14 #include "chrome/common/transport_dib.h" |
| 15 #include "chrome/renderer/render_process.h" | 15 #include "chrome/renderer/render_process.h" |
| 16 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
| 17 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" |
| 17 | 18 |
| 18 #if defined(OS_POSIX) | 19 #if defined(OS_POSIX) |
| 19 #include "skia/include/SkPixelRef.h" | 20 #include "skia/include/SkPixelRef.h" |
| 20 #include "skia/include/SkMallocPixelRef.h" | 21 #include "skia/include/SkMallocPixelRef.h" |
| 21 #endif // defined(OS_POSIX) | 22 #endif // defined(OS_POSIX) |
| 22 | 23 |
| 23 #include "webkit/glue/webtextdirection.h" | 24 #include "webkit/glue/webtextdirection.h" |
| 24 #include "webkit/glue/webwidget.h" | 25 #include "webkit/glue/webwidget.h" |
| 25 | 26 |
| 26 using WebKit::WebInputEvent; | 27 using WebKit::WebInputEvent; |
| 28 using WebKit::WebScreenInfo; |
| 27 | 29 |
| 28 RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) | 30 RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) |
| 29 : routing_id_(MSG_ROUTING_NONE), | 31 : routing_id_(MSG_ROUTING_NONE), |
| 30 webwidget_(NULL), | 32 webwidget_(NULL), |
| 31 opener_id_(MSG_ROUTING_NONE), | 33 opener_id_(MSG_ROUTING_NONE), |
| 32 render_thread_(render_thread), | 34 render_thread_(render_thread), |
| 33 host_window_(NULL), | 35 host_window_(NULL), |
| 34 current_paint_buf_(NULL), | 36 current_paint_buf_(NULL), |
| 35 current_scroll_buf_(NULL), | 37 current_scroll_buf_(NULL), |
| 36 next_paint_flags_(0), | 38 next_paint_flags_(0), |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 for (; i < plugin_window_moves_.size(); ++i) { | 760 for (; i < plugin_window_moves_.size(); ++i) { |
| 759 if (plugin_window_moves_[i].window == move.window) { | 761 if (plugin_window_moves_[i].window == move.window) { |
| 760 plugin_window_moves_[i] = move; | 762 plugin_window_moves_[i] = move; |
| 761 break; | 763 break; |
| 762 } | 764 } |
| 763 } | 765 } |
| 764 | 766 |
| 765 if (i == plugin_window_moves_.size()) | 767 if (i == plugin_window_moves_.size()) |
| 766 plugin_window_moves_.push_back(move); | 768 plugin_window_moves_.push_back(move); |
| 767 } | 769 } |
| 770 |
| 771 WebScreenInfo RenderWidget::GetScreenInfo(WebWidget* webwidget) { |
| 772 WebScreenInfo results; |
| 773 RenderThread::current()->Send( |
| 774 new ViewHostMsg_GetScreenInfo(host_window_, &results)); |
| 775 return results; |
| 776 } |
| OLD | NEW |