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