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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 #include "extensions/common/extension.h" | 177 #include "extensions/common/extension.h" |
178 #include "extensions/common/manifest_handlers/background_info.h" | 178 #include "extensions/common/manifest_handlers/background_info.h" |
179 #include "grit/chromium_strings.h" | 179 #include "grit/chromium_strings.h" |
180 #include "grit/generated_resources.h" | 180 #include "grit/generated_resources.h" |
181 #include "grit/locale_settings.h" | 181 #include "grit/locale_settings.h" |
182 #include "grit/theme_resources.h" | 182 #include "grit/theme_resources.h" |
183 #include "net/base/net_util.h" | 183 #include "net/base/net_util.h" |
184 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 184 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
185 #include "net/cookies/cookie_monster.h" | 185 #include "net/cookies/cookie_monster.h" |
186 #include "net/url_request/url_request_context.h" | 186 #include "net/url_request/url_request_context.h" |
| 187 #include "third_party/WebKit/public/web/WebInputEvent.h" |
187 #include "third_party/WebKit/public/web/WebWindowFeatures.h" | 188 #include "third_party/WebKit/public/web/WebWindowFeatures.h" |
188 #include "ui/base/l10n/l10n_util.h" | 189 #include "ui/base/l10n/l10n_util.h" |
189 #include "ui/base/window_open_disposition.h" | 190 #include "ui/base/window_open_disposition.h" |
190 #include "ui/gfx/point.h" | 191 #include "ui/gfx/point.h" |
191 #include "ui/shell_dialogs/selected_file_info.h" | 192 #include "ui/shell_dialogs/selected_file_info.h" |
192 | 193 |
193 #if defined(OS_WIN) | 194 #if defined(OS_WIN) |
194 #include "base/win/metro.h" | 195 #include "base/win/metro.h" |
195 #include "chrome/browser/ssl/ssl_error_info.h" | 196 #include "chrome/browser/ssl/ssl_error_info.h" |
196 #include "chrome/browser/task_manager/task_manager.h" | 197 #include "chrome/browser/task_manager/task_manager.h" |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 return true; | 1135 return true; |
1135 } | 1136 } |
1136 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); | 1137 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
1137 } | 1138 } |
1138 | 1139 |
1139 void Browser::HandleKeyboardEvent(content::WebContents* source, | 1140 void Browser::HandleKeyboardEvent(content::WebContents* source, |
1140 const NativeWebKeyboardEvent& event) { | 1141 const NativeWebKeyboardEvent& event) { |
1141 window()->HandleKeyboardEvent(event); | 1142 window()->HandleKeyboardEvent(event); |
1142 } | 1143 } |
1143 | 1144 |
| 1145 bool Browser::PreHandleGestureEvent(content::WebContents* source, |
| 1146 const blink::WebGestureEvent& event) { |
| 1147 // Send all events |
| 1148 return false; |
| 1149 } |
| 1150 |
1144 bool Browser::TabsNeedBeforeUnloadFired() { | 1151 bool Browser::TabsNeedBeforeUnloadFired() { |
1145 if (IsFastTabUnloadEnabled()) | 1152 if (IsFastTabUnloadEnabled()) |
1146 return fast_unload_controller_->TabsNeedBeforeUnloadFired(); | 1153 return fast_unload_controller_->TabsNeedBeforeUnloadFired(); |
1147 return unload_controller_->TabsNeedBeforeUnloadFired(); | 1154 return unload_controller_->TabsNeedBeforeUnloadFired(); |
1148 } | 1155 } |
1149 | 1156 |
1150 void Browser::OverscrollUpdate(int delta_y) { | 1157 void Browser::OverscrollUpdate(int delta_y) { |
1151 window_->OverscrollUpdate(delta_y); | 1158 window_->OverscrollUpdate(delta_y); |
1152 } | 1159 } |
1153 | 1160 |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 if (contents && !allow_js_access) { | 2301 if (contents && !allow_js_access) { |
2295 contents->web_contents()->GetController().LoadURL( | 2302 contents->web_contents()->GetController().LoadURL( |
2296 target_url, | 2303 target_url, |
2297 content::Referrer(), | 2304 content::Referrer(), |
2298 content::PAGE_TRANSITION_LINK, | 2305 content::PAGE_TRANSITION_LINK, |
2299 std::string()); // No extra headers. | 2306 std::string()); // No extra headers. |
2300 } | 2307 } |
2301 | 2308 |
2302 return contents != NULL; | 2309 return contents != NULL; |
2303 } | 2310 } |
OLD | NEW |