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 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 NOTREACHED() << "moving invalid browser type"; | 1421 NOTREACHED() << "moving invalid browser type"; |
1422 return; | 1422 return; |
1423 } | 1423 } |
1424 window_->SetBounds(pos); | 1424 window_->SetBounds(pos); |
1425 } | 1425 } |
1426 | 1426 |
1427 bool Browser::IsPopupOrPanel(const WebContents* source) const { | 1427 bool Browser::IsPopupOrPanel(const WebContents* source) const { |
1428 return is_type_popup(); | 1428 return is_type_popup(); |
1429 } | 1429 } |
1430 | 1430 |
1431 void Browser::UpdateTargetURL(WebContents* source, int32 page_id, | 1431 void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { |
1432 const GURL& url) { | |
1433 if (!GetStatusBubble()) | 1432 if (!GetStatusBubble()) |
1434 return; | 1433 return; |
1435 | 1434 |
1436 if (source == tab_strip_model_->GetActiveWebContents()) { | 1435 if (source == tab_strip_model_->GetActiveWebContents()) { |
1437 PrefService* prefs = profile_->GetPrefs(); | 1436 PrefService* prefs = profile_->GetPrefs(); |
1438 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); | 1437 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); |
1439 } | 1438 } |
1440 } | 1439 } |
1441 | 1440 |
1442 void Browser::ContentsMouseEvent( | 1441 void Browser::ContentsMouseEvent( |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2477 if (contents && !allow_js_access) { | 2476 if (contents && !allow_js_access) { |
2478 contents->web_contents()->GetController().LoadURL( | 2477 contents->web_contents()->GetController().LoadURL( |
2479 target_url, | 2478 target_url, |
2480 content::Referrer(), | 2479 content::Referrer(), |
2481 ui::PAGE_TRANSITION_LINK, | 2480 ui::PAGE_TRANSITION_LINK, |
2482 std::string()); // No extra headers. | 2481 std::string()); // No extra headers. |
2483 } | 2482 } |
2484 | 2483 |
2485 return contents != NULL; | 2484 return contents != NULL; |
2486 } | 2485 } |
OLD | NEW |