OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 current_paint_buf_ = NULL; | 87 current_paint_buf_ = NULL; |
88 } | 88 } |
89 RenderProcess::current()->ReleaseProcess(); | 89 RenderProcess::current()->ReleaseProcess(); |
90 } | 90 } |
91 | 91 |
92 // static | 92 // static |
93 RenderWidget* RenderWidget::Create(int32 opener_id, | 93 RenderWidget* RenderWidget::Create(int32 opener_id, |
94 RenderThreadBase* render_thread, | 94 RenderThreadBase* render_thread, |
95 WebKit::WebPopupType popup_type) { | 95 WebKit::WebPopupType popup_type) { |
96 DCHECK(opener_id != MSG_ROUTING_NONE); | 96 DCHECK(opener_id != MSG_ROUTING_NONE); |
97 scoped_refptr<RenderWidget> widget = new RenderWidget(render_thread, | 97 scoped_refptr<RenderWidget> widget(new RenderWidget(render_thread, |
98 popup_type); | 98 popup_type)); |
99 widget->Init(opener_id); // adds reference | 99 widget->Init(opener_id); // adds reference |
100 return widget; | 100 return widget; |
101 } | 101 } |
102 | 102 |
103 // static | 103 // static |
104 WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) { | 104 WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) { |
105 switch (render_widget->popup_type_) { | 105 switch (render_widget->popup_type_) { |
106 case WebKit::WebPopupTypeNone: // Nothing to create. | 106 case WebKit::WebPopupTypeNone: // Nothing to create. |
107 break; | 107 break; |
108 case WebKit::WebPopupTypeSelect: | 108 case WebKit::WebPopupTypeSelect: |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 | 1013 |
1014 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1014 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
1015 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1015 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
1016 i != plugin_window_moves_.end(); ++i) { | 1016 i != plugin_window_moves_.end(); ++i) { |
1017 if (i->window == window) { | 1017 if (i->window == window) { |
1018 plugin_window_moves_.erase(i); | 1018 plugin_window_moves_.erase(i); |
1019 break; | 1019 break; |
1020 } | 1020 } |
1021 } | 1021 } |
1022 } | 1022 } |
OLD | NEW |