Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 10210005: Ash/aura split: NativeWidgetAura::GetWindowScreenBounds() should return screen bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky+oshima stuff Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/root_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/renderer_host/render_view_host_factory.h" 8 #include "content/browser/renderer_host/render_view_host_factory.h"
9 #include "content/browser/web_contents/interstitial_page_impl.h" 9 #include "content/browser/web_contents/interstitial_page_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 gfx::NativeView WebContentsViewAura::GetContentNativeView() const { 250 gfx::NativeView WebContentsViewAura::GetContentNativeView() const {
251 return view_->GetNativeView(); 251 return view_->GetNativeView();
252 } 252 }
253 253
254 gfx::NativeWindow WebContentsViewAura::GetTopLevelNativeWindow() const { 254 gfx::NativeWindow WebContentsViewAura::GetTopLevelNativeWindow() const {
255 return window_->GetToplevelWindow(); 255 return window_->GetToplevelWindow();
256 } 256 }
257 257
258 void WebContentsViewAura::GetContainerBounds(gfx::Rect *out) const { 258 void WebContentsViewAura::GetContainerBounds(gfx::Rect *out) const {
259 *out = window_->GetScreenBounds(); 259 *out = window_->GetBoundsInRootWindow();
260 } 260 }
261 261
262 void WebContentsViewAura::SetPageTitle(const string16& title) { 262 void WebContentsViewAura::SetPageTitle(const string16& title) {
263 window_->set_title(title); 263 window_->set_title(title);
264 } 264 }
265 265
266 void WebContentsViewAura::OnTabCrashed(base::TerminationStatus status, 266 void WebContentsViewAura::OnTabCrashed(base::TerminationStatus status,
267 int error_code) { 267 int error_code) {
268 view_ = NULL; 268 view_ = NULL;
269 } 269 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 337
338 bool WebContentsViewAura::IsEventTracking() const { 338 bool WebContentsViewAura::IsEventTracking() const {
339 return false; 339 return false;
340 } 340 }
341 341
342 void WebContentsViewAura::CloseTabAfterEventTracking() { 342 void WebContentsViewAura::CloseTabAfterEventTracking() {
343 } 343 }
344 344
345 void WebContentsViewAura::GetViewBounds(gfx::Rect* out) const { 345 void WebContentsViewAura::GetViewBounds(gfx::Rect* out) const {
346 *out = window_->GetScreenBounds(); 346 *out = window_->GetBoundsInRootWindow();
347 } 347 }
348 348
349 //////////////////////////////////////////////////////////////////////////////// 349 ////////////////////////////////////////////////////////////////////////////////
350 // WebContentsViewAura, RenderViewHostDelegate::View implementation: 350 // WebContentsViewAura, RenderViewHostDelegate::View implementation:
351 351
352 void WebContentsViewAura::CreateNewWindow( 352 void WebContentsViewAura::CreateNewWindow(
353 int route_id, 353 int route_id,
354 const ViewHostMsg_CreateWindow_Params& params) { 354 const ViewHostMsg_CreateWindow_Params& params) {
355 web_contents_view_helper_.CreateNewWindow(web_contents_, route_id, params); 355 web_contents_view_helper_.CreateNewWindow(web_contents_, route_id, params);
356 } 356 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 592 }
593 593
594 int WebContentsViewAura::OnPerformDrop(const aura::DropTargetEvent& event) { 594 int WebContentsViewAura::OnPerformDrop(const aura::DropTargetEvent& event) {
595 web_contents_->GetRenderViewHost()->DragTargetDrop( 595 web_contents_->GetRenderViewHost()->DragTargetDrop(
596 event.location(), 596 event.location(),
597 GetNativeView()->GetRootWindow()->last_mouse_location()); 597 GetNativeView()->GetRootWindow()->last_mouse_location());
598 if (GetDragDestDelegate()) 598 if (GetDragDestDelegate())
599 GetDragDestDelegate()->OnDrop(); 599 GetDragDestDelegate()->OnDrop();
600 return current_drag_op_; 600 return current_drag_op_;
601 } 601 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698