Reland the ULONG -> SIZE_T change from 317177
[chromium-blink-merge.git] / extensions / renderer / tab_finder.h
blob4d326aadd46f1188b1db05e80cd9d88e7ad5a3dc
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_RENDERER_TAB_FINDER_H_
6 #define EXTENSIONS_RENDERER_TAB_FINDER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/public/renderer/render_view_visitor.h"
12 namespace content {
13 class RenderView;
16 namespace extensions {
18 // Finds the top RenderView associated with a tab ID.
19 class TabFinder : public content::RenderViewVisitor {
20 public:
21 // Returns the top RenderView with |tab_id|, or NULL if none is found.
22 static content::RenderView* Find(int tab_id);
24 private:
25 explicit TabFinder(int tab_id);
26 ~TabFinder() override;
28 // content::RenderViewVisitor implementation.
29 bool Visit(content::RenderView* render_view) override;
31 int tab_id_;
32 content::RenderView* view_;
34 DISALLOW_COPY_AND_ASSIGN(TabFinder);
37 } // namespace extensions
39 #endif // EXTENSIONS_RENDERER_TAB_FINDER_H_