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

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

Issue 2474323002: Implement WebContentsViewChildFrame::TakeFocus. (Closed)
Patch Set: Conflicted with my own cl https://codereview.chromium.org/2455133005/ Created 4 years, 1 month 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // javascript: URLs that load into the DOMWindow before the first page 148 // javascript: URLs that load into the DOMWindow before the first page
149 // load. This is not safe to do in any context that a web page could get a 149 // load. This is not safe to do in any context that a web page could get a
150 // reference to the DOMWindow before the first page load. 150 // reference to the DOMWindow before the first page load.
151 bool CreateRenderViewForInitialEmptyDocument(); 151 bool CreateRenderViewForInitialEmptyDocument();
152 #endif 152 #endif
153 153
154 // Expose the render manager for testing. 154 // Expose the render manager for testing.
155 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. 155 // TODO(creis): Remove this now that we can get to it via FrameTreeNode.
156 RenderFrameHostManager* GetRenderManagerForTesting(); 156 RenderFrameHostManager* GetRenderManagerForTesting();
157 157
158 // TODO(creis): This should take in a FrameTreeNode to know which node's
159 // render manager to return. For now, we just return the root's.
160 RenderFrameHostManager* GetRenderManager() const;
161
158 // Returns the outer WebContents of this WebContents if any. 162 // Returns the outer WebContents of this WebContents if any.
159 // Note that without --site-per-process, this will return the WebContents 163 // Note that without --site-per-process, this will return the WebContents
160 // of the BrowserPluginEmbedder, if |this| is a guest. 164 // of the BrowserPluginEmbedder, if |this| is a guest.
161 WebContentsImpl* GetOuterWebContents(); 165 WebContentsImpl* GetOuterWebContents();
162 166
163 // Returns guest browser plugin object, or NULL if this WebContents is not a 167 // Returns guest browser plugin object, or NULL if this WebContents is not a
164 // guest. 168 // guest.
165 BrowserPluginGuest* GetBrowserPluginGuest() const; 169 BrowserPluginGuest* GetBrowserPluginGuest() const;
166 170
167 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents 171 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 int history_offset, 1107 int history_offset,
1104 int history_length); 1108 int history_length);
1105 1109
1106 // Helper functions for sending notifications. 1110 // Helper functions for sending notifications.
1107 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); 1111 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host);
1108 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host); 1112 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host);
1109 void NotifyDisconnected(); 1113 void NotifyDisconnected();
1110 1114
1111 void SetEncoding(const std::string& encoding); 1115 void SetEncoding(const std::string& encoding);
1112 1116
1113 // TODO(creis): This should take in a FrameTreeNode to know which node's
1114 // render manager to return. For now, we just return the root's.
1115 RenderFrameHostManager* GetRenderManager() const;
1116
1117 // Removes browser plugin embedder if there is one. 1117 // Removes browser plugin embedder if there is one.
1118 void RemoveBrowserPluginEmbedder(); 1118 void RemoveBrowserPluginEmbedder();
1119 1119
1120 // Helper function to invoke WebContentsDelegate::GetSizeForNewRenderView(). 1120 // Helper function to invoke WebContentsDelegate::GetSizeForNewRenderView().
1121 gfx::Size GetSizeForNewRenderView(); 1121 gfx::Size GetSizeForNewRenderView();
1122 1122
1123 void OnFrameRemoved(RenderFrameHost* render_frame_host); 1123 void OnFrameRemoved(RenderFrameHost* render_frame_host);
1124 1124
1125 // Helper method that's called whenever |preferred_size_| or 1125 // Helper method that's called whenever |preferred_size_| or
1126 // |preferred_size_for_capture_| changes, to propagate the new value to the 1126 // |preferred_size_for_capture_| changes, to propagate the new value to the
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 // Adds/removes a callback called on creation of each new WebContents. 1493 // Adds/removes a callback called on creation of each new WebContents.
1494 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1494 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1495 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1495 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1496 1496
1497 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1497 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1498 }; 1498 };
1499 1499
1500 } // namespace content 1500 } // namespace content
1501 1501
1502 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1502 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698