Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/views/extensions/extension_view.cc

Issue 220028: Create renderers for ExtensionHosts one a time to avoid blocking the UI. (Closed)
Patch Set: scoped task factory Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/extension_view_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/browser/views/extensions/extension_view.h" 5 #include "chrome/browser/views/extensions/extension_view.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/browser/renderer_host/render_widget_host_view.h" 9 #include "chrome/browser/renderer_host/render_widget_host_view.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // exist in the same z-order as constrained windows. 79 // exist in the same z-order as constrained windows.
80 RenderWidgetHostViewWin* view_win = 80 RenderWidgetHostViewWin* view_win =
81 static_cast<RenderWidgetHostViewWin*>(view); 81 static_cast<RenderWidgetHostViewWin*>(view);
82 HWND hwnd = view_win->Create(GetWidget()->GetNativeView()); 82 HWND hwnd = view_win->Create(GetWidget()->GetNativeView());
83 view_win->ShowWindow(SW_SHOW); 83 view_win->ShowWindow(SW_SHOW);
84 Attach(hwnd); 84 Attach(hwnd);
85 #else 85 #else
86 NOTIMPLEMENTED(); 86 NOTIMPLEMENTED();
87 #endif 87 #endif
88 88
89 host_->CreateRenderView(view); 89 host_->CreateRenderViewSoon(view);
90 SetVisible(false); 90 SetVisible(false);
91 91
92 if (!pending_background_.empty()) { 92 if (!pending_background_.empty()) {
93 render_view_host()->view()->SetBackground(pending_background_); 93 render_view_host()->view()->SetBackground(pending_background_);
94 pending_background_.reset(); 94 pending_background_.reset();
95 } 95 }
96 } 96 }
97 97
98 void ExtensionView::ShowIfCompletelyLoaded() { 98 void ExtensionView::ShowIfCompletelyLoaded() {
99 // We wait to show the ExtensionView until it has loaded, our parent has 99 // We wait to show the ExtensionView until it has loaded, our parent has
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void ExtensionView::HandleMouseEvent() { 148 void ExtensionView::HandleMouseEvent() {
149 if (container_) 149 if (container_)
150 container_->OnExtensionMouseEvent(this); 150 container_->OnExtensionMouseEvent(this);
151 } 151 }
152 152
153 void ExtensionView::HandleMouseLeave() { 153 void ExtensionView::HandleMouseLeave() {
154 if (container_) 154 if (container_)
155 container_->OnExtensionMouseLeave(this); 155 container_->OnExtensionMouseLeave(this);
156 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/extension_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698