Chromium Code Reviews| 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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1317 bookmark_bar_state_ == BookmarkBar::SHOW) { | 1317 bookmark_bar_state_ == BookmarkBar::SHOW) { |
| 1318 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE); | 1318 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE); |
| 1319 } | 1319 } |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 /////////////////////////////////////////////////////////////////////////////// | 1322 /////////////////////////////////////////////////////////////////////////////// |
| 1323 // Browser, content::WebContentsDelegate implementation: | 1323 // Browser, content::WebContentsDelegate implementation: |
| 1324 | 1324 |
| 1325 WebContents* Browser::OpenURLFromTab(WebContents* source, | 1325 WebContents* Browser::OpenURLFromTab(WebContents* source, |
| 1326 const OpenURLParams& params) { | 1326 const OpenURLParams& params) { |
| 1327 // Notify instant about the navigation. This needs to happen before so that | |
| 1328 // instant can commit if required. | |
| 1329 if (instant_controller_) | |
|
sky
2012/12/07 22:01:46
Does this really do what you want? Seems like you
Shishir
2012/12/08 00:14:54
Ok I got this wrong. The change does not belong h
| |
| 1330 instant_controller_->AboutToOpenURL(source, params.url); | |
| 1331 | |
| 1327 chrome::NavigateParams nav_params(this, params.url, params.transition); | 1332 chrome::NavigateParams nav_params(this, params.url, params.transition); |
| 1328 nav_params.source_contents = source; | 1333 nav_params.source_contents = source; |
| 1329 nav_params.referrer = params.referrer; | 1334 nav_params.referrer = params.referrer; |
| 1330 nav_params.extra_headers = params.extra_headers; | 1335 nav_params.extra_headers = params.extra_headers; |
| 1331 nav_params.disposition = params.disposition; | 1336 nav_params.disposition = params.disposition; |
| 1332 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; | 1337 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; |
| 1333 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 1338 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 1334 nav_params.user_gesture = true; | 1339 nav_params.user_gesture = true; |
| 1335 nav_params.override_encoding = params.override_encoding; | 1340 nav_params.override_encoding = params.override_encoding; |
| 1336 nav_params.is_renderer_initiated = params.is_renderer_initiated; | 1341 nav_params.is_renderer_initiated = params.is_renderer_initiated; |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2408 if (contents && !allow_js_access) { | 2413 if (contents && !allow_js_access) { |
| 2409 contents->web_contents()->GetController().LoadURL( | 2414 contents->web_contents()->GetController().LoadURL( |
| 2410 target_url, | 2415 target_url, |
| 2411 content::Referrer(), | 2416 content::Referrer(), |
| 2412 content::PAGE_TRANSITION_LINK, | 2417 content::PAGE_TRANSITION_LINK, |
| 2413 std::string()); // No extra headers. | 2418 std::string()); // No extra headers. |
| 2414 } | 2419 } |
| 2415 | 2420 |
| 2416 return contents != NULL; | 2421 return contents != NULL; |
| 2417 } | 2422 } |
| OLD | NEW |