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

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

Issue 7523042: Add a status message "Waiting for extension Foo..." when there's a request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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/tab_contents/tab_contents_wrapper.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete_history_manager.h" 10 #include "chrome/browser/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_manager.h" 11 #include "chrome/browser/autofill/autofill_manager.h"
11 #include "chrome/browser/automation/automation_tab_helper.h" 12 #include "chrome/browser/automation/automation_tab_helper.h"
12 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/browser_shutdown.h" 14 #include "chrome/browser/browser_shutdown.h"
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 15 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 16 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
16 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg ate.h" 17 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg ate.h"
17 #include "chrome/browser/extensions/extension_tab_helper.h" 18 #include "chrome/browser/extensions/extension_tab_helper.h"
18 #include "chrome/browser/extensions/extension_webnavigation_api.h" 19 #include "chrome/browser/extensions/extension_webnavigation_api.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 "", 294 "",
294 PrefService::UNSYNCABLE_PREF); 295 PrefService::UNSYNCABLE_PREF);
295 } 296 }
296 297
297 string16 TabContentsWrapper::GetDefaultTitle() { 298 string16 TabContentsWrapper::GetDefaultTitle() {
298 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE); 299 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE);
299 } 300 }
300 301
301 string16 TabContentsWrapper::GetStatusText() const { 302 string16 TabContentsWrapper::GetStatusText() const {
302 if (!tab_contents()->IsLoading() || 303 if (!tab_contents()->IsLoading() ||
303 tab_contents()->load_state() == net::LOAD_STATE_IDLE) { 304 tab_contents()->load_state().state == net::LOAD_STATE_IDLE) {
304 return string16(); 305 return string16();
305 } 306 }
306 307
307 switch (tab_contents()->load_state()) { 308 switch (tab_contents()->load_state().state) {
309 case net::LOAD_STATE_WAITING_FOR_DELEGATE:
310 return l10n_util::GetStringFUTF16(
311 IDS_LOAD_STATE_WAITING_FOR_DELEGATE,
312 UTF8ToUTF16(tab_contents()->load_state().param));
308 case net::LOAD_STATE_WAITING_FOR_CACHE: 313 case net::LOAD_STATE_WAITING_FOR_CACHE:
309 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE); 314 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE);
310 case net::LOAD_STATE_ESTABLISHING_PROXY_TUNNEL: 315 case net::LOAD_STATE_ESTABLISHING_PROXY_TUNNEL:
311 return 316 return
312 l10n_util::GetStringUTF16(IDS_LOAD_STATE_ESTABLISHING_PROXY_TUNNEL); 317 l10n_util::GetStringUTF16(IDS_LOAD_STATE_ESTABLISHING_PROXY_TUNNEL);
313 case net::LOAD_STATE_RESOLVING_PROXY_FOR_URL: 318 case net::LOAD_STATE_RESOLVING_PROXY_FOR_URL:
314 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_RESOLVING_PROXY_FOR_URL); 319 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_RESOLVING_PROXY_FOR_URL);
315 case net::LOAD_STATE_RESOLVING_HOST: 320 case net::LOAD_STATE_RESOLVING_HOST:
316 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_RESOLVING_HOST); 321 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_RESOLVING_HOST);
317 case net::LOAD_STATE_CONNECTING: 322 case net::LOAD_STATE_CONNECTING:
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 if (infobars_.empty()) { 697 if (infobars_.empty()) {
693 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, 698 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
694 Source<NavigationController>(&tab_contents_->controller())); 699 Source<NavigationController>(&tab_contents_->controller()));
695 } 700 }
696 } 701 }
697 702
698 void TabContentsWrapper::RemoveAllInfoBars(bool animate) { 703 void TabContentsWrapper::RemoveAllInfoBars(bool animate) {
699 while (!infobars_.empty()) 704 while (!infobars_.empty())
700 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate); 705 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate);
701 } 706 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698