Add ICU message format support
[chromium-blink-merge.git] / content / shell / browser / shell_aura.cc
blobedc83efe36d24aab7a38c95e9c74694ce79d0176
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/browser/shell.h"
7 #include "content/public/browser/web_contents.h"
8 #include "content/shell/browser/shell_platform_data_aura.h"
9 #include "ui/aura/env.h"
10 #include "ui/aura/test/test_screen.h"
11 #include "ui/aura/window.h"
12 #include "ui/aura/window_event_dispatcher.h"
14 namespace content {
16 // static
17 void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
18 CHECK(!platform_);
19 aura::TestScreen* screen = aura::TestScreen::Create(gfx::Size());
20 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen);
21 platform_ = new ShellPlatformDataAura(default_window_size);
24 void Shell::PlatformExit() {
25 CHECK(platform_);
26 delete platform_;
27 platform_ = NULL;
28 aura::Env::DeleteInstance();
31 void Shell::PlatformCleanUp() {
34 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
37 void Shell::PlatformSetAddressBarURL(const GURL& url) {
40 void Shell::PlatformSetIsLoading(bool loading) {
43 void Shell::PlatformCreateWindow(int width, int height) {
44 CHECK(platform_);
45 if (!headless_)
46 platform_->ShowWindow();
47 platform_->ResizeWindow(gfx::Size(width, height));
50 void Shell::PlatformSetContents() {
51 CHECK(platform_);
52 aura::Window* content = web_contents_->GetNativeView();
53 aura::Window* parent = platform_->host()->window();
54 if (!parent->Contains(content))
55 parent->AddChild(content);
57 content->Show();
60 void Shell::PlatformResizeSubViews() {
63 void Shell::Close() {
64 delete this;
67 void Shell::PlatformSetTitle(const base::string16& title) {
70 bool Shell::PlatformHandleContextMenu(
71 const content::ContextMenuParams& params) {
72 return false;
75 } // namespace content