summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorbshe <bshe@chromium.org>2015-05-29 06:30:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-29 13:31:29 +0000
commit55f777c655f8786a122a0faa56c706c14771d26b (patch)
treeb0cfccfbfadae6916e74a7f052f3d4fddb5ddb2b /extensions
parenta4a4b8eb8274e627f101888a53f1a7b30e2d294d (diff)
downloadchromium_src-55f777c655f8786a122a0faa56c706c14771d26b.zip
chromium_src-55f777c655f8786a122a0faa56c706c14771d26b.tar.gz
chromium_src-55f777c655f8786a122a0faa56c706c14771d26b.tar.bz2
Allow non fullscreen IME window in kiosk app
BUG=492669 Review URL: https://codereview.chromium.org/1160683004 Cr-Commit-Position: refs/heads/master@{#331958}
Diffstat (limited to 'extensions')
-rw-r--r--extensions/DEPS1
-rw-r--r--extensions/browser/api/app_window/app_window_api.cc4
-rw-r--r--extensions/browser/api/app_window/app_window_apitest.cc13
3 files changed, 17 insertions, 1 deletions
diff --git a/extensions/DEPS b/extensions/DEPS
index 8f8f7f2..cbab948 100644
--- a/extensions/DEPS
+++ b/extensions/DEPS
@@ -49,6 +49,7 @@ specific_include_rules = {
"+chrome/browser/extensions/test_extension_prefs.h",
"+chrome/browser/extensions/test_extension_system.h",
"+chrome/browser/ui/browser.h",
+ "+chrome/common/chrome_switches.h",
"+chrome/common/extensions/features/feature_channel.h",
"+chrome/test/base/chrome_render_view_test.h",
"+chrome/test/base/testing_profile.h",
diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
index 089f0fc..3901d34 100644
--- a/extensions/browser/api/app_window/app_window_api.cc
+++ b/extensions/browser/api/app_window/app_window_api.cc
@@ -335,8 +335,10 @@ bool AppWindowCreateFunction::RunAsync() {
AppWindowClient::Get()->CreateAppWindow(browser_context(), extension());
app_window->Init(url, new AppWindowContentsImpl(app_window), create_params);
- if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode())
+ if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode() &&
+ !app_window->is_ime_window()) {
app_window->ForcedFullscreen();
+ }
content::RenderViewHost* created_view =
app_window->web_contents()->GetRenderViewHost();
diff --git a/extensions/browser/api/app_window/app_window_apitest.cc b/extensions/browser/api/app_window/app_window_apitest.cc
index 9fb4422..6aa666d 100644
--- a/extensions/browser/api/app_window/app_window_apitest.cc
+++ b/extensions/browser/api/app_window/app_window_apitest.cc
@@ -6,6 +6,7 @@
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/apps/app_browsertest_util.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/features/feature_channel.h"
#include "chrome/test/base/testing_profile.h"
#include "extensions/browser/app_window/app_window.h"
@@ -198,6 +199,18 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
"platform_apps/windows_api_ime/no_permissions_platform_app"))
<< message_;
}
+
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
+ WindowsApiImeWindowNotFullscreen) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->AppendSwitch(switches::kForceAppMode);
+ command_line->AppendSwitchASCII(switches::kAppId,
+ "jkghodnilhceideoidjikpgommlajknk");
+
+ EXPECT_TRUE(RunComponentExtensionTest(
+ "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen"))
+ << message_;
+}
#endif // OS_CHROMEOS
} // namespace extensions