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

Side by Side Diff: Source/web/WebFrameWidgetImpl.cpp

Issue 1310063002: Snapshot a pointer to the main frame when creating WebViewFrameWidget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Futureproof Created 5 years, 4 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 | « no previous file | Source/web/WebViewFrameWidget.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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 namespace blink { 58 namespace blink {
59 59
60 // WebFrameWidget -------------------------------------------------------------- -- 60 // WebFrameWidget -------------------------------------------------------------- --
61 61
62 WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client, WebLocalFrame* l ocalRoot) 62 WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client, WebLocalFrame* l ocalRoot)
63 { 63 {
64 // Pass the WebFrameWidget's self-reference to the caller. 64 // Pass the WebFrameWidget's self-reference to the caller.
65 return WebFrameWidgetImpl::create(client, localRoot); 65 return WebFrameWidgetImpl::create(client, localRoot);
66 } 66 }
67 67
68 WebFrameWidget* WebFrameWidget::create(WebView* webView) 68 WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client, WebView* webView , WebLocalFrame* mainFrame)
69 { 69 {
70 return new WebViewFrameWidget(*toWebViewImpl(webView)); 70 return new WebViewFrameWidget(client, toWebViewImpl(*webView), toWebLocalFra meImpl(*mainFrame));
71 } 71 }
72 72
73 WebFrameWidgetImpl* WebFrameWidgetImpl::create(WebWidgetClient* client, WebLocal Frame* localRoot) 73 WebFrameWidgetImpl* WebFrameWidgetImpl::create(WebWidgetClient* client, WebLocal Frame* localRoot)
74 { 74 {
75 // Pass the WebFrameWidgetImpl's self-reference to the caller. 75 // Pass the WebFrameWidgetImpl's self-reference to the caller.
76 return adoptRef(new WebFrameWidgetImpl(client, localRoot)).leakRef(); 76 return adoptRef(new WebFrameWidgetImpl(client, localRoot)).leakRef();
77 } 77 }
78 78
79 // static 79 // static
80 HashSet<WebFrameWidgetImpl*>& WebFrameWidgetImpl::allInstances() 80 HashSet<WebFrameWidgetImpl*>& WebFrameWidgetImpl::allInstances()
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 // correspond to Page visibility, but is necessary until we properly sort ou t OOPIF visibility. 1029 // correspond to Page visibility, but is necessary until we properly sort ou t OOPIF visibility.
1030 page()->setVisibilityState(static_cast<PageVisibilityState>(visibilityState) , isInitialState); 1030 page()->setVisibilityState(static_cast<PageVisibilityState>(visibilityState) , isInitialState);
1031 1031
1032 if (m_layerTreeView) { 1032 if (m_layerTreeView) {
1033 bool visible = visibilityState == WebPageVisibilityStateVisible; 1033 bool visible = visibilityState == WebPageVisibilityStateVisible;
1034 m_layerTreeView->setVisible(visible); 1034 m_layerTreeView->setVisible(visible);
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 } // namespace blink 1038 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebViewFrameWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698