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

Unified Diff: athena/main/athena_main.cc

Issue 396813003: Hook up delegate interfaces so that athena can create its own WebContentsViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « apps/shell/app/shell_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/athena_main.cc
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index ab7f3a423ee856208e759538be15a4ffc4579998..7ade3c9087575fdcb7a10b46a72d9950ba736d62 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -4,6 +4,7 @@
#include "apps/shell/app/shell_main_delegate.h"
#include "apps/shell/browser/shell_browser_main_delegate.h"
+#include "apps/shell/browser/shell_content_browser_client.h"
#include "apps/shell/browser/shell_desktop_controller.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "apps/shell/common/switches.h"
@@ -110,6 +111,23 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
};
+class AthenaContentBrowserClient : public apps::ShellContentBrowserClient {
+ public:
+ AthenaContentBrowserClient()
+ : apps::ShellContentBrowserClient(new AthenaBrowserMainDelegate()) {}
+ virtual ~AthenaContentBrowserClient() {}
+
+ // content::ContentBrowserClient:
+ virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate(
+ content::WebContents* web_contents) OVERRIDE {
+ // TODO(oshima): Implement athena's WebContentsViewDelegate.
+ return NULL;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AthenaContentBrowserClient);
+};
+
class AthenaRendererMainDelegate : public apps::ShellRendererMainDelegate {
public:
AthenaRendererMainDelegate() {}
@@ -133,9 +151,9 @@ class AthenaMainDelegate : public apps::ShellMainDelegate {
private:
// apps::ShellMainDelegate:
- virtual apps::ShellBrowserMainDelegate* CreateShellBrowserMainDelegate()
+ virtual content::ContentBrowserClient* CreateShellContentBrowserClient()
OVERRIDE {
- return new AthenaBrowserMainDelegate();
+ return new AthenaContentBrowserClient();
}
virtual scoped_ptr<apps::ShellRendererMainDelegate>
« no previous file with comments | « apps/shell/app/shell_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698