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

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

Issue 4815001: Use inner HWND for accelerated rendering on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 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/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 for (int i = 0; i < infobar_delegate_count(); ++i) { 479 for (int i = 0; i < infobar_delegate_count(); ++i) {
480 InfoBarDelegate* delegate = GetInfoBarDelegateAt(i); 480 InfoBarDelegate* delegate = GetInfoBarDelegateAt(i);
481 delegate->InfoBarClosed(); 481 delegate->InfoBarClosed();
482 } 482 }
483 infobar_delegates_.clear(); 483 infobar_delegates_.clear();
484 484
485 // TODO(brettw) this should be moved to the view. 485 // TODO(brettw) this should be moved to the view.
486 #if defined(OS_WIN) 486 #if defined(OS_WIN)
487 // If we still have a window handle, destroy it. GetNativeView can return 487 // If we still have a window handle, destroy it. GetNativeView can return
488 // NULL if this contents was part of a window that closed. 488 // NULL if this contents was part of a window that closed.
489 if (GetNativeView()) 489 if (GetNativeView()) {
490 RenderViewHost* host = render_view_host();
491 if (host && host->view()) {
492 host->view()->WillWmDestroy();
493 }
490 ::DestroyWindow(GetNativeView()); 494 ::DestroyWindow(GetNativeView());
495 }
491 #endif 496 #endif
492 497
493 // OnCloseStarted isn't called in unit tests. 498 // OnCloseStarted isn't called in unit tests.
494 if (!tab_close_start_time_.is_null()) { 499 if (!tab_close_start_time_.is_null()) {
495 UMA_HISTOGRAM_TIMES("Tab.Close", 500 UMA_HISTOGRAM_TIMES("Tab.Close",
496 base::TimeTicks::Now() - tab_close_start_time_); 501 base::TimeTicks::Now() - tab_close_start_time_);
497 } 502 }
498 } 503 }
499 504
500 // static 505 // static
(...skipping 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after
3216 } 3221 }
3217 3222
3218 void TabContents::set_encoding(const std::string& encoding) { 3223 void TabContents::set_encoding(const std::string& encoding) {
3219 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3224 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3220 } 3225 }
3221 3226
3222 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3227 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3223 app_icon_ = app_icon; 3228 app_icon_ = app_icon;
3224 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3229 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3225 } 3230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698