| 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" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 CHECK(platform_); | 44 CHECK(platform_); |
| 45 if (!headless_) | 45 if (!headless_) |
| 46 platform_->ShowWindow(); | 46 platform_->ShowWindow(); |
| 47 platform_->ResizeWindow(gfx::Size(width, height)); | 47 platform_->ResizeWindow(gfx::Size(width, height)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void Shell::PlatformSetContents() { | 50 void Shell::PlatformSetContents() { |
| 51 CHECK(platform_); | 51 CHECK(platform_); |
| 52 aura::Window* content = web_contents_->GetNativeView(); | 52 aura::Window* content = web_contents_->GetNativeView(); |
| 53 aura::Window* parent = platform_->host()->window(); | 53 aura::Window* parent = platform_->host()->window(); |
| 54 if (parent->Contains(content)) | 54 if (!parent->Contains(content)) |
| 55 return; | 55 parent->AddChild(content); |
| 56 parent->AddChild(content); | 56 |
| 57 content->Show(); | 57 content->Show(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void Shell::PlatformResizeSubViews() { | 60 void Shell::PlatformResizeSubViews() { |
| 61 } | 61 } |
| 62 | 62 |
| 63 void Shell::Close() { | 63 void Shell::Close() { |
| 64 delete this; | 64 delete this; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void Shell::PlatformSetTitle(const base::string16& title) { | 67 void Shell::PlatformSetTitle(const base::string16& title) { |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool Shell::PlatformHandleContextMenu( | 70 bool Shell::PlatformHandleContextMenu( |
| 71 const content::ContextMenuParams& params) { | 71 const content::ContextMenuParams& params) { |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace content | 75 } // namespace content |
| OLD | NEW |