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

Unified Diff: content/shell/shell_browser_main.cc

Issue 10035034: Implement the skeleton of an android content shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed drawable png as it was checked in separately. Created 8 years, 8 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
Index: content/shell/shell_browser_main.cc
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index f1343d9688711592a1db23d180b7ba1b6751dc6f..fb13b551fb3a2d167790c9d580280b84a23e4a24 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -5,6 +5,7 @@
#include "content/shell/shell_browser_main.h"
#include "base/command_line.h"
+#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_runner.h"
@@ -17,6 +18,12 @@
namespace {
GURL GetURLForLayoutTest(const char* test_name) {
+#if defined(OS_ANDROID)
+ // DumpRenderTree is not currently supported for Android using the content
+ // shell.
+ NOTIMPLEMENTED();
+ return GURL::EmptyGURL();
+#else
std::string path_or_url = test_name;
std::string pixel_hash;
std::string timeout;
@@ -38,6 +45,7 @@ GURL GetURLForLayoutTest(const char* test_name) {
webkit_support::SetCurrentDirectoryForFileURL(test_url);
}
return test_url;
+#endif
}
} // namespace
@@ -48,6 +56,14 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters) {
content::BrowserMainRunner::Create());
int exit_code = main_runner_->Initialize(parameters);
+
+#if defined(OS_ANDROID)
+ DCHECK(exit_code < 0);
+
+ // Return 0 so that we do NOT trigger the default behavior. On Android, the
+ // UI message loop is managed by the Java application.
+ return 0;
+#else
if (exit_code >= 0)
return exit_code;
@@ -85,4 +101,5 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters) {
main_runner_->Shutdown();
return exit_code;
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698