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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 7574002: Be able to print items that do window.print(); window.close() (airline tix e.g.) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 render_manager_.Init(browser_context, site_instance, routing_id); 201 render_manager_.Init(browser_context, site_instance, routing_id);
202 202
203 // We have the initial size of the view be based on the size of the passed in 203 // We have the initial size of the view be based on the size of the passed in
204 // tab contents (normally a tab from the same window). 204 // tab contents (normally a tab from the same window).
205 view_->CreateView(base_tab_contents ? 205 view_->CreateView(base_tab_contents ?
206 base_tab_contents->view()->GetContainerSize() : gfx::Size()); 206 base_tab_contents->view()->GetContainerSize() : gfx::Size());
207 } 207 }
208 208
209 TabContents::~TabContents() { 209 TabContents::~TabContents() {
210 DLOG(ERROR) << "~TabContents(" << (void*)this << ')';
211
210 is_being_destroyed_ = true; 212 is_being_destroyed_ = true;
211 213
212 // Clear out any JavaScript state. 214 // Clear out any JavaScript state.
213 if (delegate_) 215 if (delegate_)
214 delegate_->GetJavaScriptDialogCreator()->ResetJavaScriptState(this); 216 delegate_->GetJavaScriptDialogCreator()->ResetJavaScriptState(this);
215 217
216 NotifyDisconnected(); 218 NotifyDisconnected();
217 219
218 // First cleanly close all child windows. 220 // First cleanly close all child windows.
219 // TODO(mpcomplete): handle case if MaybeCloseChildWindows() already asked 221 // TODO(mpcomplete): handle case if MaybeCloseChildWindows() already asked
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 } 1922 }
1921 1923
1922 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1924 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1923 render_manager_.SwapInRenderViewHost(rvh); 1925 render_manager_.SwapInRenderViewHost(rvh);
1924 } 1926 }
1925 1927
1926 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1928 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1927 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1929 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1928 rwh_view->SetSize(view()->GetContainerSize()); 1930 rwh_view->SetSize(view()->GetContainerSize());
1929 } 1931 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698