diff options
Diffstat (limited to 'content/shell/browser')
20 files changed, 66 insertions, 65 deletions
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc index f9e63e1..41b592f 100644 --- a/content/shell/browser/shell.cc +++ b/content/shell/browser/shell.cc @@ -323,9 +323,9 @@ JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { bool Shell::AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); } diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h index 20515f6..1434b76 100644 --- a/content/shell/browser/shell.h +++ b/content/shell/browser/shell.h @@ -142,9 +142,9 @@ class Shell : public WebContentsDelegate, #endif virtual bool AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; virtual void RendererUnresponsive(WebContents* source) OVERRIDE; virtual void ActivateContents(WebContents* contents) OVERRIDE; virtual void DeactivateContents(WebContents* contents) OVERRIDE; @@ -191,7 +191,7 @@ class Shell : public WebContentsDelegate, // Sets whether the spinner is spinning. void PlatformSetIsLoading(bool loading); // Set the title of shell window - void PlatformSetTitle(const string16& title); + void PlatformSetTitle(const base::string16& title); #if defined(OS_ANDROID) void PlatformToggleFullscreenModeForTab(WebContents* web_contents, bool enter_fullscreen); diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc index 5cea4c1..b11ba37 100644 --- a/content/shell/browser/shell_android.cc +++ b/content/shell/browser/shell_android.cc @@ -60,7 +60,7 @@ void Shell::PlatformResizeSubViews() { // Not needed; subviews are bound. } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { NOTIMPLEMENTED(); } diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc index 6d66963..ccaffb7 100644 --- a/content/shell/browser/shell_aura.cc +++ b/content/shell/browser/shell_aura.cc @@ -198,7 +198,7 @@ void Shell::Close() { web_contents_.reset(); } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { } } // namespace content diff --git a/content/shell/browser/shell_gtk.cc b/content/shell/browser/shell_gtk.cc index 66d17ce7..3d2580a 100644 --- a/content/shell/browser/shell_gtk.cc +++ b/content/shell/browser/shell_gtk.cc @@ -335,7 +335,7 @@ gboolean Shell::OnReloadKeyPressed(GtkAccelGroup* accel_group, return TRUE; } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { if (headless_) return; diff --git a/content/shell/browser/shell_javascript_dialog.h b/content/shell/browser/shell_javascript_dialog.h index 4001334..233296b 100644 --- a/content/shell/browser/shell_javascript_dialog.h +++ b/content/shell/browser/shell_javascript_dialog.h @@ -29,8 +29,8 @@ class ShellJavaScriptDialog { ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback); ~ShellJavaScriptDialog(); @@ -46,8 +46,8 @@ class ShellJavaScriptDialog { #elif defined(OS_WIN) JavaScriptMessageType message_type_; HWND dialog_win_; - string16 message_text_; - string16 default_prompt_text_; + base::string16 message_text_; + base::string16 default_prompt_text_; static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(TOOLKIT_GTK) diff --git a/content/shell/browser/shell_javascript_dialog_gtk.cc b/content/shell/browser/shell_javascript_dialog_gtk.cc index 87bd6f3..65bf739 100644 --- a/content/shell/browser/shell_javascript_dialog_gtk.cc +++ b/content/shell/browser/shell_javascript_dialog_gtk.cc @@ -19,12 +19,12 @@ const char kPromptTextId[] = "content_shell_prompt_text"; // If there's a text entry in the dialog, get the text from the first one and // return it. -string16 GetPromptText(GtkDialog* dialog) { +base::string16 GetPromptText(GtkDialog* dialog) { GtkWidget* widget = static_cast<GtkWidget*>( g_object_get_data(G_OBJECT(dialog), kPromptTextId)); if (widget) return UTF8ToUTF16(gtk_entry_get_text(GTK_ENTRY(widget))); - return string16(); + return base::string16(); } } // namespace @@ -36,8 +36,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback), @@ -113,7 +113,7 @@ void ShellJavaScriptDialog::OnResponse(GtkWidget* dialog, int response_id) { break; case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: - callback_.Run(false, string16()); + callback_.Run(false, base::string16()); break; default: NOTREACHED(); diff --git a/content/shell/browser/shell_javascript_dialog_mac.mm b/content/shell/browser/shell_javascript_dialog_mac.mm index fe9de98..e748000 100644 --- a/content/shell/browser/shell_javascript_dialog_mac.mm +++ b/content/shell/browser/shell_javascript_dialog_mac.mm @@ -66,7 +66,7 @@ return; bool success = returnCode == NSAlertFirstButtonReturn; - string16 input; + base::string16 input; if (textField_) input = base::SysNSStringToUTF16([textField_ stringValue]); @@ -89,8 +89,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback) { diff --git a/content/shell/browser/shell_javascript_dialog_manager.cc b/content/shell/browser/shell_javascript_dialog_manager.cc index 1476f7c..6ac7243b 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.cc +++ b/content/shell/browser/shell_javascript_dialog_manager.cc @@ -27,18 +27,18 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } if (!dialog_request_callback_.is_null()) { dialog_request_callback_.Run(); - callback.Run(true, string16()); + callback.Run(true, base::string16()); dialog_request_callback_.Reset(); return; } @@ -52,7 +52,7 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( return; } - string16 new_message_text = net::FormatUrl(origin_url, accept_lang) + + base::string16 new_message_text = net::FormatUrl(origin_url, accept_lang) + ASCIIToUTF16("\n\n") + message_text; gfx::NativeWindow parent_window = @@ -73,17 +73,17 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } if (!dialog_request_callback_.is_null()) { dialog_request_callback_.Run(); - callback.Run(true, string16()); + callback.Run(true, base::string16()); dialog_request_callback_.Reset(); return; } @@ -91,11 +91,11 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) if (dialog_) { // Seriously!? - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } - string16 new_message_text = + base::string16 new_message_text = message_text + ASCIIToUTF16("\n\nIs it OK to leave/reload this page?"); @@ -106,11 +106,11 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( parent_window, JAVASCRIPT_MESSAGE_TYPE_CONFIRM, new_message_text, - string16(), // default_prompt_text + base::string16(), // default callback)); #else // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; #endif } diff --git a/content/shell/browser/shell_javascript_dialog_manager.h b/content/shell/browser/shell_javascript_dialog_manager.h index 763736f..5bcfb65 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.h +++ b/content/shell/browser/shell_javascript_dialog_manager.h @@ -25,14 +25,14 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager { const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) OVERRIDE; virtual void RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) OVERRIDE; diff --git a/content/shell/browser/shell_javascript_dialog_win.cc b/content/shell/browser/shell_javascript_dialog_win.cc index a59639e..3537122 100644 --- a/content/shell/browser/shell_javascript_dialog_win.cc +++ b/content/shell/browser/shell_javascript_dialog_win.cc @@ -34,7 +34,7 @@ INT_PTR CALLBACK ShellJavaScriptDialog::DialogProc(HWND dialog, GetWindowLongPtr(dialog, DWLP_USER)); if (owner->dialog_win_) { owner->dialog_win_ = 0; - owner->callback_.Run(false, string16()); + owner->callback_.Run(false, base::string16()); owner->manager_->DialogClosed(owner); } break; @@ -42,7 +42,7 @@ INT_PTR CALLBACK ShellJavaScriptDialog::DialogProc(HWND dialog, case WM_COMMAND: { ShellJavaScriptDialog* owner = reinterpret_cast<ShellJavaScriptDialog*>( GetWindowLongPtr(dialog, DWLP_USER)); - string16 user_input; + base::string16 user_input; bool finish = false; bool result; switch (LOWORD(wparam)) { @@ -79,8 +79,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback), diff --git a/content/shell/browser/shell_login_dialog.cc b/content/shell/browser/shell_login_dialog.cc index 607fd66..b01fe98 100644 --- a/content/shell/browser/shell_login_dialog.cc +++ b/content/shell/browser/shell_login_dialog.cc @@ -34,8 +34,8 @@ void ShellLoginDialog::OnRequestCancelled() { base::Bind(&ShellLoginDialog::PlatformRequestCancelled, this)); } -void ShellLoginDialog::UserAcceptedAuth(const string16& username, - const string16& password) { +void ShellLoginDialog::UserAcceptedAuth(const base::string16& username, + const base::string16& password) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -48,7 +48,7 @@ void ShellLoginDialog::UserCancelledAuth() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ShellLoginDialog::SendAuthToRequester, this, - false, string16(), string16())); + false, base::string16(), base::string16())); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&ShellLoginDialog::PlatformCleanUp, this)); @@ -63,20 +63,20 @@ ShellLoginDialog::~ShellLoginDialog() { // Bogus implementations for linking. They are never called because // ResourceDispatcherHostDelegate::CreateLoginDelegate returns NULL. // TODO: implement ShellLoginDialog for other platforms, drop this #if -void ShellLoginDialog::PlatformCreateDialog(const string16& message) {} +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) {} void ShellLoginDialog::PlatformCleanUp() {} void ShellLoginDialog::PlatformRequestCancelled() {} #endif -void ShellLoginDialog::PrepDialog(const string16& host, - const string16& realm) { +void ShellLoginDialog::PrepDialog(const base::string16& host, + const base::string16& realm) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // The realm is controlled by the remote server, so there is no reason to // believe it is of a reasonable length. - string16 elided_realm; + base::string16 elided_realm; gfx::ElideString(realm, 120, &elided_realm); - string16 explanation = + base::string16 explanation = ASCIIToUTF16("The server ") + host + ASCIIToUTF16(" requires a username and password."); @@ -90,8 +90,8 @@ void ShellLoginDialog::PrepDialog(const string16& host, } void ShellLoginDialog::SendAuthToRequester(bool success, - const string16& username, - const string16& password) { + const base::string16& username, + const base::string16& password) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (success) request_->SetAuth(net::AuthCredentials(username, password)); diff --git a/content/shell/browser/shell_login_dialog.h b/content/shell/browser/shell_login_dialog.h index d9b0504..db70cb6 100644 --- a/content/shell/browser/shell_login_dialog.h +++ b/content/shell/browser/shell_login_dialog.h @@ -43,7 +43,8 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // the aforementioned platform specific code may not have access to private // members. Not to be called from client code. // Threading: UI thread. - void UserAcceptedAuth(const string16& username, const string16& password); + void UserAcceptedAuth(const base::string16& username, + const base::string16& password); void UserCancelledAuth(); protected: @@ -55,7 +56,7 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // platform specific LoginDialog implementation. // Creates the dialog. // Threading: UI thread. - void PlatformCreateDialog(const string16& message); + void PlatformCreateDialog(const base::string16& message); // Called from the destructor to let each platform do any necessary cleanup. // Threading: UI thread. void PlatformCleanUp(); @@ -65,13 +66,13 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // Sets up dialog creation. // Threading: UI thread. - void PrepDialog(const string16& host, const string16& realm); + void PrepDialog(const base::string16& host, const base::string16& realm); // Sends the authentication to the requester. // Threading: IO thread. void SendAuthToRequester(bool success, - const string16& username, - const string16& password); + const base::string16& username, + const base::string16& password); // Who/where/what asked for the authentication. // Threading: IO thread. diff --git a/content/shell/browser/shell_login_dialog_gtk.cc b/content/shell/browser/shell_login_dialog_gtk.cc index b08b449..97fafec 100644 --- a/content/shell/browser/shell_login_dialog_gtk.cc +++ b/content/shell/browser/shell_login_dialog_gtk.cc @@ -19,7 +19,7 @@ namespace content { -void ShellLoginDialog::PlatformCreateDialog(const string16& message) { +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); int render_process_id; diff --git a/content/shell/browser/shell_login_dialog_mac.mm b/content/shell/browser/shell_login_dialog_mac.mm index 447aa58..3e014e8 100644 --- a/content/shell/browser/shell_login_dialog_mac.mm +++ b/content/shell/browser/shell_login_dialog_mac.mm @@ -87,7 +87,7 @@ const int kPasswordFieldTag = 2; namespace content { -void ShellLoginDialog::PlatformCreateDialog(const string16& message) { +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); helper_ = [[ShellLoginDialogHelper alloc] init]; diff --git a/content/shell/browser/shell_mac.mm b/content/shell/browser/shell_mac.mm index 335f4af..e31ba09 100644 --- a/content/shell/browser/shell_mac.mm +++ b/content/shell/browser/shell_mac.mm @@ -274,7 +274,7 @@ void Shell::PlatformResizeSubViews() { // Not needed; subviews are bound. } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { if (headless_) return; diff --git a/content/shell/browser/shell_network_delegate.cc b/content/shell/browser/shell_network_delegate.cc index 560426f..1e4dddc 100644 --- a/content/shell/browser/shell_network_delegate.cc +++ b/content/shell/browser/shell_network_delegate.cc @@ -69,7 +69,7 @@ void ShellNetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) { } void ShellNetworkDelegate::OnPACScriptError(int line_number, - const string16& error) { + const base::string16& error) { } ShellNetworkDelegate::AuthRequiredResponse ShellNetworkDelegate::OnAuthRequired( diff --git a/content/shell/browser/shell_network_delegate.h b/content/shell/browser/shell_network_delegate.h index a3ce0a2..286cc0a 100644 --- a/content/shell/browser/shell_network_delegate.h +++ b/content/shell/browser/shell_network_delegate.h @@ -42,7 +42,7 @@ class ShellNetworkDelegate : public net::NetworkDelegate { virtual void OnCompleted(net::URLRequest* request, bool started) OVERRIDE; virtual void OnURLRequestDestroyed(net::URLRequest* request) OVERRIDE; virtual void OnPACScriptError(int line_number, - const string16& error) OVERRIDE; + const base::string16& error) OVERRIDE; virtual AuthRequiredResponse OnAuthRequired( net::URLRequest* request, const net::AuthChallengeInfo& auth_info, diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc index 273eef6..e137fcb 100644 --- a/content/shell/browser/shell_views.cc +++ b/content/shell/browser/shell_views.cc @@ -110,7 +110,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, #endif } - void SetWindowTitle(const string16& title) { title_ = title; } + void SetWindowTitle(const base::string16& title) { title_ = title; } void EnableUIControl(UIControl control, bool is_enabled) { if (control == BACK_BUTTON) { back_button_->SetState(is_enabled ? views::CustomButton::STATE_NORMAL @@ -215,7 +215,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, } // Overridden from TextfieldController virtual void ContentsChanged(views::Textfield* sender, - const string16& new_contents) OVERRIDE { + const base::string16& new_contents) OVERRIDE { } virtual bool HandleKeyEvent(views::Textfield* sender, const ui::KeyEvent& key_event) OVERRIDE { @@ -248,7 +248,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, // Overridden from WidgetDelegateView virtual bool CanResize() const OVERRIDE { return true; } virtual bool CanMaximize() const OVERRIDE { return true; } - virtual string16 GetWindowTitle() const OVERRIDE { + virtual base::string16 GetWindowTitle() const OVERRIDE { return title_; } virtual void WindowClosing() OVERRIDE { @@ -272,7 +272,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, Shell* shell_; // Window title - string16 title_; + base::string16 title_; // Toolbar view contains forward/backward/reload button and URL entry View* toolbar_view_; @@ -387,7 +387,7 @@ void Shell::Close() { window_widget_->CloseNow(); } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { ShellWindowDelegateView* delegate_view = static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); delegate_view->SetWindowTitle(title); diff --git a/content/shell/browser/shell_win.cc b/content/shell/browser/shell_win.cc index 0cd65db..b9e57a9 100644 --- a/content/shell/browser/shell_win.cc +++ b/content/shell/browser/shell_win.cc @@ -278,7 +278,7 @@ LRESULT CALLBACK Shell::EditWndProc(HWND hwnd, UINT message, lParam); } -void Shell::PlatformSetTitle(const string16& text) { +void Shell::PlatformSetTitle(const base::string16& text) { ::SetWindowText(window_, text.c_str()); } |