From 9d6f8a4fbbdbaf61802f8e41de8afb692a0e3408 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 18 Feb 2011 10:17:30 +0000 Subject: Merge Chromium at 9.0.597.106 This is branches/597 at r74919. Change-Id: Iab4795189c52e254b04051b05cbceda407afb0b6 --- chrome/browser/browser_main.cc | 2 +- chrome/browser/extensions/crx_installer.cc | 3 +- .../in_process_webkit/browser_webkitclient_impl.cc | 4 +- chrome/browser/js_modal_dialog.cc | 47 ++++--------- chrome/browser/js_modal_dialog.h | 8 +-- .../renderer_host/resource_message_filter.cc | 4 +- chrome/browser/resources/gpu_blacklist.json | 46 +++++++++++- chrome/browser/tabs/tab_strip_model.cc | 16 ++++- chrome/browser/tabs/tab_strip_model.h | 3 + .../common/extensions/docs/static/whats_new.html | 60 +++++++++++++--- chrome/common/extensions/docs/whats_new.html | 82 ++++++++++++++++------ 11 files changed, 198 insertions(+), 77 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 866f897..0e5d339 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -398,7 +398,7 @@ void BrowserMainParts::PrefetchFieldTrial() { ResourceDispatcherHost::set_is_prefetch_enabled(false); } else { const base::FieldTrial::Probability kPrefetchDivisor = 1000; - const base::FieldTrial::Probability no_prefetch_probability = 500; + const base::FieldTrial::Probability no_prefetch_probability = 970; scoped_refptr trial( new base::FieldTrial("Prefetch", kPrefetchDivisor)); trial->AppendGroup("ContentPrefetchDisabled", no_prefetch_probability); diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index e002314..8441baa 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -308,7 +308,8 @@ void CrxInstaller::ConfirmInstall() { GURL overlapping_url; const Extension* overlapping_extension = frontend_->GetExtensionByOverlappingWebExtent(extension_->web_extent()); - if (overlapping_extension) { + if (overlapping_extension && + overlapping_extension->id() != extension_->id()) { ReportFailureFromUIThread(l10n_util::GetStringFUTF8( IDS_EXTENSION_OVERLAPPING_WEB_EXTENT, UTF8ToUTF16(overlapping_extension->name()))); diff --git a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc index df541e8..afe12ca 100644 --- a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc +++ b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc @@ -148,8 +148,10 @@ int BrowserWebKitClientImpl::databaseDeleteFile( } void BrowserWebKitClientImpl::idbShutdown() { - if (indexed_db_key_utility_client_.get()) + if (indexed_db_key_utility_client_.get()) { indexed_db_key_utility_client_->EndUtilityProcess(); + indexed_db_key_utility_client_ = NULL; + } } void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath( diff --git a/chrome/browser/js_modal_dialog.cc b/chrome/browser/js_modal_dialog.cc index 32d35b1..4cfe4ae 100644 --- a/chrome/browser/js_modal_dialog.cc +++ b/chrome/browser/js_modal_dialog.cc @@ -110,46 +110,29 @@ void JavaScriptAppModalDialog::OnCancel(bool suppress_js_messages) { // is a temporary workaround. CompleteDialog(); - if (!skip_this_dialog_) { - delegate_->OnMessageBoxClosed(reply_msg_, false, std::wstring()); - if (suppress_js_messages) - delegate_->SetSuppressMessageBoxes(true); - } - - Cleanup(); + UpdateDelegate(false, L"", suppress_js_messages); } void JavaScriptAppModalDialog::OnAccept(const std::wstring& prompt_text, bool suppress_js_messages) { CompleteDialog(); - - if (!skip_this_dialog_) { - delegate_->OnMessageBoxClosed(reply_msg_, true, prompt_text); - if (suppress_js_messages) - delegate_->SetSuppressMessageBoxes(true); - } - - Cleanup(); + UpdateDelegate(true, prompt_text, suppress_js_messages); } void JavaScriptAppModalDialog::OnClose() { - Cleanup(); + // Should we be handling suppress here too? See crbug.com/65008. + UpdateDelegate(false, L"", false); } -void JavaScriptAppModalDialog::Cleanup() { - if (skip_this_dialog_) { - // We can't use the |delegate_|, because we might be in the process of - // destroying it. - if (tab_contents_) - tab_contents_->OnMessageBoxClosed(reply_msg_, false, L""); -// The extension_host_ will always be a dirty pointer on OS X because the alert -// window will cause the extension popup to close since it is resigning its key -// state, destroying the host. http://crbug.com/29355 -#if !defined(OS_MACOSX) - else if (extension_host_) - extension_host_->OnMessageBoxClosed(reply_msg_, false, L""); - else - NOTREACHED(); -#endif - } +void JavaScriptAppModalDialog::UpdateDelegate(bool success, + const std::wstring& prompt_text, + bool suppress_js_messages) { + if (skip_this_dialog_) + return; + + delegate_->OnMessageBoxClosed(reply_msg_, success, prompt_text); + if (suppress_js_messages) + delegate_->SetSuppressMessageBoxes(true); + + skip_this_dialog_ = true; } diff --git a/chrome/browser/js_modal_dialog.h b/chrome/browser/js_modal_dialog.h index 440633f..c531352 100644 --- a/chrome/browser/js_modal_dialog.h +++ b/chrome/browser/js_modal_dialog.h @@ -78,10 +78,6 @@ class JavaScriptAppModalDialog : public AppModalDialog, bool display_suppress_checkbox() const { return display_suppress_checkbox_; } bool is_before_unload_dialog() const { return is_before_unload_dialog_; } - protected: - // Overridden from AppModalDialog: - virtual void Cleanup(); - private: // Overridden from NotificationObserver: virtual void Observe(NotificationType type, @@ -91,6 +87,10 @@ class JavaScriptAppModalDialog : public AppModalDialog, // Initializes for notifications to listen. void InitNotifications(); + // Updates the delegate with the result of the dialog. + void UpdateDelegate(bool success, const std::wstring& prompt_text, + bool suppress_js_messages); + NotificationRegistrar registrar_; // An implementation of the client interface to provide supporting methods diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index bece8f1..a9c8c79 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -877,8 +877,8 @@ void ResourceMessageFilter::OnGotPluginInfo(bool found, const GURL& policy_url, IPC::Message* reply_msg) { ContentSetting setting = CONTENT_SETTING_DEFAULT; + WebPluginInfo info_copy = info; if (found) { - WebPluginInfo info_copy = info; info_copy.enabled = info_copy.enabled && plugin_service_->PrivatePluginAllowedForURL(info_copy.path, policy_url); HostContentSettingsMap* map = profile_->GetHostContentSettingsMap(); @@ -891,7 +891,7 @@ void ResourceMessageFilter::OnGotPluginInfo(bool found, } ViewHostMsg_GetPluginInfo::WriteReplyParams( - reply_msg, found, info, setting, actual_mime_type); + reply_msg, found, info_copy, setting, actual_mime_type); Send(reply_msg); } diff --git a/chrome/browser/resources/gpu_blacklist.json b/chrome/browser/resources/gpu_blacklist.json index f211db2..2720a6d 100644 --- a/chrome/browser/resources/gpu_blacklist.json +++ b/chrome/browser/resources/gpu_blacklist.json @@ -1,6 +1,6 @@ { "name": "gpu blacklist", - "version": "0.2", + "version": "0.7", "entries": [ { // ATI Radeon X1900 on Mac, BUGWEBKIT=47028 "os": { @@ -31,6 +31,50 @@ "blacklist": [ "webgl" ] + }, + { // Intel Mobile 945 Express Chipset Family + "os": { + "type": "any" + }, + "vendor_id": "0x8086", + "device_id": "0x27AE", + "blacklist": [ + "webgl" + ] + }, + { // All ATI cards in linux, BUG=71381 + "id": "5", + "os": { + "type": "linux" + }, + "vendor_id": "0x1002", + "blacklist": [ + "webgl" + ] + }, + { // ATI Radeon HD2600 on Mac, BUG=68859 + "id": "6", + "os": { + "type": "macosx" + }, + "vendor_id": "0x1002", + "device_id": "0x9583", + "blacklist": [ + "webgl", + "accelerated_compositing" + ] + }, + { // ATI Radeon HD2400 on Mac, BUG=68859 + "id": "7", + "os": { + "type": "macosx" + }, + "vendor_id": "0x1002", + "device_id": "0x94c8", + "blacklist": [ + "webgl", + "accelerated_compositing" + ] } ] } diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 98316e9..a16d250 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -168,11 +168,11 @@ void TabStripModel::InsertTabContentsAt(int index, TabContentsWrapper* TabStripModel::ReplaceTabContentsAt( int index, TabContentsWrapper* new_contents) { - // TODO: this should reset group/opener of any tabs that point at - // old_contents. DCHECK(ContainsIndex(index)); TabContentsWrapper* old_contents = GetContentsAt(index); + ForgetOpenersAndGroupsReferencing(&(old_contents->controller())); + contents_data_[index]->contents = new_contents; FOR_EACH_OBSERVER(TabStripModelObserver, observers_, @@ -212,6 +212,7 @@ TabContentsWrapper* TabStripModel::DetachTabContentsAt(int index) { int next_selected_index = order_controller_->DetermineNewSelectedIndex(index); delete contents_data_.at(index); contents_data_.erase(contents_data_.begin() + index); + ForgetOpenersAndGroupsReferencing(&(removed_contents->controller())); if (empty()) closing_all_ = true; FOR_EACH_OBSERVER(TabStripModelObserver, observers_, @@ -1010,3 +1011,14 @@ bool TabStripModel::OpenerMatches(const TabContentsData* data, bool use_group) { return data->opener == opener || (use_group && data->group == opener); } + +void TabStripModel::ForgetOpenersAndGroupsReferencing( + const NavigationController* tab) { + for (TabContentsDataVector::const_iterator i = contents_data_.begin(); + i != contents_data_.end(); ++i) { + if ((*i)->group == tab) + (*i)->group = NULL; + if ((*i)->opener == tab) + (*i)->opener = NULL; + } +} diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index 7a3c8d9..7ed42f1 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -480,6 +480,9 @@ class TabStripModel : public NotificationObserver { const NavigationController* opener, bool use_group); + // Sets the group/opener of any tabs that reference |tab| to NULL. + void ForgetOpenersAndGroupsReferencing(const NavigationController* tab); + // Our delegate. TabStripModelDelegate* delegate_; diff --git a/chrome/common/extensions/docs/static/whats_new.html b/chrome/common/extensions/docs/static/whats_new.html index 9896ce7..9bf0393 100644 --- a/chrome/common/extensions/docs/static/whats_new.html +++ b/chrome/common/extensions/docs/static/whats_new.html @@ -7,12 +7,50 @@ made in recent releases.

+

Google Chrome 9

+ +

New APIs

+ + +

Manifest changes

+ + + + + +

Additions to existing APIs

+ + +

Google Chrome 8

@@ -65,42 +103,42 @@ No API or manifest changes worth noting.

New APIs

New experimental APIs

Additions to existing APIs

Manifest changes

diff --git a/chrome/common/extensions/docs/whats_new.html b/chrome/common/extensions/docs/whats_new.html index 2449352..9e2b8ed 100644 --- a/chrome/common/extensions/docs/whats_new.html +++ b/chrome/common/extensions/docs/whats_new.html @@ -311,12 +311,50 @@ made in recent releases.

+

Google Chrome 9

+ +

New APIs

+ + +

Manifest changes

+ + + + + +

Additions to existing APIs

+ + +

Google Chrome 8

@@ -369,41 +407,41 @@ No API or manifest changes worth noting.

New APIs

+ add context menus to pages or specific objects on a page +
  • The cookies API allows you to manage the + browser's cookie system
  • +
  • The idle API allows you to detect when the + machine's idle state changes
  • +

    New experimental APIs

    + add functionality to the browser's address bar +
  • The infobars API allows you + to add a UI panel across the top of a tab
  • +

    Additions to existing APIs

    + method can now return popup views +
  • A new WINDOW_ID_NONE constant + identifies when focus shifts away from the browser
  • +
  • The new chrome.tabs.getCurrent() method + returns the tab associated with the currently executing script
  • +

    Manifest changes

    + management page + -- cgit v1.1