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

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

Issue 2400243002: Remove grow box rect support, browser part. (Closed)
Patch Set: . Created 4 years, 2 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
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_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 #if defined(OS_MACOSX) 1363 #if defined(OS_MACOSX)
1364 view->SetActive(true); 1364 view->SetActive(true);
1365 #endif 1365 #endif
1366 } 1366 }
1367 } 1367 }
1368 1368
1369 SendPageMessage(new PageMsg_WasShown(MSG_ROUTING_NONE)); 1369 SendPageMessage(new PageMsg_WasShown(MSG_ROUTING_NONE));
1370 1370
1371 last_active_time_ = base::TimeTicks::Now(); 1371 last_active_time_ = base::TimeTicks::Now();
1372 1372
1373 // The resize rect might have changed while this was inactive -- send the new
1374 // one to make sure it's up to date.
1375 RenderViewHostImpl* rvh = GetRenderViewHost();
1376 if (rvh) {
1377 rvh->GetWidget()->ResizeRectChanged(
1378 GetRootWindowResizerRect(rvh->GetWidget()));
1379 }
1380
1381 FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasShown()); 1373 FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasShown());
1382 1374
1383 should_normally_be_visible_ = true; 1375 should_normally_be_visible_ = true;
1384 } 1376 }
1385 1377
1386 void WebContentsImpl::WasHidden() { 1378 void WebContentsImpl::WasHidden() {
1387 // If there are entities capturing screenshots or video (e.g., mirroring), 1379 // If there are entities capturing screenshots or video (e.g., mirroring),
1388 // don't activate the "disable rendering" optimization. 1380 // don't activate the "disable rendering" optimization.
1389 if (capturer_count_ == 0) { 1381 if (capturer_count_ == 0) {
1390 // |GetRenderViewHost()| can be NULL if the user middle clicks a link to 1382 // |GetRenderViewHost()| can be NULL if the user middle clicks a link to
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
4216 4208
4217 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { 4209 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() {
4218 return render_view_host_delegate_view_; 4210 return render_view_host_delegate_view_;
4219 } 4211 }
4220 4212
4221 RendererPreferences WebContentsImpl::GetRendererPrefs( 4213 RendererPreferences WebContentsImpl::GetRendererPrefs(
4222 BrowserContext* browser_context) const { 4214 BrowserContext* browser_context) const {
4223 return renderer_preferences_; 4215 return renderer_preferences_;
4224 } 4216 }
4225 4217
4226 gfx::Rect WebContentsImpl::GetRootWindowResizerRect(
4227 RenderWidgetHostImpl* render_widget_host) const {
4228 if (!RenderViewHostImpl::From(render_widget_host))
4229 return gfx::Rect();
4230
4231 if (delegate_)
4232 return delegate_->GetRootWindowResizerRect();
4233 return gfx::Rect();
4234 }
4235
4236 void WebContentsImpl::RemoveBrowserPluginEmbedder() { 4218 void WebContentsImpl::RemoveBrowserPluginEmbedder() {
4237 if (browser_plugin_embedder_) 4219 if (browser_plugin_embedder_)
4238 browser_plugin_embedder_.reset(); 4220 browser_plugin_embedder_.reset();
4239 } 4221 }
4240 4222
4241 WebContentsImpl* WebContentsImpl::GetOuterWebContents() { 4223 WebContentsImpl* WebContentsImpl::GetOuterWebContents() {
4242 if (GuestMode::IsCrossProcessFrameGuest(this) && node_) 4224 if (GuestMode::IsCrossProcessFrameGuest(this) && node_)
4243 return node_->outer_web_contents(); 4225 return node_->outer_web_contents();
4244 4226
4245 if (browser_plugin_guest_) 4227 if (browser_plugin_guest_)
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
5272 dialog_manager_ = dialog_manager; 5254 dialog_manager_ = dialog_manager;
5273 } 5255 }
5274 5256
5275 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5257 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5276 auto it = binding_sets_.find(interface_name); 5258 auto it = binding_sets_.find(interface_name);
5277 if (it != binding_sets_.end()) 5259 if (it != binding_sets_.end())
5278 binding_sets_.erase(it); 5260 binding_sets_.erase(it);
5279 } 5261 }
5280 5262
5281 } // namespace content 5263 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698