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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 1358923002: Extract TabChromeWebContentsDelegateAndroid into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrometab10
Patch Set: Rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index ed7721b197745455c20d2173536575b0c3d05e1d..bd724ac57a82f8a8e9906b34ac97663e60869f79 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -12,7 +12,6 @@
#include "cc/layers/layer.h"
#include "chrome/browser/android/chrome_web_contents_delegate_android.h"
#include "chrome/browser/android/compositor/tab_content_manager.h"
-#include "chrome/browser/android/hung_renderer_infobar_delegate.h"
#include "chrome/browser/android/metrics/uma_utils.h"
#include "chrome/browser/android/offline_pages/offline_page_bridge.h"
#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
@@ -55,8 +54,6 @@
#include "components/bookmarks/managed/managed_bookmark_service.h"
#include "components/dom_distiller/core/url_utils.h"
#include "components/favicon/content/content_favicon_driver.h"
-#include "components/infobars/core/infobar.h"
-#include "components/infobars/core/infobar_container.h"
#include "components/navigation_interception/intercept_navigation_delegate.h"
#include "components/navigation_interception/navigation_params.h"
#include "components/offline_pages/offline_page_feature.h"
@@ -104,16 +101,6 @@ const int kImageSearchThumbnailMinSize = 300 * 300;
const int kImageSearchThumbnailMaxWidth = 600;
const int kImageSearchThumbnailMaxHeight = 600;
-infobars::InfoBar* FindHungRendererInfoBar(InfoBarService* infobar_service) {
- DCHECK(infobar_service);
- for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
- infobars::InfoBar* infobar = infobar_service->infobar_at(i);
- if (infobar->delegate()->AsHungRendererInfoBarDelegate())
- return infobar;
- }
- return nullptr;
-}
-
} // namespace
TabAndroid* TabAndroid::FromWebContents(content::WebContents* web_contents) {
@@ -871,28 +858,6 @@ bool TabAndroid::HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url) {
return HasPrerenderedUrl(gurl);
}
-void TabAndroid::OnRendererUnresponsive(JNIEnv* env, jobject obj) {
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents());
- DCHECK(!FindHungRendererInfoBar(infobar_service));
- HungRendererInfoBarDelegate::Create(infobar_service,
- web_contents()->GetRenderProcessHost());
-}
-
-void TabAndroid::OnRendererResponsive(JNIEnv* env, jobject obj) {
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents());
- infobars::InfoBar* hung_renderer_infobar =
- FindHungRendererInfoBar(infobar_service);
- if (!hung_renderer_infobar)
- return;
-
- hung_renderer_infobar->delegate()
- ->AsHungRendererInfoBarDelegate()
- ->OnRendererResponsive();
- infobar_service->RemoveInfoBar(hung_renderer_infobar);
-}
-
namespace {
class ChromeInterceptNavigationDelegate : public InterceptNavigationDelegate {
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698