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/public/browser/web_contents_view.h"
9 #include "content/shell/browser/shell_platform_data_aura.h"
10 #include "ui/aura/env.h"
11 #include "ui/aura/root_window.h"
12 #include "ui/aura/test/test_screen.h"
13 #include "ui/aura/window.h"
18 void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
20 aura::TestScreen* screen = aura::TestScreen::Create();
21 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen);
22 platform_ = new ShellPlatformDataAura(default_window_size);
25 void Shell::PlatformExit() {
29 aura::Env::DeleteInstance();
32 void Shell::PlatformCleanUp() {
35 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
38 void Shell::PlatformSetAddressBarURL(const GURL& url) {
41 void Shell::PlatformSetIsLoading(bool loading) {
44 void Shell::PlatformCreateWindow(int width, int height) {
47 platform_->ShowWindow();
48 platform_->ResizeWindow(gfx::Size(width, height));
51 void Shell::PlatformSetContents() {
53 aura::Window* content = web_contents_->GetView()->GetNativeView();
54 aura::Window* parent = platform_->window()->window();
55 if (parent->Contains(content))
57 parent->AddChild(content);
61 void Shell::PlatformResizeSubViews() {
68 void Shell::PlatformSetTitle(const base::string16& title) {
71 bool Shell::PlatformHandleContextMenu(
72 const content::ContextMenuParams& params) {
76 } // namespace content