#include "content/browser/web_contents/web_contents_impl_efl.h"
+#include "base/strings/utf_string_conversions.h"
#include "content/public/common/content_client.h"
#include "content/common/view_messages.h"
#include "content/browser/browser_plugin/browser_plugin_guest.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
+#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_plugin_guest_manager.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_delegate.h"
return new_contents;
}
+bool WebContentsImplEfl::UpdateTitleForEntry(NavigationEntryImpl* entry,
+ const base::string16& title) {
+ bool updated = WebContentsImpl::UpdateTitleForEntry(entry, title);
+ // inform view even if the title didn't change to keep EWK consistency
+ if (!updated) {
+ // For file URLs without a title, use the pathname instead. In the case of a
+ // synthesized title, we don't want the update to count toward the "one set
+ // per page of the title to history."
+ base::string16 final_title;
+ if (entry && entry->GetURL().SchemeIsFile() && title.empty())
+ final_title = base::UTF8ToUTF16(entry->GetURL().ExtractFileName());
+ else
+ base::TrimWhitespace(title, base::TRIM_ALL, &final_title);
+
+ view_->SetPageTitle(final_title);
+ }
+
+ return updated;
+}
+
}