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

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 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 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 } 3240 }
3236 3241
3237 void TabContents::set_encoding(const std::string& encoding) { 3242 void TabContents::set_encoding(const std::string& encoding) {
3238 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3243 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3239 } 3244 }
3240 3245
3241 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3246 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3242 app_icon_ = app_icon; 3247 app_icon_ = app_icon;
3243 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3248 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3244 } 3249 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/test/test_render_view_host.cc ('k') | chrome/common/gpu_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698