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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 using WebKit::WebScreenInfo; | 63 using WebKit::WebScreenInfo; |
64 using WebKit::WebSize; | 64 using WebKit::WebSize; |
65 using WebKit::WebTextDirection; | 65 using WebKit::WebTextDirection; |
66 using WebKit::WebTouchEvent; | 66 using WebKit::WebTouchEvent; |
67 using WebKit::WebVector; | 67 using WebKit::WebVector; |
68 using WebKit::WebWidget; | 68 using WebKit::WebWidget; |
69 using content::RenderThread; | 69 using content::RenderThread; |
70 | 70 |
71 RenderWidget::RenderWidget(WebKit::WebPopupType popup_type) | 71 RenderWidget::RenderWidget(WebKit::WebPopupType popup_type) |
72 : routing_id_(MSG_ROUTING_NONE), | 72 : routing_id_(MSG_ROUTING_NONE), |
| 73 surface_id_(0), |
73 webwidget_(NULL), | 74 webwidget_(NULL), |
74 opener_id_(MSG_ROUTING_NONE), | 75 opener_id_(MSG_ROUTING_NONE), |
75 host_window_(0), | 76 host_window_(0), |
76 current_paint_buf_(NULL), | 77 current_paint_buf_(NULL), |
77 next_paint_flags_(0), | 78 next_paint_flags_(0), |
78 filtered_time_per_frame_(0.0f), | 79 filtered_time_per_frame_(0.0f), |
79 update_reply_pending_(false), | 80 update_reply_pending_(false), |
80 using_asynchronous_swapbuffers_(false), | 81 using_asynchronous_swapbuffers_(false), |
81 num_swapbuffers_complete_pending_(0), | 82 num_swapbuffers_complete_pending_(0), |
82 did_show_(false), | 83 did_show_(false), |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return WebPopupMenu::create(render_widget); | 135 return WebPopupMenu::create(render_widget); |
135 default: | 136 default: |
136 NOTREACHED(); | 137 NOTREACHED(); |
137 } | 138 } |
138 return NULL; | 139 return NULL; |
139 } | 140 } |
140 | 141 |
141 void RenderWidget::Init(int32 opener_id) { | 142 void RenderWidget::Init(int32 opener_id) { |
142 DoInit(opener_id, | 143 DoInit(opener_id, |
143 RenderWidget::CreateWebWidget(this), | 144 RenderWidget::CreateWebWidget(this), |
144 new ViewHostMsg_CreateWidget(opener_id, popup_type_, &routing_id_)); | 145 new ViewHostMsg_CreateWidget(opener_id, popup_type_, |
| 146 &routing_id_, &surface_id_)); |
145 } | 147 } |
146 | 148 |
147 void RenderWidget::DoInit(int32 opener_id, | 149 void RenderWidget::DoInit(int32 opener_id, |
148 WebWidget* web_widget, | 150 WebWidget* web_widget, |
149 IPC::SyncMessage* create_widget_message) { | 151 IPC::SyncMessage* create_widget_message) { |
150 DCHECK(!webwidget_); | 152 DCHECK(!webwidget_); |
151 | 153 |
152 if (opener_id != MSG_ROUTING_NONE) | 154 if (opener_id != MSG_ROUTING_NONE) |
153 opener_id_ = opener_id; | 155 opener_id_ = opener_id; |
154 | 156 |
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 } | 1564 } |
1563 } | 1565 } |
1564 | 1566 |
1565 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1567 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1566 return false; | 1568 return false; |
1567 } | 1569 } |
1568 | 1570 |
1569 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1571 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1570 return false; | 1572 return false; |
1571 } | 1573 } |
OLD | NEW |