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

Unified Diff: chrome/renderer/extensions/tab_finder.h

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty -> is_empty Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/extensions/extension_helper.cc ('k') | chrome/renderer/extensions/tab_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/tab_finder.h
diff --git a/chrome/renderer/extensions/tab_finder.h b/chrome/renderer/extensions/tab_finder.h
new file mode 100644
index 0000000000000000000000000000000000000000..04cfacb281a94871ce6219fa16f63a036855535a
--- /dev/null
+++ b/chrome/renderer/extensions/tab_finder.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_EXTENSIONS_TAB_FINDER_H_
+#define CHROME_RENDERER_EXTENSIONS_TAB_FINDER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "content/public/renderer/render_view_visitor.h"
+
+namespace content {
+class RenderView;
+}
+
+namespace extensions {
+
+// Finds the top RenderView associated with a tab ID.
+class TabFinder : public content::RenderViewVisitor {
+ public:
+ // Returns the top RenderView with |tab_id|, or NULL if none is found.
+ static content::RenderView* Find(int tab_id);
+
+ private:
+ explicit TabFinder(int tab_id);
+ virtual ~TabFinder();
+
+ // content::RenderViewVisitor implementation.
+ virtual bool Visit(content::RenderView* render_view) OVERRIDE;
+
+ int tab_id_;
+ content::RenderView* view_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabFinder);
+};
+
+} // namespace extensions
+
+#endif // CHROME_RENDERER_EXTENSIONS_TAB_FINDER_H_
« no previous file with comments | « chrome/renderer/extensions/extension_helper.cc ('k') | chrome/renderer/extensions/tab_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698