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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 670653005: Fix Flash fullscreen focus regressions, and add interactive_ui_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove consts in ObjC code. Created 6 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1026
1027 void WebContentsViewAura::Focus() { 1027 void WebContentsViewAura::Focus() {
1028 if (web_contents_->GetInterstitialPage()) { 1028 if (web_contents_->GetInterstitialPage()) {
1029 web_contents_->GetInterstitialPage()->Focus(); 1029 web_contents_->GetInterstitialPage()->Focus();
1030 return; 1030 return;
1031 } 1031 }
1032 1032
1033 if (delegate_.get() && delegate_->Focus()) 1033 if (delegate_.get() && delegate_->Focus())
1034 return; 1034 return;
1035 1035
1036 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 1036 RenderWidgetHostView* rwhv =
1037 web_contents_->GetFullscreenRenderWidgetHostView();
1038 if (!rwhv)
1039 rwhv = web_contents_->GetRenderWidgetHostView();
1037 if (rwhv) 1040 if (rwhv)
1038 rwhv->Focus(); 1041 rwhv->Focus();
1039 } 1042 }
1040 1043
1041 void WebContentsViewAura::SetInitialFocus() { 1044 void WebContentsViewAura::SetInitialFocus() {
1042 if (web_contents_->FocusLocationBarByDefault()) 1045 if (web_contents_->FocusLocationBarByDefault())
1043 web_contents_->SetFocusToLocationBar(false); 1046 web_contents_->SetFocusToLocationBar(false);
1044 else 1047 else
1045 Focus(); 1048 Focus();
1046 } 1049 }
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 if (visible) { 1634 if (visible) {
1632 if (!web_contents_->should_normally_be_visible()) 1635 if (!web_contents_->should_normally_be_visible())
1633 web_contents_->WasShown(); 1636 web_contents_->WasShown();
1634 } else { 1637 } else {
1635 if (web_contents_->should_normally_be_visible()) 1638 if (web_contents_->should_normally_be_visible())
1636 web_contents_->WasHidden(); 1639 web_contents_->WasHidden();
1637 } 1640 }
1638 } 1641 }
1639 1642
1640 } // namespace content 1643 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698