| 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/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 // it immediately. The GPU process has a grace period to stop accessing the | 570 // it immediately. The GPU process has a grace period to stop accessing the |
| 571 // window. TODO(apatrick): the GPU process should acknowledge that it has | 571 // window. TODO(apatrick): the GPU process should acknowledge that it has |
| 572 // finished with the window handle and the browser process should destroy it | 572 // finished with the window handle and the browser process should destroy it |
| 573 // at that point. | 573 // at that point. |
| 574 ::ShowWindow(compositor_host_window_, SW_HIDE); | 574 ::ShowWindow(compositor_host_window_, SW_HIDE); |
| 575 ::SetParent(compositor_host_window_, NULL); | 575 ::SetParent(compositor_host_window_, NULL); |
| 576 | 576 |
| 577 BrowserThread::PostDelayedTask( | 577 BrowserThread::PostDelayedTask( |
| 578 BrowserThread::UI, | 578 BrowserThread::UI, |
| 579 FROM_HERE, | 579 FROM_HERE, |
| 580 base::IgnoreReturn<BOOL>( | 580 base::Bind(base::IgnoreResult(&::DestroyWindow), |
| 581 base::Bind(&::DestroyWindow, compositor_host_window_)), | 581 compositor_host_window_), |
| 582 kDestroyCompositorHostWindowDelay); | 582 kDestroyCompositorHostWindowDelay); |
| 583 | 583 |
| 584 compositor_host_window_ = NULL; | 584 compositor_host_window_ = NULL; |
| 585 } | 585 } |
| 586 | 586 |
| 587 bool RenderWidgetHostViewWin::IsActivatable() const { | 587 bool RenderWidgetHostViewWin::IsActivatable() const { |
| 588 // Popups should not be activated. | 588 // Popups should not be activated. |
| 589 return popup_type_ == WebKit::WebPopupTypeNone; | 589 return popup_type_ == WebKit::WebPopupTypeNone; |
| 590 } | 590 } |
| 591 | 591 |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 } | 2497 } |
| 2498 | 2498 |
| 2499 //////////////////////////////////////////////////////////////////////////////// | 2499 //////////////////////////////////////////////////////////////////////////////// |
| 2500 // RenderWidgetHostView, public: | 2500 // RenderWidgetHostView, public: |
| 2501 | 2501 |
| 2502 // static | 2502 // static |
| 2503 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( | 2503 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( |
| 2504 RenderWidgetHost* widget) { | 2504 RenderWidgetHost* widget) { |
| 2505 return new RenderWidgetHostViewWin(widget); | 2505 return new RenderWidgetHostViewWin(widget); |
| 2506 } | 2506 } |
| OLD | NEW |