| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
| 6 | 6 |
| 7 #include "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
| 8 #include "content/shell/browser/shell_platform_data_aura.h" | 8 #include "content/shell/browser/shell_platform_data_aura.h" |
| 9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
| 10 #include "ui/aura/test/test_screen.h" | 10 #include "ui/aura/test/test_screen.h" |
| 11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
| 12 #include "ui/aura/window_event_dispatcher.h" | 12 #include "ui/aura/window_event_dispatcher.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { | 17 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { |
| 18 CHECK(!platform_); | 18 CHECK(!platform_); |
| 19 aura::TestScreen* screen = aura::TestScreen::Create(gfx::Size()); | 19 aura::TestScreen* screen = aura::TestScreen::Create(gfx::Size()); |
| 20 gfx::Screen::SetScreenInstance(screen); | 20 gfx::Screen::SetScreenInstance(screen); |
| 21 platform_ = new ShellPlatformDataAura(default_window_size); | 21 platform_ = new ShellPlatformDataAura(default_window_size); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void Shell::PlatformExit() { | 24 void Shell::PlatformExit() { |
| 25 CHECK(platform_); | 25 CHECK(platform_); |
| 26 delete platform_; | 26 delete platform_; |
| 27 platform_ = NULL; | 27 platform_ = NULL; |
| 28 aura::Env::DeleteInstance(); | |
| 29 } | 28 } |
| 30 | 29 |
| 31 void Shell::PlatformCleanUp() { | 30 void Shell::PlatformCleanUp() { |
| 32 } | 31 } |
| 33 | 32 |
| 34 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { | 33 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
| 35 } | 34 } |
| 36 | 35 |
| 37 void Shell::PlatformSetAddressBarURL(const GURL& url) { | 36 void Shell::PlatformSetAddressBarURL(const GURL& url) { |
| 38 } | 37 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 66 | 65 |
| 67 void Shell::PlatformSetTitle(const base::string16& title) { | 66 void Shell::PlatformSetTitle(const base::string16& title) { |
| 68 } | 67 } |
| 69 | 68 |
| 70 bool Shell::PlatformHandleContextMenu( | 69 bool Shell::PlatformHandleContextMenu( |
| 71 const content::ContextMenuParams& params) { | 70 const content::ContextMenuParams& params) { |
| 72 return false; | 71 return false; |
| 73 } | 72 } |
| 74 | 73 |
| 75 } // namespace content | 74 } // namespace content |
| OLD | NEW |