 Chromium Code Reviews
 Chromium Code Reviews Issue 1461243002:
  [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1461243002:
  [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 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/auto_reset.h" | 7 #include "base/auto_reset.h" | 
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" | 
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" | 
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" | 
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 children[i]->AddObserver(this); | 521 children[i]->AddObserver(this); | 
| 522 } | 522 } | 
| 523 } | 523 } | 
| 524 #endif | 524 #endif | 
| 525 } | 525 } | 
| 526 } | 526 } | 
| 527 | 527 | 
| 528 void OnWindowBoundsChanged(aura::Window* window, | 528 void OnWindowBoundsChanged(aura::Window* window, | 
| 529 const gfx::Rect& old_bounds, | 529 const gfx::Rect& old_bounds, | 
| 530 const gfx::Rect& new_bounds) override { | 530 const gfx::Rect& new_bounds) override { | 
| 531 fprintf(stderr, ">>>OnWindowBoundsChanged new_bounds(%d, %d, %d, %d)\n", | |
| 532 new_bounds.x(), new_bounds.y(), new_bounds.width(), new_bounds.height()) ; | |
| 
Fady Samuel
2015/11/24 04:42:38
Revert all of this.
 | |
| 531 if (window == host_window_ || window == view_->window_.get()) { | 533 if (window == host_window_ || window == view_->window_.get()) { | 
| 532 SendScreenRects(); | 534 SendScreenRects(); | 
| 533 if (old_bounds.origin() != new_bounds.origin()) { | 535 if (old_bounds.origin() != new_bounds.origin()) { | 
| 534 TouchSelectionControllerClientAura* selection_controller_client = | 536 TouchSelectionControllerClientAura* selection_controller_client = | 
| 535 view_->GetSelectionControllerClient(); | 537 view_->GetSelectionControllerClient(); | 
| 536 if (selection_controller_client) | 538 if (selection_controller_client) | 
| 537 selection_controller_client->OnWindowMoved(); | 539 selection_controller_client->OnWindowMoved(); | 
| 538 } | 540 } | 
| 539 #if defined(OS_WIN) | 541 #if defined(OS_WIN) | 
| 540 } else { | 542 } else { | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 | 668 | 
| 667 window_observer_.reset(); | 669 window_observer_.reset(); | 
| 668 window_->RemoveObserver(this); | 670 window_->RemoveObserver(this); | 
| 669 | 671 | 
| 670 // Window needs a valid delegate during its destructor, so we explicitly | 672 // Window needs a valid delegate during its destructor, so we explicitly | 
| 671 // delete it here. | 673 // delete it here. | 
| 672 window_.reset(); | 674 window_.reset(); | 
| 673 } | 675 } | 
| 674 | 676 | 
| 675 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { | 677 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { | 
| 678 fprintf(stderr, ">>>size: %d, %d\n", size.width(), size.height()); | |
| 676 if (web_contents_->GetInterstitialPage()) | 679 if (web_contents_->GetInterstitialPage()) | 
| 677 web_contents_->GetInterstitialPage()->SetSize(size); | 680 web_contents_->GetInterstitialPage()->SetSize(size); | 
| 678 RenderWidgetHostView* rwhv = | 681 RenderWidgetHostView* rwhv = | 
| 679 web_contents_->GetRenderWidgetHostView(); | 682 web_contents_->GetRenderWidgetHostView(); | 
| 680 if (rwhv) | 683 if (rwhv) | 
| 681 rwhv->SetSize(size); | 684 rwhv->SetSize(size); | 
| 682 } | 685 } | 
| 683 | 686 | 
| 684 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { | 687 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { | 
| 685 aura::Window* root_window = GetNativeView()->GetRootWindow(); | 688 aura::Window* root_window = GetNativeView()->GetRootWindow(); | 
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1095 gfx::Size WebContentsViewAura::GetMinimumSize() const { | 1098 gfx::Size WebContentsViewAura::GetMinimumSize() const { | 
| 1096 return gfx::Size(); | 1099 return gfx::Size(); | 
| 1097 } | 1100 } | 
| 1098 | 1101 | 
| 1099 gfx::Size WebContentsViewAura::GetMaximumSize() const { | 1102 gfx::Size WebContentsViewAura::GetMaximumSize() const { | 
| 1100 return gfx::Size(); | 1103 return gfx::Size(); | 
| 1101 } | 1104 } | 
| 1102 | 1105 | 
| 1103 void WebContentsViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 1106 void WebContentsViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 
| 1104 const gfx::Rect& new_bounds) { | 1107 const gfx::Rect& new_bounds) { | 
| 1108 fprintf(stderr, ">>>>%s new_bounds(%d, %d, %d, %d)\n", | |
| 1109 __PRETTY_FUNCTION__, new_bounds.x(), new_bounds.y(), | |
| 1110 new_bounds.width(), new_bounds.height()); | |
| 1105 SizeChangedCommon(new_bounds.size()); | 1111 SizeChangedCommon(new_bounds.size()); | 
| 1106 if (delegate_) | 1112 if (delegate_) | 
| 1107 delegate_->SizeChanged(new_bounds.size()); | 1113 delegate_->SizeChanged(new_bounds.size()); | 
| 1108 | 1114 | 
| 1109 // Constrained web dialogs, need to be kept centered over our content area. | 1115 // Constrained web dialogs, need to be kept centered over our content area. | 
| 1110 for (size_t i = 0; i < window_->children().size(); i++) { | 1116 for (size_t i = 0; i < window_->children().size(); i++) { | 
| 1111 if (window_->children()[i]->GetProperty( | 1117 if (window_->children()[i]->GetProperty( | 
| 1112 aura::client::kConstrainedWindowKey)) { | 1118 aura::client::kConstrainedWindowKey)) { | 
| 1113 gfx::Rect bounds = window_->children()[i]->bounds(); | 1119 gfx::Rect bounds = window_->children()[i]->bounds(); | 
| 1114 bounds.set_origin( | 1120 bounds.set_origin( | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 if (visible) { | 1322 if (visible) { | 
| 1317 if (!web_contents_->should_normally_be_visible()) | 1323 if (!web_contents_->should_normally_be_visible()) | 
| 1318 web_contents_->WasShown(); | 1324 web_contents_->WasShown(); | 
| 1319 } else { | 1325 } else { | 
| 1320 if (web_contents_->should_normally_be_visible()) | 1326 if (web_contents_->should_normally_be_visible()) | 
| 1321 web_contents_->WasHidden(); | 1327 web_contents_->WasHidden(); | 
| 1322 } | 1328 } | 
| 1323 } | 1329 } | 
| 1324 | 1330 | 
| 1325 } // namespace content | 1331 } // namespace content | 
| OLD | NEW |