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

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

Issue 1082313002: Fixing a typo which caused OverscrollNavigationOverlay to be created even when disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed missing {} Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 939
940 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) { 940 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) {
941 RenderWidgetHostViewAura* view = 941 RenderWidgetHostViewAura* view =
942 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView()); 942 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
943 if (view) { 943 if (view) {
944 view->SetOverscrollControllerEnabled(enabled); 944 view->SetOverscrollControllerEnabled(enabled);
945 if (enabled) 945 if (enabled)
946 InstallOverscrollControllerDelegate(view); 946 InstallOverscrollControllerDelegate(view);
947 } 947 }
948 948
949 if (!enabled) 949 if (!enabled) {
950 navigation_overlay_.reset(); 950 navigation_overlay_.reset();
951 if (!navigation_overlay_) { 951 } else if (!navigation_overlay_) {
952 navigation_overlay_.reset( 952 navigation_overlay_.reset(
953 new OverscrollNavigationOverlay(web_contents_, window_.get())); 953 new OverscrollNavigationOverlay(web_contents_, window_.get()));
954 } 954 }
955 } 955 }
956 956
957 //////////////////////////////////////////////////////////////////////////////// 957 ////////////////////////////////////////////////////////////////////////////////
958 // WebContentsViewAura, RenderViewHostDelegateView implementation: 958 // WebContentsViewAura, RenderViewHostDelegateView implementation:
959 959
960 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, 960 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host,
961 const ContextMenuParams& params) { 961 const ContextMenuParams& params) {
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 if (visible) { 1344 if (visible) {
1345 if (!web_contents_->should_normally_be_visible()) 1345 if (!web_contents_->should_normally_be_visible())
1346 web_contents_->WasShown(); 1346 web_contents_->WasShown();
1347 } else { 1347 } else {
1348 if (web_contents_->should_normally_be_visible()) 1348 if (web_contents_->should_normally_be_visible())
1349 web_contents_->WasHidden(); 1349 web_contents_->WasHidden();
1350 } 1350 }
1351 } 1351 }
1352 1352
1353 } // namespace content 1353 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698