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

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

Issue 10566009: app_list: Fix shadow bleeds over launcher button and steals mouse events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_demo compilation Created 8 years, 6 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
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/dip_util.h" 8 #include "content/browser/renderer_host/dip_util.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/web_contents/interstitial_page_impl.h" 10 #include "content/browser/web_contents/interstitial_page_impl.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 void WebContentsViewAura::SizeContents(const gfx::Size& size) { 317 void WebContentsViewAura::SizeContents(const gfx::Size& size) {
318 gfx::Rect bounds = window_->bounds(); 318 gfx::Rect bounds = window_->bounds();
319 if (bounds.size() != size) { 319 if (bounds.size() != size) {
320 bounds.set_size(size); 320 bounds.set_size(size);
321 window_->SetBounds(bounds); 321 window_->SetBounds(bounds);
322 } else { 322 } else {
323 // Our size matches what we want but the renderers size may not match. 323 // Our size matches what we want but the renderers size may not match.
324 // Pretend we were resized so that the renderers size is updated too. 324 // Pretend we were resized so that the renderers size is updated too.
325 SizeChangedCommon(size); 325 SizeChangedCommon(size);
326
327 } 326 }
328 } 327 }
329 328
330 void WebContentsViewAura::RenderViewCreated(content::RenderViewHost* host) { 329 void WebContentsViewAura::RenderViewCreated(content::RenderViewHost* host) {
331 } 330 }
332 331
333 void WebContentsViewAura::Focus() { 332 void WebContentsViewAura::Focus() {
334 if (web_contents_->GetInterstitialPage()) { 333 if (web_contents_->GetInterstitialPage()) {
335 web_contents_->GetInterstitialPage()->Focus(); 334 web_contents_->GetInterstitialPage()->Focus();
336 return; 335 return;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 550
552 void WebContentsViewAura::OnWindowDestroyed() { 551 void WebContentsViewAura::OnWindowDestroyed() {
553 } 552 }
554 553
555 void WebContentsViewAura::OnWindowVisibilityChanged(bool visible) { 554 void WebContentsViewAura::OnWindowVisibilityChanged(bool visible) {
556 if (visible) 555 if (visible)
557 web_contents_->ShowContents(); 556 web_contents_->ShowContents();
558 else 557 else
559 web_contents_->HideContents(); 558 web_contents_->HideContents();
560 } 559 }
560
561 bool WebContentsViewAura::HasHitTestMask() const {
562 return false;
563 }
564
565 void WebContentsViewAura::GetHitTestMask(gfx::Path* mask) const {
566 }
567
561 //////////////////////////////////////////////////////////////////////////////// 568 ////////////////////////////////////////////////////////////////////////////////
562 // WebContentsViewAura, aura::client::DragDropDelegate implementation: 569 // WebContentsViewAura, aura::client::DragDropDelegate implementation:
563 570
564 void WebContentsViewAura::OnDragEntered(const aura::DropTargetEvent& event) { 571 void WebContentsViewAura::OnDragEntered(const aura::DropTargetEvent& event) {
565 if (drag_dest_delegate_) 572 if (drag_dest_delegate_)
566 drag_dest_delegate_->DragInitialize(web_contents_); 573 drag_dest_delegate_->DragInitialize(web_contents_);
567 574
568 WebDropData drop_data; 575 WebDropData drop_data;
569 PrepareWebDropData(&drop_data, event.data()); 576 PrepareWebDropData(&drop_data, event.data());
570 WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); 577 WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 OnDragEntered(event); 623 OnDragEntered(event);
617 624
618 web_contents_->GetRenderViewHost()->DragTargetDrop( 625 web_contents_->GetRenderViewHost()->DragTargetDrop(
619 event.location(), 626 event.location(),
620 GetNativeView()->GetRootWindow()->last_mouse_location(), 627 GetNativeView()->GetRootWindow()->last_mouse_location(),
621 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 628 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
622 if (drag_dest_delegate_) 629 if (drag_dest_delegate_)
623 drag_dest_delegate_->OnDrop(); 630 drag_dest_delegate_->OnDrop();
624 return current_drag_op_; 631 return current_drag_op_;
625 } 632 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | ui/app_list/app_list_bubble_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698