| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr())); | 1120 FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr())); |
| 1121 | 1121 |
| 1122 // Instant may have visible WebContents that need to be detached before the | 1122 // Instant may have visible WebContents that need to be detached before the |
| 1123 // window system closes. | 1123 // window system closes. |
| 1124 instant_controller_.reset(); | 1124 instant_controller_.reset(); |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 bool Browser::CanOverscrollContent() const { | 1127 bool Browser::CanOverscrollContent() const { |
| 1128 #if defined(USE_AURA) | 1128 #if defined(USE_AURA) |
| 1129 bool overscroll_enabled = CommandLine::ForCurrentProcess()-> | 1129 bool overscroll_enabled = CommandLine::ForCurrentProcess()-> |
| 1130 GetSwitchValueASCII(switches::kOverscrollHistoryNavigation) != "0"; | 1130 GetSwitchValueASCII(switches::kOverscrollHistoryNavigation) == "1"; |
| 1131 if (!overscroll_enabled) | 1131 if (!overscroll_enabled) |
| 1132 return false; | 1132 return false; |
| 1133 if (is_app() || is_devtools() || !is_type_tabbed()) | 1133 if (is_app() || is_devtools() || !is_type_tabbed()) |
| 1134 return false; | 1134 return false; |
| 1135 | 1135 |
| 1136 // The detached bookmark bar has appearance of floating above the | 1136 // The detached bookmark bar has appearance of floating above the |
| 1137 // web-contents. This does not play nicely with overscroll navigation | 1137 // web-contents. This does not play nicely with overscroll navigation |
| 1138 // gestures. So disable overscroll navigation when the bookmark bar is in the | 1138 // gestures. So disable overscroll navigation when the bookmark bar is in the |
| 1139 // detached state. | 1139 // detached state. |
| 1140 if (bookmark_bar_state_ == BookmarkBar::DETACHED) | 1140 if (bookmark_bar_state_ == BookmarkBar::DETACHED) |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 if (contents && !allow_js_access) { | 2208 if (contents && !allow_js_access) { |
| 2209 contents->web_contents()->GetController().LoadURL( | 2209 contents->web_contents()->GetController().LoadURL( |
| 2210 target_url, | 2210 target_url, |
| 2211 content::Referrer(), | 2211 content::Referrer(), |
| 2212 content::PAGE_TRANSITION_LINK, | 2212 content::PAGE_TRANSITION_LINK, |
| 2213 std::string()); // No extra headers. | 2213 std::string()); // No extra headers. |
| 2214 } | 2214 } |
| 2215 | 2215 |
| 2216 return contents != NULL; | 2216 return contents != NULL; |
| 2217 } | 2217 } |
| OLD | NEW |