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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 DCHECK(routing_id_ != MSG_ROUTING_NONE); | 1364 DCHECK(routing_id_ != MSG_ROUTING_NONE); |
1365 DCHECK(!show_callback_.is_null()); | 1365 DCHECK(!show_callback_.is_null()); |
1366 | 1366 |
1367 if (did_show_) | 1367 if (did_show_) |
1368 return; | 1368 return; |
1369 | 1369 |
1370 did_show_ = true; | 1370 did_show_ = true; |
1371 | 1371 |
1372 // The opener is responsible for actually showing this widget. | 1372 // The opener is responsible for actually showing this widget. |
1373 show_callback_.Run(this, policy, initial_rect_); | 1373 show_callback_.Run(this, policy, initial_rect_); |
| 1374 show_callback_.Reset(); |
1374 | 1375 |
1375 // NOTE: initial_rect_ may still have its default values at this point, but | 1376 // NOTE: initial_rect_ may still have its default values at this point, but |
1376 // that's okay. It'll be ignored if as_popup is false, or the browser | 1377 // that's okay. It'll be ignored if as_popup is false, or the browser |
1377 // process will impose a default position otherwise. | 1378 // process will impose a default position otherwise. |
1378 SetPendingWindowRect(initial_rect_); | 1379 SetPendingWindowRect(initial_rect_); |
1379 } | 1380 } |
1380 | 1381 |
1381 void RenderWidget::DoDeferredClose() { | 1382 void RenderWidget::DoDeferredClose() { |
1382 WillCloseLayerTreeView(); | 1383 WillCloseLayerTreeView(); |
1383 Send(new ViewHostMsg_Close(routing_id_)); | 1384 Send(new ViewHostMsg_Close(routing_id_)); |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 blink::WebInputMethodController* RenderWidget::GetInputMethodController() | 2310 blink::WebInputMethodController* RenderWidget::GetInputMethodController() |
2310 const { | 2311 const { |
2311 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is | 2312 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is |
2312 // always a WebFrameWidget. | 2313 // always a WebFrameWidget. |
2313 CHECK(GetWebWidget()->isWebFrameWidget()); | 2314 CHECK(GetWebWidget()->isWebFrameWidget()); |
2314 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2315 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2315 ->getActiveWebInputMethodController(); | 2316 ->getActiveWebInputMethodController(); |
2316 } | 2317 } |
2317 | 2318 |
2318 } // namespace content | 2319 } // namespace content |
OLD | NEW |