summaryrefslogtreecommitdiffstats
path: root/ui/views/examples
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-10 19:29:04 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-10 19:29:04 +0000
commit0fe4c7993506c5c459949a6deabd6c62d39661ce (patch)
treea8d4fb52754a263e84702814c29403732397206f /ui/views/examples
parent1e3b940afe9fd1bd278185caa11cff77f86a65c5 (diff)
downloadchromium_src-0fe4c7993506c5c459949a6deabd6c62d39661ce.zip
chromium_src-0fe4c7993506c5c459949a6deabd6c62d39661ce.tar.gz
chromium_src-0fe4c7993506c5c459949a6deabd6c62d39661ce.tar.bz2
Replace views::Event with ui::Event.
http://crbug.com/125937 TBR=sky@chromium.org,jochen@chromium.org,sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10827271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/examples')
-rw-r--r--ui/views/examples/bubble_example.cc2
-rw-r--r--ui/views/examples/bubble_example.h2
-rw-r--r--ui/views/examples/button_example.cc2
-rw-r--r--ui/views/examples/button_example.h2
-rw-r--r--ui/views/examples/message_box_example.cc2
-rw-r--r--ui/views/examples/message_box_example.h2
-rw-r--r--ui/views/examples/native_theme_button_example.cc2
-rw-r--r--ui/views/examples/native_theme_button_example.h2
-rw-r--r--ui/views/examples/native_theme_checkbox_example.cc2
-rw-r--r--ui/views/examples/native_theme_checkbox_example.h2
-rw-r--r--ui/views/examples/progress_bar_example.cc2
-rw-r--r--ui/views/examples/progress_bar_example.h2
-rw-r--r--ui/views/examples/radio_button_example.cc2
-rw-r--r--ui/views/examples/radio_button_example.h2
-rw-r--r--ui/views/examples/scroll_view_example.cc2
-rw-r--r--ui/views/examples/scroll_view_example.h2
-rw-r--r--ui/views/examples/tabbed_pane_example.cc2
-rw-r--r--ui/views/examples/tabbed_pane_example.h2
-rw-r--r--ui/views/examples/table_example.cc2
-rw-r--r--ui/views/examples/table_example.h2
-rw-r--r--ui/views/examples/text_example.cc3
-rw-r--r--ui/views/examples/text_example.h2
-rw-r--r--ui/views/examples/textfield_example.cc3
-rw-r--r--ui/views/examples/textfield_example.h2
-rw-r--r--ui/views/examples/tree_view_example.cc2
-rw-r--r--ui/views/examples/tree_view_example.h2
-rw-r--r--ui/views/examples/widget_example.cc2
-rw-r--r--ui/views/examples/widget_example.h2
28 files changed, 28 insertions, 30 deletions
diff --git a/ui/views/examples/bubble_example.cc b/ui/views/examples/bubble_example.cc
index caa2457..841d177 100644
--- a/ui/views/examples/bubble_example.cc
+++ b/ui/views/examples/bubble_example.cc
@@ -71,7 +71,7 @@ void BubbleExample::CreateExampleView(View* container) {
container->AddChildView(fade_out_);
}
-void BubbleExample::ButtonPressed(Button* sender, const Event& event) {
+void BubbleExample::ButtonPressed(Button* sender, const ui::Event& event) {
BubbleConfig config;
if (sender == round_)
config = kRoundConfig;
diff --git a/ui/views/examples/bubble_example.h b/ui/views/examples/bubble_example.h
index ddb0549..08e97b9 100644
--- a/ui/views/examples/bubble_example.h
+++ b/ui/views/examples/bubble_example.h
@@ -21,7 +21,7 @@ class BubbleExample : public ExampleBase, public ButtonListener {
virtual void CreateExampleView(View* container) OVERRIDE;
private:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
Button* round_;
Button* arrow_;
diff --git a/ui/views/examples/button_example.cc b/ui/views/examples/button_example.cc
index dca7c8f..8f1c46f 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -55,7 +55,7 @@ void ButtonExample::CreateExampleView(View* container) {
container->AddChildView(image_button_);
}
-void ButtonExample::ButtonPressed(Button* sender, const Event& event) {
+void ButtonExample::ButtonPressed(Button* sender, const ui::Event& event) {
PrintStatus("Pressed! count: %d", ++count_);
if (event.IsControlDown()) {
diff --git a/ui/views/examples/button_example.h b/ui/views/examples/button_example.h
index 59973f5..09f6b3e 100644
--- a/ui/views/examples/button_example.h
+++ b/ui/views/examples/button_example.h
@@ -28,7 +28,7 @@ class ButtonExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// Example buttons.
TextButton* text_button_;
diff --git a/ui/views/examples/message_box_example.cc b/ui/views/examples/message_box_example.cc
index e50d22a..1e38106 100644
--- a/ui/views/examples/message_box_example.cc
+++ b/ui/views/examples/message_box_example.cc
@@ -49,7 +49,7 @@ void MessageBoxExample::CreateExampleView(View* container) {
layout->AddView(toggle_);
}
-void MessageBoxExample::ButtonPressed(Button* sender, const Event& event) {
+void MessageBoxExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == status_) {
message_box_view_->SetCheckBoxLabel(
ASCIIToUTF16(BoolToOnOff(message_box_view_->IsCheckBoxSelected())));
diff --git a/ui/views/examples/message_box_example.h b/ui/views/examples/message_box_example.h
index 0d915de4..4989787 100644
--- a/ui/views/examples/message_box_example.h
+++ b/ui/views/examples/message_box_example.h
@@ -28,7 +28,7 @@ class MessageBoxExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// The MessageBoxView to be tested.
MessageBoxView* message_box_view_;
diff --git a/ui/views/examples/native_theme_button_example.cc b/ui/views/examples/native_theme_button_example.cc
index ad42754..1e52a85 100644
--- a/ui/views/examples/native_theme_button_example.cc
+++ b/ui/views/examples/native_theme_button_example.cc
@@ -251,7 +251,7 @@ void NativeThemeButtonExample::CreateExampleView(View* container) {
}
void NativeThemeButtonExample::ButtonPressed(Button* sender,
- const Event& event) {
+ const ui::Event& event) {
PrintStatus(button_->MessWithState().c_str());
}
diff --git a/ui/views/examples/native_theme_button_example.h b/ui/views/examples/native_theme_button_example.h
index 179439b..d8eaf81 100644
--- a/ui/views/examples/native_theme_button_example.h
+++ b/ui/views/examples/native_theme_button_example.h
@@ -78,7 +78,7 @@ class NativeThemeButtonExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
ExampleNativeThemeButton* button_;
diff --git a/ui/views/examples/native_theme_checkbox_example.cc b/ui/views/examples/native_theme_checkbox_example.cc
index 8112989..3ad9ba4 100644
--- a/ui/views/examples/native_theme_checkbox_example.cc
+++ b/ui/views/examples/native_theme_checkbox_example.cc
@@ -29,7 +29,7 @@ void NativeThemeCheckboxExample::CreateExampleView(View* container) {
}
void NativeThemeCheckboxExample::ButtonPressed(Button* sender,
- const Event& event) {
+ const ui::Event& event) {
PrintStatus(base::StringPrintf("Pressed! count: %d", ++count_).c_str());
}
diff --git a/ui/views/examples/native_theme_checkbox_example.h b/ui/views/examples/native_theme_checkbox_example.h
index 8cb9ba1..517afb1 100644
--- a/ui/views/examples/native_theme_checkbox_example.h
+++ b/ui/views/examples/native_theme_checkbox_example.h
@@ -26,7 +26,7 @@ class NativeThemeCheckboxExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// The only control in this test.
Checkbox* button_;
diff --git a/ui/views/examples/progress_bar_example.cc b/ui/views/examples/progress_bar_example.cc
index 223074f..f1142aa 100644
--- a/ui/views/examples/progress_bar_example.cc
+++ b/ui/views/examples/progress_bar_example.cc
@@ -59,7 +59,7 @@ void ProgressBarExample::CreateExampleView(View* container) {
layout->AddView(plus_button_);
}
-void ProgressBarExample::ButtonPressed(Button* sender, const Event& event) {
+void ProgressBarExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == minus_button_)
current_percent_ = ClampToMin(current_percent_ - kStepSize);
else if (sender == plus_button_)
diff --git a/ui/views/examples/progress_bar_example.h b/ui/views/examples/progress_bar_example.h
index a2fdcd9a..92d0e9f 100644
--- a/ui/views/examples/progress_bar_example.h
+++ b/ui/views/examples/progress_bar_example.h
@@ -25,7 +25,7 @@ class ProgressBarExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* button, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* button, const ui::Event& event) OVERRIDE;
Button* minus_button_;
Button* plus_button_;
diff --git a/ui/views/examples/radio_button_example.cc b/ui/views/examples/radio_button_example.cc
index 42a6ea9..4c309ce 100644
--- a/ui/views/examples/radio_button_example.cc
+++ b/ui/views/examples/radio_button_example.cc
@@ -50,7 +50,7 @@ void RadioButtonExample::CreateExampleView(View* container) {
layout->AddView(status_);
}
-void RadioButtonExample::ButtonPressed(Button* sender, const Event& event) {
+void RadioButtonExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == select_) {
radio_buttons_[2]->SetChecked(true);
} else if (sender == status_) {
diff --git a/ui/views/examples/radio_button_example.h b/ui/views/examples/radio_button_example.h
index 49deec8..626cd13 100644
--- a/ui/views/examples/radio_button_example.h
+++ b/ui/views/examples/radio_button_example.h
@@ -29,7 +29,7 @@ class RadioButtonExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// Group of 3 radio buttons.
RadioButton* radio_buttons_[3];
diff --git a/ui/views/examples/scroll_view_example.cc b/ui/views/examples/scroll_view_example.cc
index a0f293f..3dc4d084 100644
--- a/ui/views/examples/scroll_view_example.cc
+++ b/ui/views/examples/scroll_view_example.cc
@@ -89,7 +89,7 @@ void ScrollViewExample::CreateExampleView(View* container) {
layout->AddView(scroll_to_);
}
-void ScrollViewExample::ButtonPressed(Button* sender, const Event& event) {
+void ScrollViewExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == wide_) {
scrollable_->SetBounds(0, 0, 1000, 100);
scrollable_->SetColor(SK_ColorYELLOW, SK_ColorCYAN);
diff --git a/ui/views/examples/scroll_view_example.h b/ui/views/examples/scroll_view_example.h
index e57fc79..436f48b 100644
--- a/ui/views/examples/scroll_view_example.h
+++ b/ui/views/examples/scroll_view_example.h
@@ -26,7 +26,7 @@ class ScrollViewExample : public ExampleBase, public ButtonListener {
private:
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// Control buttons to change the size of scrollable and jump to
// predefined position.
diff --git a/ui/views/examples/tabbed_pane_example.cc b/ui/views/examples/tabbed_pane_example.cc
index 894c088..b92d928 100644
--- a/ui/views/examples/tabbed_pane_example.cc
+++ b/ui/views/examples/tabbed_pane_example.cc
@@ -54,7 +54,7 @@ void TabbedPaneExample::CreateExampleView(View* container) {
layout->AddView(select_at_);
}
-void TabbedPaneExample::ButtonPressed(Button* sender, const Event& event) {
+void TabbedPaneExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == add_) {
AddButton("Added");
} else if (sender == add_at_) {
diff --git a/ui/views/examples/tabbed_pane_example.h b/ui/views/examples/tabbed_pane_example.h
index 43ff22c..f9377a3 100644
--- a/ui/views/examples/tabbed_pane_example.h
+++ b/ui/views/examples/tabbed_pane_example.h
@@ -31,7 +31,7 @@ class TabbedPaneExample : public ExampleBase,
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// TabbedPaneListener:
virtual void TabSelectedAt(int index) OVERRIDE;
diff --git a/ui/views/examples/table_example.cc b/ui/views/examples/table_example.cc
index 51ab1d3..b7f84ff 100644
--- a/ui/views/examples/table_example.cc
+++ b/ui/views/examples/table_example.cc
@@ -137,7 +137,7 @@ void TableExample::OnTableViewDelete(TableView* table_view) {}
void TableExample::OnTableView2Delete(TableView2* table_view) {}
-void TableExample::ButtonPressed(Button* sender, const Event& event) {
+void TableExample::ButtonPressed(Button* sender, const ui::Event& event) {
#if defined(OS_WIN) && !defined(USE_AURA)
int index = 0;
bool show = true;
diff --git a/ui/views/examples/table_example.h b/ui/views/examples/table_example.h
index db7d901..56df8a3 100644
--- a/ui/views/examples/table_example.h
+++ b/ui/views/examples/table_example.h
@@ -53,7 +53,7 @@ class TableExample : public ExampleBase,
virtual void OnTableView2Delete(TableView2* table_view) OVERRIDE;
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
private:
// The table to be tested.
diff --git a/ui/views/examples/text_example.cc b/ui/views/examples/text_example.cc
index d8db070..e6298e2 100644
--- a/ui/views/examples/text_example.cc
+++ b/ui/views/examples/text_example.cc
@@ -260,8 +260,7 @@ void TextExample::CreateExampleView(View* container) {
layout->AddPaddingRow(0, 8);
}
-void TextExample::ButtonPressed(Button* button,
- const Event& event) {
+void TextExample::ButtonPressed(Button* button, const ui::Event& event) {
int flags = text_view_->text_flags();
int style = text_view_->GetFontStyle();
SetFlagFromCheckbox(multiline_checkbox_, &flags, gfx::Canvas::MULTI_LINE);
diff --git a/ui/views/examples/text_example.h b/ui/views/examples/text_example.h
index b814b4d..3284990 100644
--- a/ui/views/examples/text_example.h
+++ b/ui/views/examples/text_example.h
@@ -41,7 +41,7 @@ class TextExample : public ExampleBase,
int count);
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* button, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* button, const ui::Event& event) OVERRIDE;
// Overridden from ComboboxListener:
virtual void OnSelectedIndexChanged(Combobox* combobox) OVERRIDE;
diff --git a/ui/views/examples/textfield_example.cc b/ui/views/examples/textfield_example.cc
index 1a87d20..57b7e87 100644
--- a/ui/views/examples/textfield_example.cc
+++ b/ui/views/examples/textfield_example.cc
@@ -74,8 +74,7 @@ bool TextfieldExample::HandleKeyEvent(Textfield* sender,
return false;
}
-void TextfieldExample::ButtonPressed(Button* sender,
- const Event& event) {
+void TextfieldExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == show_password_) {
PrintStatus("Password [%s]", UTF16ToUTF8(password_->text()).c_str());
} else if (sender == clear_all_) {
diff --git a/ui/views/examples/textfield_example.h b/ui/views/examples/textfield_example.h
index 1ca0954..c479509 100644
--- a/ui/views/examples/textfield_example.h
+++ b/ui/views/examples/textfield_example.h
@@ -36,7 +36,7 @@ class TextfieldExample : public ExampleBase,
const ui::KeyEvent& key_event) OVERRIDE;
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// Textfields for name and password.
Textfield* name_;
diff --git a/ui/views/examples/tree_view_example.cc b/ui/views/examples/tree_view_example.cc
index 3bdb447..f971ab1 100644
--- a/ui/views/examples/tree_view_example.cc
+++ b/ui/views/examples/tree_view_example.cc
@@ -90,7 +90,7 @@ bool TreeViewExample::IsCommandIdEnabled(int command_id) {
tree_view_->GetSelectedNode() != model_.GetRoot();
}
-void TreeViewExample::ButtonPressed(Button* sender, const Event& event) {
+void TreeViewExample::ButtonPressed(Button* sender, const ui::Event& event) {
NodeType* selected_node =
static_cast<NodeType*>(tree_view_->GetSelectedNode());
if (sender == add_) {
diff --git a/ui/views/examples/tree_view_example.h b/ui/views/examples/tree_view_example.h
index b2f1ea9..a832bda 100644
--- a/ui/views/examples/tree_view_example.h
+++ b/ui/views/examples/tree_view_example.h
@@ -48,7 +48,7 @@ class TreeViewExample : public ExampleBase,
bool IsCommandIdEnabled(int command_id);
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
// TreeViewController:
virtual void OnTreeViewSelectionChanged(TreeView* tree_view) OVERRIDE;
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 2a635f5..ed45ebe 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -142,7 +142,7 @@ void WidgetExample::CreatePopup(View* parent, bool transparent) {
InitWidget(widget, transparent);
}
-void WidgetExample::ButtonPressed(Button* sender, const Event& event) {
+void WidgetExample::ButtonPressed(Button* sender, const ui::Event& event) {
switch (sender->tag()) {
case POPUP:
CreatePopup(sender, false);
diff --git a/ui/views/examples/widget_example.h b/ui/views/examples/widget_example.h
index fe32887d..88a8c42 100644
--- a/ui/views/examples/widget_example.h
+++ b/ui/views/examples/widget_example.h
@@ -45,7 +45,7 @@ class WidgetExample : public ExampleBase, public ButtonListener {
void CreatePopup(View* parent, bool transparent);
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(WidgetExample);
};