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

Side by Side Diff: content/public/renderer/render_view.h

Issue 11316160: app.window: Replace linear view search with direct lookup. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: render_view_impl: Changed the FromRoutingID function into static method RenderViewImpl::FromRouting… Created 8 years 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_PUBLIC_RENDERER_RENDER_VIEW_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 29 matching lines...) Expand all
40 40
41 class ContextMenuClient; 41 class ContextMenuClient;
42 class RenderViewVisitor; 42 class RenderViewVisitor;
43 struct ContextMenuParams; 43 struct ContextMenuParams;
44 44
45 class CONTENT_EXPORT RenderView : public IPC::Sender { 45 class CONTENT_EXPORT RenderView : public IPC::Sender {
46 public: 46 public:
47 // Returns the RenderView containing the given WebView. 47 // Returns the RenderView containing the given WebView.
48 static RenderView* FromWebView(WebKit::WebView* webview); 48 static RenderView* FromWebView(WebKit::WebView* webview);
49 49
50 // Returns the RenderView for the given routing ID.
51 static RenderView* FromRoutingID(int routing_id);
52
50 // Visit all RenderViews with a live WebView (i.e., RenderViews that have 53 // Visit all RenderViews with a live WebView (i.e., RenderViews that have
51 // been closed but not yet destroyed are excluded). 54 // been closed but not yet destroyed are excluded).
52 static void ForEach(RenderViewVisitor* visitor); 55 static void ForEach(RenderViewVisitor* visitor);
53 56
54 // Get the routing ID of the view. 57 // Get the routing ID of the view.
55 virtual int GetRoutingID() const = 0; 58 virtual int GetRoutingID() const = 0;
56 59
57 // Page IDs allow the browser to identify pages in each renderer process for 60 // Page IDs allow the browser to identify pages in each renderer process for
58 // keeping back/forward history in sync. 61 // keeping back/forward history in sync.
59 // Note that this is NOT updated for every main frame navigation, only for 62 // Note that this is NOT updated for every main frame navigation, only for
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const std::string& value) = 0; 159 const std::string& value) = 0;
157 virtual void ClearEditCommands() = 0; 160 virtual void ClearEditCommands() = 0;
158 161
159 protected: 162 protected:
160 virtual ~RenderView() {} 163 virtual ~RenderView() {}
161 }; 164 };
162 165
163 } // namespace content 166 } // namespace content
164 167
165 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ 168 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/app_window_custom_bindings.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698