| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 MessageLoop::current()->PostTask( | 1153 MessageLoop::current()->PostTask( |
| 1154 FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr())); | 1154 FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr())); |
| 1155 | 1155 |
| 1156 // Instant may have visible WebContents that need to be detached before the | 1156 // Instant may have visible WebContents that need to be detached before the |
| 1157 // window system closes. | 1157 // window system closes. |
| 1158 instant_controller_.reset(); | 1158 instant_controller_.reset(); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 bool Browser::CanOverscrollContent() const { | 1161 bool Browser::CanOverscrollContent() const { |
| 1162 #if defined(USE_AURA) | 1162 #if defined(USE_AURA) |
| 1163 return true; | 1163 return !is_app() && !is_devtools() && is_type_tabbed(); |
| 1164 #else | 1164 #else |
| 1165 return false; | 1165 return false; |
| 1166 #endif | 1166 #endif |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 bool Browser::PreHandleKeyboardEvent(content::WebContents* source, | 1169 bool Browser::PreHandleKeyboardEvent(content::WebContents* source, |
| 1170 const NativeWebKeyboardEvent& event, | 1170 const NativeWebKeyboardEvent& event, |
| 1171 bool* is_keyboard_shortcut) { | 1171 bool* is_keyboard_shortcut) { |
| 1172 // Escape exits tabbed fullscreen mode. | 1172 // Escape exits tabbed fullscreen mode. |
| 1173 // TODO(koz): Write a test for this http://crbug.com/100441. | 1173 // TODO(koz): Write a test for this http://crbug.com/100441. |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 if (contents && !allow_js_access) { | 2332 if (contents && !allow_js_access) { |
| 2333 contents->web_contents()->GetController().LoadURL( | 2333 contents->web_contents()->GetController().LoadURL( |
| 2334 target_url, | 2334 target_url, |
| 2335 content::Referrer(), | 2335 content::Referrer(), |
| 2336 content::PAGE_TRANSITION_LINK, | 2336 content::PAGE_TRANSITION_LINK, |
| 2337 std::string()); // No extra headers. | 2337 std::string()); // No extra headers. |
| 2338 } | 2338 } |
| 2339 | 2339 |
| 2340 return contents != NULL; | 2340 return contents != NULL; |
| 2341 } | 2341 } |
| OLD | NEW |