Separate common accelerator utils out.

This commit is contained in:
Cheng Zhao 2014-03-15 16:36:29 +08:00
parent 5e2c975758
commit e3a3c342de
6 changed files with 62 additions and 92 deletions

View file

@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "browser/native_window.h"
#include "browser/ui/accelerator_util.h"
#include "ui/gfx/size.h"
#include "ui/views/widget/widget_delegate.h"
@ -113,13 +114,6 @@ class NativeWindowWin : public NativeWindow,
// Register accelerators supported by the menu model.
void RegisterAccelerators();
// Generate a table that contains memu model's accelerators and command ids.
void GenerateAcceleratorTable();
// Helper to fill the accelerator table from the model.
void FillAcceleratorTable(AcceleratorTable* table,
ui::MenuModel* model);
scoped_ptr<views::Widget> window_;
views::WebView* web_view_; // managed by window_.
@ -127,7 +121,7 @@ class NativeWindowWin : public NativeWindow,
scoped_ptr<atom::Menu2> menu_;
// Map from accelerator to menu item's command id.
AcceleratorTable accelerator_table_;
accelerator_util::AcceleratorTable accelerator_table_;
scoped_ptr<SkRegion> draggable_region_;