#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/result_codes.h"
-#include "grit/chromium_strings.h"
-#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/ui_resources.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#include "ui/base/l10n/l10n_util_mac.h"
HungRendererController* g_instance = NULL;
} // namespace
-class WebContentsObserverBridge : public content::WebContentsObserver {
+class HungRendererWebContentsObserverBridge
+ : public content::WebContentsObserver {
public:
- WebContentsObserverBridge(WebContents* web_contents,
- HungRendererController* controller)
+ HungRendererWebContentsObserverBridge(WebContents* web_contents,
+ HungRendererController* controller)
: content::WebContentsObserver(web_contents),
controller_(controller) {
}
protected:
// WebContentsObserver overrides:
- virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE {
- [controller_ renderProcessGone];
- }
- virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE {
+ void RenderProcessGone(base::TerminationStatus status) override {
[controller_ renderProcessGone];
}
+ void WebContentsDestroyed() override { [controller_ renderProcessGone]; }
private:
HungRendererController* controller_; // weak
- DISALLOW_COPY_AND_ASSIGN(WebContentsObserverBridge);
+ DISALLOW_COPY_AND_ASSIGN(HungRendererWebContentsObserverBridge);
};
@implementation HungRendererController
- (void)showForWebContents:(WebContents*)contents {
DCHECK(contents);
hungContents_ = contents;
- hungContentsObserver_.reset(new WebContentsObserverBridge(contents, self));
+ hungContentsObserver_.reset(
+ new HungRendererWebContentsObserverBridge(contents, self));
base::scoped_nsobject<NSMutableArray> titles([[NSMutableArray alloc] init]);
base::scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
for (TabContentsIterator it; !it.done(); it.Next()) {