summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-18 01:23:50 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-18 01:23:50 +0000
commit57d029dbc30fea166f628864a232bae1f36151aa (patch)
treeeb89e9ef8cae8789b779563afd67b9e112840e56
parent91df5d511453fa83ea3806d8bc3baad981641174 (diff)
downloadchromium_src-57d029dbc30fea166f628864a232bae1f36151aa.zip
chromium_src-57d029dbc30fea166f628864a232bae1f36151aa.tar.gz
chromium_src-57d029dbc30fea166f628864a232bae1f36151aa.tar.bz2
Port app_shell to linux aura
This turns out to be trivial and will allow non-chromeos developers to play with app_shell more easily. It's aura-only because we have some views UI code that isn't worth porting to GTK. BUG=332981 TEST=Build app_shell on linux with use_aura=1, it launches normally Review URL: https://codereview.chromium.org/130433015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245699 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/apps.gypi2
-rw-r--r--apps/shell/shell_browser_main_parts.cc11
2 files changed, 11 insertions, 2 deletions
diff --git a/apps/apps.gypi b/apps/apps.gypi
index ba6b52c..bcb458c 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -97,7 +97,7 @@
},
], # targets
'conditions': [
- ['chromeos==1', {
+ ['chromeos==1 or (OS=="linux" and use_aura==1)', {
'targets': [
{
'target_name': 'app_shell',
diff --git a/apps/shell/shell_browser_main_parts.cc b/apps/shell/shell_browser_main_parts.cc
index 137ab0a..2654e51 100644
--- a/apps/shell/shell_browser_main_parts.cc
+++ b/apps/shell/shell_browser_main_parts.cc
@@ -15,17 +15,21 @@
#include "base/run_loop.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/common/chrome_paths.h"
-#include "chromeos/chromeos_paths.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
#include "content/public/common/result_codes.h"
#include "extensions/common/extension_paths.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/test/test_screen.h"
+#include "ui/base/ime/input_method_initializer.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/screen.h"
#include "ui/wm/test/wm_test_helper.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/chromeos_paths.h"
+#endif
+
using content::BrowserContext;
using extensions::Extension;
using extensions::ExtensionSystem;
@@ -70,7 +74,9 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
// NOTE: Much of this is culled from chrome/test/base/chrome_test_suite.cc
// Set up all the paths to load files.
chrome::RegisterPathProvider();
+#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
+#endif
extensions::RegisterPathProvider();
// The extensions system needs manifest data from the Chrome PAK file.
@@ -142,6 +148,8 @@ void ShellBrowserMainParts::CreateRootWindow() {
test_screen_.reset(aura::TestScreen::Create());
// TODO(jamescook): Replace this with a real Screen implementation.
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
+ // TODO(jamescook): Initialize a real input method.
+ ui::InitializeInputMethodForTesting();
// Set up basic pieces of views::corewm.
wm_test_helper_.reset(new wm::WMTestHelper(gfx::Size(800, 600)));
// Ensure the X window gets mapped.
@@ -154,6 +162,7 @@ void ShellBrowserMainParts::DestroyRootWindow() {
wm_test_helper_->root_window()->RemoveRootWindowObserver(this);
wm_test_helper_->root_window()->PrepareForShutdown();
wm_test_helper_.reset();
+ ui::ShutdownInputMethodForTesting();
}
void ShellBrowserMainParts::CreateExtensionSystem() {