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"
17 void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
19 aura::TestScreen* screen = aura::TestScreen::Create();
20 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen);
21 platform_ = new ShellPlatformDataAura(default_window_size);
24 void Shell::PlatformExit() {
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) {
46 platform_->ShowWindow();
47 platform_->ResizeWindow(gfx::Size(width, height));
50 void Shell::PlatformSetContents() {
52 aura::Window* content = web_contents_->GetNativeView();
53 aura::Window* parent = platform_->host()->window();
54 if (parent->Contains(content))
56 parent->AddChild(content);
60 void Shell::PlatformResizeSubViews() {
67 void Shell::PlatformSetTitle(const base::string16& title) {
70 bool Shell::PlatformHandleContextMenu(
71 const content::ContextMenuParams& params) {
75 } // namespace content