summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/render_view_context_menu.h
blob: 6c95f57737db3f6a175bc52146b9b6a3d56dfd79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2006-2008 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_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_

#include "chrome/views/menu.h"
#include "webkit/glue/context_node_types.h"

class Profile;

class RenderViewContextMenu : public Menu {
 public:
  RenderViewContextMenu(
      Menu::Delegate* delegate,
      HWND owner,
      ContextNode::Type type,
      const std::wstring& misspelled_word,
      const std::vector<std::wstring>& misspelled_word_suggestions,
      Profile* profile);

  virtual ~RenderViewContextMenu();

 private:
  void InitMenu(ContextNode::Type type);
  void AppendDeveloperItems();
  void AppendLinkItems();
  void AppendImageItems();
  void AppendPageItems();
  void AppendFrameItems();
  void AppendSelectionItems();
  void AppendEditableItems();

  std::wstring misspelled_word_;
  std::vector<std::wstring> misspelled_word_suggestions_;
  Profile* profile_;
  Menu* spellchecker_sub_menu_;

  DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
};

#endif  // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_