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

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

Issue 3174030: Making window.focus()/blur() work only when there is a user gesture. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 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
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 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 NotificationType::TAB_CONTENTS_HIDDEN, 808 NotificationType::TAB_CONTENTS_HIDDEN,
809 Source<TabContents>(this), 809 Source<TabContents>(this),
810 NotificationService::NoDetails()); 810 NotificationService::NoDetails());
811 } 811 }
812 812
813 void TabContents::Activate() { 813 void TabContents::Activate() {
814 if (delegate_) 814 if (delegate_)
815 delegate_->ActivateContents(this); 815 delegate_->ActivateContents(this);
816 } 816 }
817 817
818 void TabContents::Deactivate() {
819 if (delegate_)
820 delegate_->DeactivateContents(this);
821 }
822
818 void TabContents::ShowContents() { 823 void TabContents::ShowContents() {
819 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); 824 RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
820 if (rwhv) 825 if (rwhv)
821 rwhv->DidBecomeSelected(); 826 rwhv->DidBecomeSelected();
822 } 827 }
823 828
824 void TabContents::HideContents() { 829 void TabContents::HideContents() {
825 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call 830 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call
826 // our superclass HideContents(), because some callers want to be very picky 831 // our superclass HideContents(), because some callers want to be very picky
827 // about the order in which these get called. In addition to making the code 832 // about the order in which these get called. In addition to making the code
(...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3275 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3271 } 3276 }
3272 3277
3273 Profile* TabContents::GetProfileForPasswordManager() { 3278 Profile* TabContents::GetProfileForPasswordManager() {
3274 return profile(); 3279 return profile();
3275 } 3280 }
3276 3281
3277 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3282 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3278 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3283 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3279 } 3284 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698