OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // OS_WIN | 10 #endif // OS_WIN |
(...skipping 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2962 /////////////////////////////////////////////////////////////////////////////// | 2962 /////////////////////////////////////////////////////////////////////////////// |
2963 // Browser, PageNavigator implementation: | 2963 // Browser, PageNavigator implementation: |
2964 | 2964 |
2965 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 2965 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
2966 TabContents* Browser::OpenURL(const GURL& url, | 2966 TabContents* Browser::OpenURL(const GURL& url, |
2967 const GURL& referrer, | 2967 const GURL& referrer, |
2968 WindowOpenDisposition disposition, | 2968 WindowOpenDisposition disposition, |
2969 content::PageTransition transition) { | 2969 content::PageTransition transition) { |
2970 // For specifying a referrer, use the version of OpenURL taking OpenURLParams. | 2970 // For specifying a referrer, use the version of OpenURL taking OpenURLParams. |
2971 DCHECK(referrer.is_empty()); | 2971 DCHECK(referrer.is_empty()); |
2972 return OpenURLFromTab(NULL, | 2972 return OpenURLFromTab(NULL, OpenURLParams(url, referrer, disposition, |
2973 OpenURLParams(url, referrer, disposition, transition, | 2973 transition, false)); |
2974 false)); | |
2975 } | 2974 } |
2976 | 2975 |
2977 TabContents* Browser::OpenURL(const OpenURLParams& params) { | 2976 TabContents* Browser::OpenURL(const OpenURLParams& params) { |
2978 return OpenURLFromTab(NULL, params); | 2977 return OpenURLFromTab(NULL, params); |
2979 } | 2978 } |
2980 | 2979 |
2981 /////////////////////////////////////////////////////////////////////////////// | 2980 /////////////////////////////////////////////////////////////////////////////// |
2982 // Browser, CommandUpdater::CommandUpdaterDelegate implementation: | 2981 // Browser, CommandUpdater::CommandUpdaterDelegate implementation: |
2983 | 2982 |
2984 void Browser::ExecuteCommand(int id) { | 2983 void Browser::ExecuteCommand(int id) { |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3382 nav_params.source_contents = | 3381 nav_params.source_contents = |
3383 tabstrip_model()->GetTabContentsAt( | 3382 tabstrip_model()->GetTabContentsAt( |
3384 tabstrip_model()->GetWrapperIndex(source)); | 3383 tabstrip_model()->GetWrapperIndex(source)); |
3385 nav_params.referrer = params.referrer; | 3384 nav_params.referrer = params.referrer; |
3386 nav_params.disposition = params.disposition; | 3385 nav_params.disposition = params.disposition; |
3387 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; | 3386 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; |
3388 nav_params.window_action = browser::NavigateParams::SHOW_WINDOW; | 3387 nav_params.window_action = browser::NavigateParams::SHOW_WINDOW; |
3389 nav_params.user_gesture = true; | 3388 nav_params.user_gesture = true; |
3390 nav_params.override_encoding = params.override_encoding; | 3389 nav_params.override_encoding = params.override_encoding; |
3391 nav_params.is_renderer_initiated = params.is_renderer_initiated; | 3390 nav_params.is_renderer_initiated = params.is_renderer_initiated; |
| 3391 nav_params.transferred_global_request_id = |
| 3392 params.transferred_global_request_id; |
3392 browser::Navigate(&nav_params); | 3393 browser::Navigate(&nav_params); |
3393 | 3394 |
3394 return nav_params.target_contents ? | 3395 return nav_params.target_contents ? |
3395 nav_params.target_contents->tab_contents() : NULL; | 3396 nav_params.target_contents->tab_contents() : NULL; |
3396 } | 3397 } |
3397 | 3398 |
3398 void Browser::NavigationStateChanged(const TabContents* source, | 3399 void Browser::NavigationStateChanged(const TabContents* source, |
3399 unsigned changed_flags) { | 3400 unsigned changed_flags) { |
3400 // Only update the UI when something visible has changed. | 3401 // Only update the UI when something visible has changed. |
3401 if (changed_flags) | 3402 if (changed_flags) |
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5318 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5319 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5319 } else { | 5320 } else { |
5320 GlobalErrorService* service = | 5321 GlobalErrorService* service = |
5321 GlobalErrorServiceFactory::GetForProfile(profile()); | 5322 GlobalErrorServiceFactory::GetForProfile(profile()); |
5322 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5323 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5323 if (error) { | 5324 if (error) { |
5324 error->ShowBubbleView(this); | 5325 error->ShowBubbleView(this); |
5325 } | 5326 } |
5326 } | 5327 } |
5327 } | 5328 } |
OLD | NEW |