Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 } 1625 }
1626 1626
1627 bool Browser::IsPopupOrPanel(const WebContents* source) const { 1627 bool Browser::IsPopupOrPanel(const WebContents* source) const {
1628 return is_type_popup(); 1628 return is_type_popup();
1629 } 1629 }
1630 1630
1631 void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { 1631 void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
1632 if (!GetStatusBubble()) 1632 if (!GetStatusBubble())
1633 return; 1633 return;
1634 1634
1635 if (source == tab_strip_model_->GetActiveWebContents()) { 1635 if (source == tab_strip_model_->GetActiveWebContents())
1636 PrefService* prefs = profile_->GetPrefs(); 1636 GetStatusBubble()->SetURL(url);
1637 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages));
1638 }
1639 } 1637 }
1640 1638
1641 void Browser::ContentsMouseEvent(WebContents* source, 1639 void Browser::ContentsMouseEvent(WebContents* source,
1642 const gfx::Point& location, 1640 const gfx::Point& location,
1643 bool motion, 1641 bool motion,
1644 bool exited) { 1642 bool exited) {
1645 exclusive_access_manager_->OnUserInput(); 1643 exclusive_access_manager_->OnUserInput();
1646 1644
1647 // Mouse motion events update the status bubble, if it exists. 1645 // Mouse motion events update the status bubble, if it exists.
1648 if (!GetStatusBubble() || (!motion && !exited)) 1646 if (!GetStatusBubble() || (!motion && !exited))
1649 return; 1647 return;
1650 1648
1651 if (source == tab_strip_model_->GetActiveWebContents()) { 1649 if (source == tab_strip_model_->GetActiveWebContents()) {
1652 GetStatusBubble()->MouseMoved(location, exited); 1650 GetStatusBubble()->MouseMoved(location, exited);
1653 if (exited) 1651 if (exited)
1654 GetStatusBubble()->SetURL(GURL(), std::string()); 1652 GetStatusBubble()->SetURL(GURL());
1655 } 1653 }
1656 } 1654 }
1657 1655
1658 void Browser::ContentsZoomChange(bool zoom_in) { 1656 void Browser::ContentsZoomChange(bool zoom_in) {
1659 chrome::ExecuteCommand(this, zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); 1657 chrome::ExecuteCommand(this, zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS);
1660 } 1658 }
1661 1659
1662 bool Browser::TakeFocus(content::WebContents* source, 1660 bool Browser::TakeFocus(content::WebContents* source,
1663 bool reverse) { 1661 bool reverse) {
1664 content::NotificationService::current()->Notify( 1662 content::NotificationService::current()->Notify(
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 if (contents && !allow_js_access) { 2744 if (contents && !allow_js_access) {
2747 contents->web_contents()->GetController().LoadURL( 2745 contents->web_contents()->GetController().LoadURL(
2748 target_url, 2746 target_url,
2749 content::Referrer(), 2747 content::Referrer(),
2750 ui::PAGE_TRANSITION_LINK, 2748 ui::PAGE_TRANSITION_LINK,
2751 std::string()); // No extra headers. 2749 std::string()); // No extra headers.
2752 } 2750 }
2753 2751
2754 return contents != NULL; 2752 return contents != NULL;
2755 } 2753 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698