OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/web_contents/web_contents_view_mus.h" | 5 #include "content/browser/web_contents/web_contents_view_mus.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "components/mus/public/cpp/window.h" | 8 #include "components/mus/public/cpp/window.h" |
9 #include "components/mus/public/cpp/window_tree_connection.h" | 9 #include "components/mus/public/cpp/window_tree_client.h" |
10 #include "content/browser/frame_host/interstitial_page_impl.h" | 10 #include "content/browser/frame_host/interstitial_page_impl.h" |
11 #include "content/browser/renderer_host/render_widget_host_view_mus.h" | 11 #include "content/browser/renderer_host/render_widget_host_view_mus.h" |
12 #include "content/browser/web_contents/web_contents_impl.h" | 12 #include "content/browser/web_contents/web_contents_impl.h" |
13 #include "content/public/browser/render_widget_host_view.h" | 13 #include "content/public/browser/render_widget_host_view.h" |
14 #include "content/public/browser/web_contents_view_delegate.h" | 14 #include "content/public/browser/web_contents_view_delegate.h" |
15 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 15 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
16 #include "ui/aura/client/window_tree_client.h" | 16 #include "ui/aura/client/window_tree_client.h" |
17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
18 #include "ui/base/hit_test.h" | 18 #include "ui/base/hit_test.h" |
19 | 19 |
20 using blink::WebDragOperation; | 20 using blink::WebDragOperation; |
21 using blink::WebDragOperationsMask; | 21 using blink::WebDragOperationsMask; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 WebContentsViewMus::WebContentsViewMus( | 25 WebContentsViewMus::WebContentsViewMus( |
26 mus::Window* parent_window, | 26 mus::Window* parent_window, |
27 WebContentsImpl* web_contents, | 27 WebContentsImpl* web_contents, |
28 WebContentsViewDelegate* delegate, | 28 WebContentsViewDelegate* delegate, |
29 RenderViewHostDelegateView** delegate_view) | 29 RenderViewHostDelegateView** delegate_view) |
30 : web_contents_(web_contents), delegate_(delegate) { | 30 : web_contents_(web_contents), delegate_(delegate) { |
31 DCHECK(parent_window); | 31 DCHECK(parent_window); |
32 *delegate_view = this; | 32 *delegate_view = this; |
33 mus::Window* window = parent_window->connection()->NewWindow(); | 33 mus::Window* window = parent_window->window_tree()->NewWindow(); |
34 window->SetVisible(true); | 34 window->SetVisible(true); |
35 window->SetBounds(gfx::Rect(300, 300)); | 35 window->SetBounds(gfx::Rect(300, 300)); |
36 parent_window->AddChild(window); | 36 parent_window->AddChild(window); |
37 mus_window_.reset(new mus::ScopedWindowPtr(window)); | 37 mus_window_.reset(new mus::ScopedWindowPtr(window)); |
38 } | 38 } |
39 | 39 |
40 WebContentsViewMus::~WebContentsViewMus() {} | 40 WebContentsViewMus::~WebContentsViewMus() {} |
41 | 41 |
42 void WebContentsViewMus::SizeChangedCommon(const gfx::Size& size) { | 42 void WebContentsViewMus::SizeChangedCommon(const gfx::Size& size) { |
43 if (web_contents_->GetInterstitialPage()) | 43 if (web_contents_->GetInterstitialPage()) |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 void WebContentsViewMus::OnWindowTargetVisibilityChanged(bool visible) {} | 257 void WebContentsViewMus::OnWindowTargetVisibilityChanged(bool visible) {} |
258 | 258 |
259 bool WebContentsViewMus::HasHitTestMask() const { | 259 bool WebContentsViewMus::HasHitTestMask() const { |
260 return false; | 260 return false; |
261 } | 261 } |
262 | 262 |
263 void WebContentsViewMus::GetHitTestMask(gfx::Path* mask) const {} | 263 void WebContentsViewMus::GetHitTestMask(gfx::Path* mask) const {} |
264 | 264 |
265 } // namespace content | 265 } // namespace content |
OLD | NEW |