[chromium-style] move methods out of headers
This commit is contained in:
parent
f1587da480
commit
27cee90e5e
10 changed files with 45 additions and 22 deletions
|
@ -155,6 +155,10 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
Show();
|
||||
}
|
||||
|
||||
bool NativeWindow::IsClosed() const {
|
||||
return is_closed_;
|
||||
}
|
||||
|
||||
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
|
||||
SetBounds(gfx::Rect(GetPosition(), size), animate);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class NativeWindow : public base::SupportsUserData {
|
|||
|
||||
virtual void Close() = 0;
|
||||
virtual void CloseImmediately() = 0;
|
||||
virtual bool IsClosed() const { return is_closed_; }
|
||||
virtual bool IsClosed() const;
|
||||
virtual void Focus(bool focus) = 0;
|
||||
virtual bool IsFocused() = 0;
|
||||
virtual void Show() = 0;
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
|
||||
namespace atom {
|
||||
|
||||
bool AtomMenuModel::Delegate::GetAcceleratorForCommandId(int command_id,
|
||||
ui::Accelerator* accelerator) const {
|
||||
return GetAcceleratorForCommandIdWithParams(
|
||||
command_id, false, accelerator);
|
||||
}
|
||||
|
||||
AtomMenuModel::AtomMenuModel(Delegate* delegate)
|
||||
: ui::SimpleMenuModel(delegate), delegate_(delegate) {}
|
||||
|
||||
|
|
|
@ -26,10 +26,7 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
private:
|
||||
// ui::SimpleMenuModel::Delegate:
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
ui::Accelerator* accelerator) const {
|
||||
return GetAcceleratorForCommandIdWithParams(command_id, false,
|
||||
accelerator);
|
||||
}
|
||||
ui::Accelerator* accelerator) const override;
|
||||
};
|
||||
|
||||
class Observer {
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
|
||||
namespace atom {
|
||||
|
||||
void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
||||
node_data->role = ui::AX_ROLE_MENU_ITEM;
|
||||
node_data->SetName(suggestion_);
|
||||
}
|
||||
|
||||
AutofillPopupView::AutofillPopupView(AutofillPopup* popup,
|
||||
views::Widget* parent_widget)
|
||||
: popup_(popup),
|
||||
|
@ -128,6 +133,16 @@ void AutofillPopupView::OnSuggestionsChanged() {
|
|||
DoUpdateBoundsAndRedrawPopup();
|
||||
}
|
||||
|
||||
int AutofillPopupView::GetDragOperationsForView(
|
||||
views::View*, const gfx::Point&) {
|
||||
return ui::DragDropTypes::DRAG_NONE;
|
||||
}
|
||||
|
||||
bool AutofillPopupView::CanStartDragForView(
|
||||
views::View*, const gfx::Point&, const gfx::Point&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void AutofillPopupView::OnSelectedRowChanged(
|
||||
base::Optional<int> previous_row_selection,
|
||||
base::Optional<int> current_row_selection) {
|
||||
|
|
|
@ -42,10 +42,7 @@ class AutofillPopupChildView : public views::View {
|
|||
~AutofillPopupChildView() override {}
|
||||
|
||||
// views::Views implementation
|
||||
void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
|
||||
node_data->role = ui::AX_ROLE_MENU_ITEM;
|
||||
node_data->SetName(suggestion_);
|
||||
}
|
||||
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
|
||||
|
||||
base::string16 suggestion_;
|
||||
|
||||
|
@ -70,15 +67,11 @@ class AutofillPopupView : public views::WidgetDelegateView,
|
|||
|
||||
void WriteDragDataForView(views::View*,
|
||||
const gfx::Point&,
|
||||
ui::OSExchangeData*) override {}
|
||||
int GetDragOperationsForView(views::View*, const gfx::Point&) override {
|
||||
return ui::DragDropTypes::DRAG_NONE;
|
||||
}
|
||||
ui::OSExchangeData*) override;
|
||||
int GetDragOperationsForView(views::View*, const gfx::Point&) override;
|
||||
bool CanStartDragForView(views::View*,
|
||||
const gfx::Point&,
|
||||
const gfx::Point&) override {
|
||||
return false;
|
||||
}
|
||||
const gfx::Point&) override;
|
||||
|
||||
private:
|
||||
friend class AutofillPopup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue