diff options
-rw-r--r-- | chrome/browser/extensions/extension_omnibox_apitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h | 44 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm | 4 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/location_bar_view_gtk.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/location_bar_view_gtk.h | 44 | ||||
-rw-r--r-- | chrome/browser/ui/omnibox/location_bar.h | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/location_bar/location_bar_view.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/location_bar/location_bar_view.h | 4 | ||||
-rw-r--r-- | chrome/test/base/test_location_bar.cc | 2 | ||||
-rw-r--r-- | chrome/test/base/test_location_bar.h | 7 |
11 files changed, 60 insertions, 59 deletions
diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc index 90d97ac..08d13f1 100644 --- a/chrome/browser/extensions/extension_omnibox_apitest.cc +++ b/chrome/browser/extensions/extension_omnibox_apitest.cc @@ -109,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxApiTest, MAYBE_Basic) { WaitForAutocompleteDone(autocomplete_controller); EXPECT_TRUE(autocomplete_controller->done()); - EXPECT_EQ(std::wstring(), location_bar->GetInputString()); + EXPECT_EQ(string16(), location_bar->GetInputString()); EXPECT_EQ(string16(), location_bar->location_entry()->GetText()); EXPECT_TRUE(location_bar->location_entry()->IsSelectAll()); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 2c51194..fdc7668 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1436,7 +1436,7 @@ void Browser::OpenCurrentURL() { if (OpenInstant(open_disposition)) return; - GURL url(WideToUTF8(location_bar->GetInputString())); + GURL url(location_bar->GetInputString()); if (open_disposition == CURRENT_TAB && TabFinder::IsEnabled()) { Browser* existing_browser = NULL; diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h index e922e1d..9a411d8 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h @@ -54,30 +54,30 @@ class LocationBarViewMac : public AutocompleteEditController, virtual ~LocationBarViewMac(); // Overridden from LocationBar: - virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type); + virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; virtual void SetSuggestedText(const string16& text, - InstantCompleteBehavior behavior); - virtual std::wstring GetInputString() const; - virtual WindowOpenDisposition GetWindowOpenDisposition() const; - virtual PageTransition::Type GetPageTransition() const; - virtual void AcceptInput(); - virtual void FocusLocation(bool select_all); - virtual void FocusSearch(); - virtual void UpdateContentSettingsIcons(); - virtual void UpdatePageActions(); - virtual void InvalidatePageActions(); - virtual void SaveStateToContents(TabContents* contents); - virtual void Revert(); - virtual const OmniboxView* location_entry() const; - virtual OmniboxView* location_entry(); - virtual LocationBarTesting* GetLocationBarForTesting(); + InstantCompleteBehavior behavior) OVERRIDE; + virtual string16 GetInputString() const OVERRIDE; + virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; + virtual PageTransition::Type GetPageTransition() const OVERRIDE; + virtual void AcceptInput() OVERRIDE; + virtual void FocusLocation(bool select_all) OVERRIDE; + virtual void FocusSearch() OVERRIDE; + virtual void UpdateContentSettingsIcons() OVERRIDE; + virtual void UpdatePageActions() OVERRIDE; + virtual void InvalidatePageActions() OVERRIDE; + virtual void SaveStateToContents(TabContents* contents) OVERRIDE; + virtual void Revert() OVERRIDE; + virtual const OmniboxView* location_entry() const OVERRIDE; + virtual OmniboxView* location_entry() OVERRIDE; + virtual LocationBarTesting* GetLocationBarForTesting() OVERRIDE; // Overridden from LocationBarTesting: - virtual int PageActionCount(); - virtual int PageActionVisibleCount(); - virtual ExtensionAction* GetPageAction(size_t index); - virtual ExtensionAction* GetVisiblePageAction(size_t index); - virtual void TestPageActionPressed(size_t index); + virtual int PageActionCount() OVERRIDE; + virtual int PageActionVisibleCount() OVERRIDE; + virtual ExtensionAction* GetPageAction(size_t index) OVERRIDE; + virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE; + virtual void TestPageActionPressed(size_t index) OVERRIDE; // Set/Get the editable state of the field. void SetEditable(bool editable); @@ -183,7 +183,7 @@ class LocationBarViewMac : public AutocompleteEditController, // When we get an OnAutocompleteAccept notification from the autocomplete // edit, we save the input string so we can give it back to the browser on // the LocationBar interface via GetInputString(). - std::wstring location_input_; + string16 location_input_; // The user's desired disposition for how their input should be opened. WindowOpenDisposition disposition_; diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm index d6cc961..8b32cfb 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm @@ -138,7 +138,7 @@ void LocationBarViewMac::ShowFirstRunBubbleInternal( [FirstRunBubbleController showForView:field_ offset:kOffset profile:profile_]; } -std::wstring LocationBarViewMac::GetInputString() const { +string16 LocationBarViewMac::GetInputString() const { return location_input_; } @@ -224,7 +224,7 @@ void LocationBarViewMac::OnAutocompleteAccept(const GURL& url, // WARNING: don't add an early return here. The calls after the if must // happen. if (url.is_valid()) { - location_input_ = UTF8ToWide(url.spec()); + location_input_ = UTF8ToUTF16(url.spec()); disposition_ = disposition; transition_ = transition; diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc index 6bd7fa3..10fc40d 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc @@ -472,7 +472,7 @@ void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url, PageTransition::Type transition, const GURL& alternate_nav_url) { if (url.is_valid()) { - location_input_ = UTF8ToWide(url.spec()); + location_input_ = UTF8ToUTF16(url.spec()); disposition_ = disposition; transition_ = transition; @@ -596,7 +596,7 @@ void LocationBarViewGtk::SetSuggestedText(const string16& text, location_entry_->model()->SetSuggestedText(text, behavior); } -std::wstring LocationBarViewGtk::GetInputString() const { +string16 LocationBarViewGtk::GetInputString() const { return location_input_; } diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h index a908459..837eb16 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h @@ -111,30 +111,30 @@ class LocationBarViewGtk : public AutocompleteEditController, virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE; // Implement the LocationBar interface. - virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type); + virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; virtual void SetSuggestedText(const string16& text, - InstantCompleteBehavior behavior); - virtual std::wstring GetInputString() const; - virtual WindowOpenDisposition GetWindowOpenDisposition() const; - virtual PageTransition::Type GetPageTransition() const; - virtual void AcceptInput(); - virtual void FocusLocation(bool select_all); - virtual void FocusSearch(); - virtual void UpdateContentSettingsIcons(); - virtual void UpdatePageActions(); - virtual void InvalidatePageActions(); - virtual void SaveStateToContents(TabContents* contents); - virtual void Revert(); - virtual const OmniboxView* location_entry() const; - virtual OmniboxView* location_entry(); - virtual LocationBarTesting* GetLocationBarForTesting(); + InstantCompleteBehavior behavior) OVERRIDE; + virtual string16 GetInputString() const OVERRIDE; + virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; + virtual PageTransition::Type GetPageTransition() const OVERRIDE; + virtual void AcceptInput() OVERRIDE; + virtual void FocusLocation(bool select_all) OVERRIDE; + virtual void FocusSearch() OVERRIDE; + virtual void UpdateContentSettingsIcons() OVERRIDE; + virtual void UpdatePageActions() OVERRIDE; + virtual void InvalidatePageActions() OVERRIDE; + virtual void SaveStateToContents(TabContents* contents) OVERRIDE; + virtual void Revert() OVERRIDE; + virtual const OmniboxView* location_entry() const OVERRIDE; + virtual OmniboxView* location_entry() OVERRIDE; + virtual LocationBarTesting* GetLocationBarForTesting() OVERRIDE; // Implement the LocationBarTesting interface. - virtual int PageActionCount(); - virtual int PageActionVisibleCount(); - virtual ExtensionAction* GetPageAction(size_t index); - virtual ExtensionAction* GetVisiblePageAction(size_t index); - virtual void TestPageActionPressed(size_t index); + virtual int PageActionCount() OVERRIDE; + virtual int PageActionVisibleCount() OVERRIDE; + virtual ExtensionAction* GetPageAction(size_t index) OVERRIDE; + virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE; + virtual void TestPageActionPressed(size_t index) OVERRIDE; // Implement the NotificationObserver interface. virtual void Observe(int type, @@ -418,7 +418,7 @@ class LocationBarViewGtk : public AutocompleteEditController, // When we get an OnAutocompleteAccept notification from the autocomplete // edit, we save the input string so we can give it back to the browser on // the LocationBar interface via GetInputString(). - std::wstring location_input_; + string16 location_input_; // The user's desired disposition for how their input should be opened. WindowOpenDisposition disposition_; diff --git a/chrome/browser/ui/omnibox/location_bar.h b/chrome/browser/ui/omnibox/location_bar.h index 184d38f..b2ac974 100644 --- a/chrome/browser/ui/omnibox/location_bar.h +++ b/chrome/browser/ui/omnibox/location_bar.h @@ -38,7 +38,7 @@ class LocationBar { InstantCompleteBehavior behavior) = 0; // Returns the string of text entered in the location bar. - virtual std::wstring GetInputString() const = 0; + virtual string16 GetInputString() const = 0; // Returns the WindowOpenDisposition that should be used to determine where // to open a URL entered in the location bar. diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 9cacd23..34069d2 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -817,7 +817,7 @@ void LocationBarView::OnAutocompleteAccept( // WARNING: don't add an early return here. The calls after the if must // happen. if (url.is_valid()) { - location_input_ = UTF8ToWide(url.spec()); + location_input_ = UTF8ToUTF16(url.spec()); disposition_ = disposition; transition_ = transition; @@ -1131,7 +1131,7 @@ void LocationBarView::SetSuggestedText(const string16& text, location_entry_->model()->SetSuggestedText(text, behavior); } -std::wstring LocationBarView::GetInputString() const { +string16 LocationBarView::GetInputString() const { return location_input_; } diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h index 89dc545..6542df8 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h @@ -241,7 +241,7 @@ class LocationBarView : public LocationBar, virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; virtual void SetSuggestedText(const string16& text, InstantCompleteBehavior behavior) OVERRIDE; - virtual std::wstring GetInputString() const OVERRIDE; + virtual string16 GetInputString() const OVERRIDE; virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; virtual PageTransition::Type GetPageTransition() const OVERRIDE; virtual void AcceptInput() OVERRIDE; @@ -356,7 +356,7 @@ class LocationBarView : public LocationBar, // This is the string of text from the autocompletion session that the user // entered or selected. - std::wstring location_input_; + string16 location_input_; // The user's desired disposition for how their input should be opened WindowOpenDisposition disposition_; diff --git a/chrome/test/base/test_location_bar.cc b/chrome/test/base/test_location_bar.cc index 10e5e67..b1def17 100644 --- a/chrome/test/base/test_location_bar.cc +++ b/chrome/test/base/test_location_bar.cc @@ -11,7 +11,7 @@ TestLocationBar::TestLocationBar() TestLocationBar::~TestLocationBar() {} -std::wstring TestLocationBar::GetInputString() const { +string16 TestLocationBar::GetInputString() const { return input_string_; } diff --git a/chrome/test/base/test_location_bar.h b/chrome/test/base/test_location_bar.h index 26437c7..d3ba264 100644 --- a/chrome/test/base/test_location_bar.h +++ b/chrome/test/base/test_location_bar.h @@ -6,6 +6,7 @@ #define CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ #pragma once +#include "base/string16.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/ui/omnibox/location_bar.h" #include "content/common/page_transition_types.h" @@ -16,7 +17,7 @@ class TestLocationBar : public LocationBar { TestLocationBar(); virtual ~TestLocationBar(); - void set_input_string(const std::wstring& input_string) { + void set_input_string(const string16& input_string) { input_string_ = input_string; } void set_disposition(WindowOpenDisposition disposition) { @@ -30,7 +31,7 @@ class TestLocationBar : public LocationBar { virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE {} virtual void SetSuggestedText(const string16& text, InstantCompleteBehavior behavior) OVERRIDE {} - virtual std::wstring GetInputString() const OVERRIDE; + virtual string16 GetInputString() const OVERRIDE; virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; virtual PageTransition::Type GetPageTransition() const OVERRIDE; virtual void AcceptInput() OVERRIDE {} @@ -49,7 +50,7 @@ class TestLocationBar : public LocationBar { // Test-supplied values that will be returned through the LocationBar // interface. - std::wstring input_string_; + string16 input_string_; WindowOpenDisposition disposition_; PageTransition::Type transition_; |