Revved to chromium 4dfb55c9cf0950b8bac8b10070c9b8f3e7de66c2 refs/remotes/origin/HEAD
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl
index 94efe78..6557702 100644
--- a/ui/accessibility/ax_enums.idl
+++ b/ui/accessibility/ax_enums.idl
@@ -80,6 +80,8 @@
combo_box,
complementary,
content_info,
+ date,
+ date_time,
definition,
description_list_detail,
description_list,
@@ -129,6 +131,8 @@
menu_bar,
menu_button,
menu_item,
+ menu_item_check_box,
+ menu_item_radio,
menu_list_option,
menu_list_popup,
menu,
@@ -171,6 +175,7 @@
table,
text_area,
text_field,
+ time,
timer,
title_bar,
toggle_button,
diff --git a/ui/accessibility/ax_serializable_tree.cc b/ui/accessibility/ax_serializable_tree.cc
index 4e4da83..3198b61 100644
--- a/ui/accessibility/ax_serializable_tree.cc
+++ b/ui/accessibility/ax_serializable_tree.cc
@@ -20,44 +20,44 @@
virtual ~AXTreeSourceAdapter() {}
// AXTreeSource implementation.
- virtual AXNode* GetRoot() const OVERRIDE {
+ virtual AXNode* GetRoot() const override {
return tree_->GetRoot();
}
- virtual AXNode* GetFromId(int32 id) const OVERRIDE {
+ virtual AXNode* GetFromId(int32 id) const override {
return tree_->GetFromId(id);
}
- virtual int32 GetId(const AXNode* node) const OVERRIDE {
+ virtual int32 GetId(const AXNode* node) const override {
return node->id();
}
virtual void GetChildren(
const AXNode* node,
- std::vector<const AXNode*>* out_children) const OVERRIDE {
+ std::vector<const AXNode*>* out_children) const override {
for (int i = 0; i < node->child_count(); ++i)
out_children->push_back(node->ChildAtIndex(i));
}
- virtual AXNode* GetParent(const AXNode* node) const OVERRIDE {
+ virtual AXNode* GetParent(const AXNode* node) const override {
return node->parent();
}
- virtual bool IsValid(const AXNode* node) const OVERRIDE {
+ virtual bool IsValid(const AXNode* node) const override {
return node != NULL;
}
virtual bool IsEqual(const AXNode* node1,
- const AXNode* node2) const OVERRIDE {
+ const AXNode* node2) const override {
return node1 == node2;
}
- virtual const AXNode* GetNull() const OVERRIDE {
+ virtual const AXNode* GetNull() const override {
return NULL;
}
virtual void SerializeNode(
- const AXNode* node, AXNodeData* out_data) const OVERRIDE {
+ const AXNode* node, AXNodeData* out_data) const override {
*out_data = node->data();
}
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
index 05369de..3edd308 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -16,27 +16,27 @@
class FakeAXTreeDelegate : public AXTreeDelegate {
public:
- virtual void OnNodeWillBeDeleted(AXNode* node) OVERRIDE {
+ virtual void OnNodeWillBeDeleted(AXNode* node) override {
deleted_ids_.push_back(node->id());
}
- virtual void OnNodeCreated(AXNode* node) OVERRIDE {
+ virtual void OnNodeCreated(AXNode* node) override {
created_ids_.push_back(node->id());
}
- virtual void OnNodeChanged(AXNode* node) OVERRIDE {
+ virtual void OnNodeChanged(AXNode* node) override {
changed_ids_.push_back(node->id());
}
- virtual void OnNodeCreationFinished(AXNode* node) OVERRIDE {
+ virtual void OnNodeCreationFinished(AXNode* node) override {
creation_finished_ids_.push_back(node->id());
}
- virtual void OnNodeChangeFinished(AXNode* node) OVERRIDE {
+ virtual void OnNodeChangeFinished(AXNode* node) override {
change_finished_ids_.push_back(node->id());
}
- virtual void OnRootChanged(AXNode* new_root) OVERRIDE {
+ virtual void OnRootChanged(AXNode* new_root) override {
new_root_ids_.push_back(new_root->id());
}
diff --git a/ui/accessibility/platform/ax_platform_node_base.h b/ui/accessibility/platform/ax_platform_node_base.h
index 306f5ab..437b158 100644
--- a/ui/accessibility/platform/ax_platform_node_base.h
+++ b/ui/accessibility/platform/ax_platform_node_base.h
@@ -26,8 +26,8 @@
gfx::NativeViewAccessible ChildAtIndex(int index);
// AXPlatformNode
- virtual void Destroy() OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
+ virtual void Destroy() override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
protected:
AXPlatformNodeBase();
diff --git a/ui/accessibility/platform/ax_platform_node_mac.h b/ui/accessibility/platform/ax_platform_node_mac.h
index 4303de3..2f15120 100644
--- a/ui/accessibility/platform/ax_platform_node_mac.h
+++ b/ui/accessibility/platform/ax_platform_node_mac.h
@@ -18,8 +18,8 @@
AXPlatformNodeMac();
// AXPlatformNode.
- virtual void Destroy() OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
+ virtual void Destroy() override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
private:
virtual ~AXPlatformNodeMac();
diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm
index 8f0708d..7431c6b 100644
--- a/ui/accessibility/platform/ax_platform_node_mac.mm
+++ b/ui/accessibility/platform/ax_platform_node_mac.mm
@@ -83,6 +83,8 @@
{ui::AX_ROLE_MENU_BAR, NSAccessibilityMenuBarRole},
{ui::AX_ROLE_MENU_BUTTON, NSAccessibilityButtonRole},
{ui::AX_ROLE_MENU_ITEM, NSAccessibilityMenuItemRole},
+ {ui::AX_ROLE_MENU_ITEM_CHECK_BOX, NSAccessibilityMenuItemRole},
+ {ui::AX_ROLE_MENU_ITEM_RADIO, NSAccessibilityMenuItemRole},
{ui::AX_ROLE_MENU_LIST_OPTION, NSAccessibilityMenuItemRole},
{ui::AX_ROLE_MENU_LIST_POPUP, NSAccessibilityUnknownRole},
{ui::AX_ROLE_NAVIGATION, NSAccessibilityGroupRole},
diff --git a/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java b/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
index f95d855..bffcb48 100644
--- a/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
+++ b/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
@@ -150,7 +150,7 @@
}
int position = Math.min(
- (int)(input * (mValues.length - 1)),
+ (int) (input * (mValues.length - 1)),
mValues.length - 2);
float quantized = position * mStepSize;
diff --git a/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java b/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
index 797e03b..c59f465 100644
--- a/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
+++ b/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
@@ -249,7 +249,7 @@
mDialog.setButton(DialogInterface.BUTTON_POSITIVE,
mContext.getText(R.string.date_picker_dialog_set),
- (DialogInterface.OnClickListener)mDialog);
+ (DialogInterface.OnClickListener) mDialog);
mDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
mContext.getText(android.R.string.cancel),
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn
index aefca57..a5055e0 100644
--- a/ui/app_list/BUILD.gn
+++ b/ui/app_list/BUILD.gn
@@ -34,6 +34,8 @@
"search_box_model.cc",
"search_box_model.h",
"search_box_model_observer.h",
+ "search_controller.cc",
+ "search_controller.h",
"search_provider.cc",
"search_provider.h",
"search_result.cc",
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 3f10aec..919a3f8 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -82,6 +82,8 @@
'search_box_model.cc',
'search_box_model.h',
'search_box_model_observer.h',
+ 'search_controller.cc',
+ 'search_controller.h',
'search_provider.cc',
'search_provider.h',
'search_result.cc',
diff --git a/ui/app_list/app_list_folder_item.cc b/ui/app_list/app_list_folder_item.cc
index 99d9c19..3c5634d 100644
--- a/ui/app_list/app_list_folder_item.cc
+++ b/ui/app_list/app_list_folder_item.cc
@@ -47,7 +47,7 @@
}
// gfx::CanvasImageSource overrides:
- virtual void Draw(gfx::Canvas* canvas) OVERRIDE {
+ virtual void Draw(gfx::Canvas* canvas) override {
// Draw folder circle.
gfx::Point center = gfx::Point(size().width() / 2 , size().height() / 2);
SkPaint paint;
diff --git a/ui/app_list/app_list_folder_item.h b/ui/app_list/app_list_folder_item.h
index 2f054cc..bfcb86e 100644
--- a/ui/app_list/app_list_folder_item.h
+++ b/ui/app_list/app_list_folder_item.h
@@ -59,13 +59,13 @@
FolderType folder_type() const { return folder_type_; }
// AppListItem
- virtual void Activate(int event_flags) OVERRIDE;
- virtual const char* GetItemType() const OVERRIDE;
- virtual ui::MenuModel* GetContextMenuModel() OVERRIDE;
- virtual AppListItem* FindChildItem(const std::string& id) OVERRIDE;
- virtual size_t ChildItemCount() const OVERRIDE;
- virtual void OnExtensionPreferenceChanged() OVERRIDE;
- virtual bool CompareForTest(const AppListItem* other) const OVERRIDE;
+ virtual void Activate(int event_flags) override;
+ virtual const char* GetItemType() const override;
+ virtual ui::MenuModel* GetContextMenuModel() override;
+ virtual AppListItem* FindChildItem(const std::string& id) override;
+ virtual size_t ChildItemCount() const override;
+ virtual void OnExtensionPreferenceChanged() override;
+ virtual bool CompareForTest(const AppListItem* other) const override;
// Calculates the top item icons' bounds inside |folder_icon_bounds|.
// Returns the bounds of top item icons in sequence of top left, top right,
@@ -77,15 +77,15 @@
private:
// AppListItemObserver
- virtual void ItemIconChanged() OVERRIDE;
+ virtual void ItemIconChanged() override;
// AppListItemListObserver
- virtual void OnListItemAdded(size_t index, AppListItem* item) OVERRIDE;
+ virtual void OnListItemAdded(size_t index, AppListItem* item) override;
virtual void OnListItemRemoved(size_t index,
- AppListItem* item) OVERRIDE;;
+ AppListItem* item) override;;
virtual void OnListItemMoved(size_t from_index,
size_t to_index,
- AppListItem* item) OVERRIDE;
+ AppListItem* item) override;
void UpdateTopItems();
diff --git a/ui/app_list/app_list_item_list_unittest.cc b/ui/app_list/app_list_item_list_unittest.cc
index de18b6a..9b68ea4 100644
--- a/ui/app_list/app_list_item_list_unittest.cc
+++ b/ui/app_list/app_list_item_list_unittest.cc
@@ -23,17 +23,17 @@
}
// AppListItemListObserver overriden:
- virtual void OnListItemAdded(size_t index, AppListItem* item) OVERRIDE {
+ virtual void OnListItemAdded(size_t index, AppListItem* item) override {
++items_added_;
}
- virtual void OnListItemRemoved(size_t index, AppListItem* item) OVERRIDE {
+ virtual void OnListItemRemoved(size_t index, AppListItem* item) override {
++items_removed_;
}
virtual void OnListItemMoved(size_t from_index,
size_t to_index,
- AppListItem* item) OVERRIDE {
+ AppListItem* item) override {
++items_moved_;
}
@@ -67,11 +67,11 @@
virtual ~AppListItemListTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
item_list_.AddObserver(&observer_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
item_list_.RemoveObserver(&observer_);
}
diff --git a/ui/app_list/app_list_menu.h b/ui/app_list/app_list_menu.h
index 6520e1d..738ab1e 100644
--- a/ui/app_list/app_list_menu.h
+++ b/ui/app_list/app_list_menu.h
@@ -32,12 +32,12 @@
private:
void InitMenu();
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
ui::SimpleMenuModel menu_model_;
AppListViewDelegate* delegate_;
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h
index 07ab33c..81c9854 100644
--- a/ui/app_list/app_list_model.h
+++ b/ui/app_list/app_list_model.h
@@ -135,7 +135,7 @@
// AppListItemListObserver
virtual void OnListItemMoved(size_t from_index,
size_t to_index,
- AppListItem* item) OVERRIDE;
+ AppListItem* item) override;
// Returns an existing folder matching |folder_id| or creates a new folder.
AppListFolderItem* FindOrCreateFolderItem(const std::string& folder_id);
diff --git a/ui/app_list/app_list_model_unittest.cc b/ui/app_list/app_list_model_unittest.cc
index 05dbfbb..91d744e 100644
--- a/ui/app_list/app_list_model_unittest.cc
+++ b/ui/app_list/app_list_model_unittest.cc
@@ -33,19 +33,19 @@
}
// AppListModelObserver
- virtual void OnAppListModelStatusChanged() OVERRIDE {
+ virtual void OnAppListModelStatusChanged() override {
++status_changed_count_;
}
- virtual void OnAppListItemAdded(AppListItem* item) OVERRIDE {
+ virtual void OnAppListItemAdded(AppListItem* item) override {
items_added_++;
}
- virtual void OnAppListItemWillBeDeleted(AppListItem* item) OVERRIDE {
+ virtual void OnAppListItemWillBeDeleted(AppListItem* item) override {
items_removed_++;
}
- virtual void OnAppListItemUpdated(AppListItem* item) OVERRIDE {
+ virtual void OnAppListItemUpdated(AppListItem* item) override {
items_updated_++;
}
@@ -78,10 +78,10 @@
virtual ~AppListModelTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
model_.AddObserver(&observer_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
model_.RemoveObserver(&observer_);
}
@@ -237,10 +237,10 @@
virtual ~AppListModelFolderTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AppListModelTest::SetUp();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
AppListModelTest::TearDown();
}
diff --git a/ui/app_list/cocoa/app_list_view_controller.mm b/ui/app_list/cocoa/app_list_view_controller.mm
index b831f9a..c55576a 100644
--- a/ui/app_list/cocoa/app_list_view_controller.mm
+++ b/ui/app_list/cocoa/app_list_view_controller.mm
@@ -87,8 +87,8 @@
private:
// Overridden from app_list::AppListViewDelegateObserver:
- virtual void OnProfilesChanged() OVERRIDE;
- virtual void OnShutdown() OVERRIDE;
+ virtual void OnProfilesChanged() override;
+ virtual void OnShutdown() override;
AppListViewController* parent_; // Weak. Owns us.
diff --git a/ui/app_list/cocoa/app_list_view_controller_unittest.mm b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
index 47d99b5..3b28651 100644
--- a/ui/app_list/cocoa/app_list_view_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
@@ -17,7 +17,7 @@
public:
AppListViewControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
app_list_view_controller_.reset([[AppListViewController alloc] init]);
delegate_.reset(new AppListTestViewDelegate);
[app_list_view_controller_ setDelegate:delegate_.get()];
@@ -25,7 +25,7 @@
[[test_window() contentView] addSubview:[app_list_view_controller_ view]];
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
[app_list_view_controller_ setDelegate:NULL];
app_list_view_controller_.reset();
AppsGridControllerTestHelper::TearDown();
diff --git a/ui/app_list/cocoa/app_list_window_controller_unittest.mm b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
index 692f23c..03b74b4 100644
--- a/ui/app_list/cocoa/app_list_window_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
@@ -19,7 +19,7 @@
AppListWindowControllerTest();
protected:
- virtual void TearDown() OVERRIDE;
+ virtual void TearDown() override;
base::scoped_nsobject<AppListWindowController> controller_;
diff --git a/ui/app_list/cocoa/apps_grid_controller.mm b/ui/app_list/cocoa/apps_grid_controller.mm
index f2df08d..e9cec7a 100644
--- a/ui/app_list/cocoa/apps_grid_controller.mm
+++ b/ui/app_list/cocoa/apps_grid_controller.mm
@@ -98,20 +98,20 @@
private:
// Overridden from AppListItemListObserver:
- virtual void OnListItemAdded(size_t index, AppListItem* item) OVERRIDE {
+ virtual void OnListItemAdded(size_t index, AppListItem* item) override {
[parent_ listItemAdded:index
item:item];
}
- virtual void OnListItemRemoved(size_t index, AppListItem* item) OVERRIDE {
+ virtual void OnListItemRemoved(size_t index, AppListItem* item) override {
[parent_ listItemRemoved:index];
}
virtual void OnListItemMoved(size_t from_index,
size_t to_index,
- AppListItem* item) OVERRIDE {
+ AppListItem* item) override {
[parent_ listItemMovedFromIndex:from_index
toModelIndex:to_index];
}
- virtual void OnAppListItemHighlight(size_t index, bool highlight) OVERRIDE {
+ virtual void OnAppListItemHighlight(size_t index, bool highlight) override {
// NSCollectionView (or -[AppsGridController scrollToPage]) ensures only one
// item is highlighted, so clearing a highlight isn't necessary.
if (!highlight)
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index 756bb3f..2723143 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -96,7 +96,7 @@
return [attributes objectForKey:NSForegroundColorAttributeName];
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
owned_apps_grid_controller_.reset([[AppsGridController alloc] init]);
owned_delegate_.reset(new AppListTestViewDelegate);
[owned_apps_grid_controller_ setDelegate:owned_delegate_.get()];
@@ -108,7 +108,7 @@
[apps_grid_controller_ collectionViewAtPageIndex:0]];
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
[owned_apps_grid_controller_ setDelegate:NULL];
owned_apps_grid_controller_.reset();
AppsGridControllerTestHelper::TearDown();
@@ -145,7 +145,7 @@
menu_ready_ = ready;
}
- virtual ui::MenuModel* GetContextMenuModel() OVERRIDE {
+ virtual ui::MenuModel* GetContextMenuModel() override {
if (!menu_ready_)
return NULL;
diff --git a/ui/app_list/cocoa/apps_grid_view_item.mm b/ui/app_list/cocoa/apps_grid_view_item.mm
index fc37ff3..d78e08e 100644
--- a/ui/app_list/cocoa/apps_grid_view_item.mm
+++ b/ui/app_list/cocoa/apps_grid_view_item.mm
@@ -69,10 +69,10 @@
AppListItem* model() { return model_; }
NSMenu* GetContextMenu();
- virtual void ItemIconChanged() OVERRIDE;
- virtual void ItemNameChanged() OVERRIDE;
- virtual void ItemIsInstallingChanged() OVERRIDE;
- virtual void ItemPercentDownloadedChanged() OVERRIDE;
+ virtual void ItemIconChanged() override;
+ virtual void ItemNameChanged() override;
+ virtual void ItemIsInstallingChanged() override;
+ virtual void ItemPercentDownloadedChanged() override;
private:
AppsGridViewItem* parent_; // Weak. Owns us.
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 0e5ba2f..81d7c44 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -52,11 +52,11 @@
void SetSearchText(const base::string16& text);
- virtual void IconChanged() OVERRIDE;
- virtual void SpeechRecognitionButtonPropChanged() OVERRIDE;
- virtual void HintTextChanged() OVERRIDE;
- virtual void SelectionModelChanged() OVERRIDE;
- virtual void TextChanged() OVERRIDE;
+ virtual void IconChanged() override;
+ virtual void SpeechRecognitionButtonPropChanged() override;
+ virtual void HintTextChanged() override;
+ virtual void SelectionModelChanged() override;
+ virtual void TextChanged() override;
private:
SearchBoxModel* GetModel();
diff --git a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
index 60182f9..285bbdb 100644
--- a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
@@ -88,7 +88,7 @@
Init();
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
apps_search_box_controller_.reset(
[[AppsSearchBoxController alloc] initWithFrame:
NSMakeRect(0, 0, 400, 100)]);
@@ -99,7 +99,7 @@
[[test_window() contentView] addSubview:[apps_search_box_controller_ view]];
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
[apps_search_box_controller_ setDelegate:nil];
ui::CocoaTest::TearDown();
}
diff --git a/ui/app_list/cocoa/apps_search_results_controller.mm b/ui/app_list/cocoa/apps_search_results_controller.mm
index 4ef6167..95f293f 100644
--- a/ui/app_list/cocoa/apps_search_results_controller.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller.mm
@@ -402,15 +402,6 @@
[self delegate]);
}
-- (BOOL)canDraw {
- // AppKit doesn't call -[NSView canDrawConcurrently] which would have told it
- // that this is unsafe. Returning true from canDraw only if there is a message
- // loop ensures that no drawing occurs on a background thread. Without this,
- // ImageSkia can assert when trying to get bitmaps. http://crbug.com/417148.
- // This means unit tests will always return 'NO', but that's OK.
- return !!base::MessageLoop::current() && [super canDraw];
-}
-
- (void)mouseDown:(NSEvent*)theEvent {
[[self controller] mouseDown:theEvent];
[super mouseDown:theEvent];
diff --git a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
index b6f2f95..bc6d4fc 100644
--- a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
@@ -74,7 +74,7 @@
menu_ready_ = ready;
}
- virtual ui::MenuModel* GetContextMenuModel() OVERRIDE {
+ virtual ui::MenuModel* GetContextMenuModel() override {
if (!menu_ready_)
return NULL;
@@ -123,8 +123,8 @@
void ExpectConsistent();
// ui::CocoaTest overrides:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
base::scoped_nsobject<TestAppsSearchResultsDelegate> delegate_;
diff --git a/ui/app_list/cocoa/apps_search_results_model_bridge.h b/ui/app_list/cocoa/apps_search_results_model_bridge.h
index 8939d26..70e66b7 100644
--- a/ui/app_list/cocoa/apps_search_results_model_bridge.h
+++ b/ui/app_list/cocoa/apps_search_results_model_bridge.h
@@ -34,10 +34,10 @@
void ReloadDataForItems(size_t start, size_t count) const;
// Overridden from ui::ListModelObserver:
- virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE;
- virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE;
- virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE;
- virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE;
+ virtual void ListItemsAdded(size_t start, size_t count) override;
+ virtual void ListItemsRemoved(size_t start, size_t count) override;
+ virtual void ListItemMoved(size_t index, size_t target_index) override;
+ virtual void ListItemsChanged(size_t start, size_t count) override;
AppsSearchResultsController* parent_; // Weak. Owns us.
ScopedVector<ItemObserver> item_observers_;
diff --git a/ui/app_list/cocoa/apps_search_results_model_bridge.mm b/ui/app_list/cocoa/apps_search_results_model_bridge.mm
index 69a3205..26e8091 100644
--- a/ui/app_list/cocoa/apps_search_results_model_bridge.mm
+++ b/ui/app_list/cocoa/apps_search_results_model_bridge.mm
@@ -43,14 +43,14 @@
}
// SearchResultObserver overrides:
- virtual void OnIconChanged() OVERRIDE {
+ virtual void OnIconChanged() override {
bridge_->ReloadDataForItems(row_in_view_, 1);
}
- virtual void OnActionsChanged() OVERRIDE {}
- virtual void OnIsInstallingChanged() OVERRIDE {}
- virtual void OnPercentDownloadedChanged() OVERRIDE {}
- virtual void OnItemInstalled() OVERRIDE {}
- virtual void OnItemUninstalled() OVERRIDE;
+ virtual void OnActionsChanged() override {}
+ virtual void OnIsInstallingChanged() override {}
+ virtual void OnPercentDownloadedChanged() override {}
+ virtual void OnItemInstalled() override {}
+ virtual void OnItemUninstalled() override;
private:
AppsSearchResultsModelBridge* bridge_; // Weak. Owns us.
diff --git a/ui/app_list/demo/app_list_demo_views.cc b/ui/app_list/demo/app_list_demo_views.cc
index 58e939a..b87885a 100644
--- a/ui/app_list/demo/app_list_demo_views.cc
+++ b/ui/app_list/demo/app_list_demo_views.cc
@@ -39,9 +39,9 @@
app_list::AppListView* InitView(gfx::NativeWindow window_context);
// Overridden from AppListViewDelegate:
- virtual void Dismiss() OVERRIDE;
- virtual void ViewClosing() OVERRIDE;
- virtual views::View* CreateStartPageWebView(const gfx::Size& size) OVERRIDE;
+ virtual void Dismiss() override;
+ virtual void ViewClosing() override;
+ virtual views::View* CreateStartPageWebView(const gfx::Size& size) override;
private:
app_list::AppListView* view_; // Weak. Owns this.
diff --git a/ui/app_list/pagination_model.h b/ui/app_list/pagination_model.h
index af30230..1447559 100644
--- a/ui/app_list/pagination_model.h
+++ b/ui/app_list/pagination_model.h
@@ -122,8 +122,8 @@
void ResetTransitionAnimation();
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
int total_pages_;
int selected_page_;
diff --git a/ui/app_list/pagination_model_unittest.cc b/ui/app_list/pagination_model_unittest.cc
index 391ed87..ad437cf 100644
--- a/ui/app_list/pagination_model_unittest.cc
+++ b/ui/app_list/pagination_model_unittest.cc
@@ -61,9 +61,9 @@
}
// PaginationModelObserver overrides:
- virtual void TotalPagesChanged() OVERRIDE {}
+ virtual void TotalPagesChanged() override {}
virtual void SelectedPageChanged(int old_selected,
- int new_selected) OVERRIDE {
+ int new_selected) override {
AppendSelectedPage(new_selected);
++selection_count_;
if (expected_page_selection_ &&
@@ -72,10 +72,10 @@
}
}
- virtual void TransitionStarted() OVERRIDE {
+ virtual void TransitionStarted() override {
}
- virtual void TransitionChanged() OVERRIDE {
+ virtual void TransitionChanged() override {
if (transition_page_ == -1 ||
model_->transition().target_page == transition_page_) {
if (model_->transition().progress == 0)
@@ -117,13 +117,13 @@
virtual ~PaginationModelTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
pagination_.SetTotalPages(5);
pagination_.SetTransitionDurations(1, 1);
observer_.set_model(&pagination_);
pagination_.AddObserver(&observer_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
pagination_.RemoveObserver(&observer_);
observer_.set_model(NULL);
}
diff --git a/ui/app_list/search_controller.cc b/ui/app_list/search_controller.cc
new file mode 100644
index 0000000..3a4a52f
--- /dev/null
+++ b/ui/app_list/search_controller.cc
@@ -0,0 +1,114 @@
+// Copyright 2013 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.
+
+#include "ui/app_list/search_controller.h"
+
+#include <algorithm>
+#include <vector>
+
+#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/metrics/user_metrics.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
+#include "ui/app_list/search/history.h"
+#include "ui/app_list/search_box_model.h"
+#include "ui/app_list/search_provider.h"
+#include "ui/app_list/search_result.h"
+
+namespace {
+
+// Maximum time (in milliseconds) to wait to the search providers to finish.
+const int kStopTimeMS = 1500;
+}
+
+namespace app_list {
+
+SearchController::SearchController(SearchBoxModel* search_box,
+ AppListModel::SearchResults* results,
+ History* history)
+ : search_box_(search_box),
+ dispatching_query_(false),
+ mixer_(new Mixer(results)),
+ history_(history) {
+ mixer_->Init();
+}
+
+SearchController::~SearchController() {
+}
+
+void SearchController::Start() {
+ Stop();
+
+ base::string16 query;
+ base::TrimWhitespace(search_box_->text(), base::TRIM_ALL, &query);
+
+ dispatching_query_ = true;
+ for (Providers::iterator it = providers_.begin();
+ it != providers_.end();
+ ++it) {
+ (*it)->Start(query);
+ }
+ dispatching_query_ = false;
+
+ OnResultsChanged();
+
+ stop_timer_.Start(FROM_HERE,
+ base::TimeDelta::FromMilliseconds(kStopTimeMS),
+ base::Bind(&SearchController::Stop,
+ base::Unretained(this)));
+}
+
+void SearchController::Stop() {
+ stop_timer_.Stop();
+
+ for (Providers::iterator it = providers_.begin();
+ it != providers_.end();
+ ++it) {
+ (*it)->Stop();
+ }
+}
+
+void SearchController::OpenResult(SearchResult* result, int event_flags) {
+ // Count AppList.Search here because it is composed of search + action.
+ base::RecordAction(base::UserMetricsAction("AppList_Search"));
+
+ result->Open(event_flags);
+
+ if (history_ && history_->IsReady()) {
+ history_->AddLaunchEvent(base::UTF16ToUTF8(search_box_->text()),
+ result->id());
+ }
+}
+
+void SearchController::InvokeResultAction(SearchResult* result,
+ int action_index,
+ int event_flags) {
+ // TODO(xiyuan): Hook up with user learning.
+ result->InvokeAction(action_index, event_flags);
+}
+
+void SearchController::AddProvider(Mixer::GroupId group,
+ scoped_ptr<SearchProvider> provider) {
+ provider->set_result_changed_callback(base::Bind(
+ &SearchController::OnResultsChanged,
+ base::Unretained(this)));
+ mixer_->AddProviderToGroup(group, provider.get());
+ providers_.push_back(provider.release()); // Takes ownership.
+}
+
+void SearchController::OnResultsChanged() {
+ if (dispatching_query_)
+ return;
+
+ KnownResults known_results;
+ if (history_ && history_->IsReady()) {
+ history_->GetKnownResults(base::UTF16ToUTF8(search_box_->text()))
+ ->swap(known_results);
+ }
+
+ mixer_->MixAndPublish(known_results);
+}
+
+} // namespace app_list
diff --git a/ui/app_list/search_controller.h b/ui/app_list/search_controller.h
new file mode 100644
index 0000000..18c67ef
--- /dev/null
+++ b/ui/app_list/search_controller.h
@@ -0,0 +1,66 @@
+// Copyright 2013 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 UI_APP_LIST_SEARCH_CONTROLLER_H_
+#define UI_APP_LIST_SEARCH_CONTROLLER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "base/timer/timer.h"
+#include "ui/app_list/app_list_export.h"
+#include "ui/app_list/app_list_model.h"
+#include "ui/app_list/search/mixer.h"
+#include "ui/app_list/speech_ui_model_observer.h"
+
+namespace app_list {
+
+class History;
+class SearchBoxModel;
+class SearchProvider;
+class SearchResult;
+
+// Controller that collects query from given SearchBoxModel, dispatches it
+// to all search providers, then invokes the mixer to mix and to publish the
+// results to the given SearchResults UI model.
+class APP_LIST_EXPORT SearchController {
+ public:
+ SearchController(SearchBoxModel* search_box,
+ AppListModel::SearchResults* results,
+ History* history);
+ virtual ~SearchController();
+
+ void Start();
+ void Stop();
+
+ void OpenResult(SearchResult* result, int event_flags);
+ void InvokeResultAction(SearchResult* result,
+ int action_index,
+ int event_flags);
+
+ // Takes ownership of |provider| and associates it with given mixer group.
+ void AddProvider(Mixer::GroupId group,
+ scoped_ptr<SearchProvider> provider);
+
+ private:
+ typedef ScopedVector<SearchProvider> Providers;
+
+ // Invoked when the search results are changed.
+ void OnResultsChanged();
+
+ SearchBoxModel* search_box_;
+
+ bool dispatching_query_;
+ Providers providers_;
+ scoped_ptr<Mixer> mixer_;
+ History* history_; // KeyedService, not owned.
+
+ base::OneShotTimer<SearchController> stop_timer_;
+
+ DISALLOW_COPY_AND_ASSIGN(SearchController);
+};
+
+} // namespace app_list
+
+#endif // UI_APP_LIST_SEARCH_CONTROLLER_H_
diff --git a/ui/app_list/test/app_list_test_model.h b/ui/app_list/test/app_list_test_model.h
index 89e407b..d2a1845 100644
--- a/ui/app_list/test/app_list_test_model.h
+++ b/ui/app_list/test/app_list_test_model.h
@@ -22,8 +22,8 @@
public:
AppListTestItem(const std::string& id, AppListTestModel* model);
virtual ~AppListTestItem();
- virtual void Activate(int event_flags) OVERRIDE;
- virtual const char* GetItemType() const OVERRIDE;
+ virtual void Activate(int event_flags) override;
+ virtual const char* GetItemType() const override;
void SetPosition(const syncer::StringOrdinal& new_position);
diff --git a/ui/app_list/test/app_list_test_view_delegate.h b/ui/app_list/test/app_list_test_view_delegate.h
index dac12b7..2e307a6 100644
--- a/ui/app_list/test/app_list_test_view_delegate.h
+++ b/ui/app_list/test/app_list_test_view_delegate.h
@@ -48,43 +48,43 @@
int GetToggleSpeechRecognitionCountAndReset();
// AppListViewDelegate overrides:
- virtual bool ForceNativeDesktop() const OVERRIDE;
- virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE;
- virtual AppListModel* GetModel() OVERRIDE;
- virtual SpeechUIModel* GetSpeechUI() OVERRIDE;
+ virtual bool ForceNativeDesktop() const override;
+ virtual void SetProfileByPath(const base::FilePath& profile_path) override;
+ virtual AppListModel* GetModel() override;
+ virtual SpeechUIModel* GetSpeechUI() override;
virtual void GetShortcutPathForApp(
const std::string& app_id,
- const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
- virtual void StartSearch() OVERRIDE {}
- virtual void StopSearch() OVERRIDE {}
+ const base::Callback<void(const base::FilePath&)>& callback) override;
+ virtual void StartSearch() override {}
+ virtual void StopSearch() override {}
virtual void OpenSearchResult(SearchResult* result,
bool auto_launch,
- int event_flags) OVERRIDE;
+ int event_flags) override;
virtual void InvokeSearchResultAction(SearchResult* result,
int action_index,
- int event_flags) OVERRIDE {}
- virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE;
- virtual void AutoLaunchCanceled() OVERRIDE;
- virtual void ViewInitialized() OVERRIDE {}
- virtual void Dismiss() OVERRIDE;
- virtual void ViewClosing() OVERRIDE {}
- virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
- virtual void OpenSettings() OVERRIDE {}
- virtual void OpenHelp() OVERRIDE {}
- virtual void OpenFeedback() OVERRIDE {}
- virtual void ToggleSpeechRecognition() OVERRIDE;
+ int event_flags) override {}
+ virtual base::TimeDelta GetAutoLaunchTimeout() override;
+ virtual void AutoLaunchCanceled() override;
+ virtual void ViewInitialized() override {}
+ virtual void Dismiss() override;
+ virtual void ViewClosing() override {}
+ virtual gfx::ImageSkia GetWindowIcon() override;
+ virtual void OpenSettings() override {}
+ virtual void OpenHelp() override {}
+ virtual void OpenFeedback() override {}
+ virtual void ToggleSpeechRecognition() override;
virtual void ShowForProfileByPath(
- const base::FilePath& profile_path) OVERRIDE {}
+ const base::FilePath& profile_path) override {}
#if defined(TOOLKIT_VIEWS)
- virtual views::View* CreateStartPageWebView(const gfx::Size& size) OVERRIDE;
+ virtual views::View* CreateStartPageWebView(const gfx::Size& size) override;
virtual std::vector<views::View*> CreateCustomPageWebViews(
- const gfx::Size& size) OVERRIDE;
+ const gfx::Size& size) override;
#endif
- virtual bool IsSpeechRecognitionEnabled() OVERRIDE;
- virtual const Users& GetUsers() const OVERRIDE;
- virtual bool ShouldCenterWindow() const OVERRIDE;
- virtual void AddObserver(AppListViewDelegateObserver* observer) OVERRIDE;
- virtual void RemoveObserver(AppListViewDelegateObserver* observer) OVERRIDE;
+ virtual bool IsSpeechRecognitionEnabled() override;
+ virtual const Users& GetUsers() const override;
+ virtual bool ShouldCenterWindow() const override;
+ virtual void AddObserver(AppListViewDelegateObserver* observer) override;
+ virtual void RemoveObserver(AppListViewDelegateObserver* observer) override;
// Do a bulk replacement of the items in the model.
void ReplaceTestModel(int item_count);
diff --git a/ui/app_list/test/run_all_unittests.cc b/ui/app_list/test/run_all_unittests.cc
index fa3c94b..19f0a0c 100644
--- a/ui/app_list/test/run_all_unittests.cc
+++ b/ui/app_list/test/run_all_unittests.cc
@@ -23,7 +23,7 @@
AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
#if !defined(OS_MACOSX)
gfx::GLSurface::InitializeOneOffForTests();
#endif
@@ -35,7 +35,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/app_list/views/app_list_background.h b/ui/app_list/views/app_list_background.h
index 900e698..c3159a0 100644
--- a/ui/app_list/views/app_list_background.h
+++ b/ui/app_list/views/app_list_background.h
@@ -26,7 +26,7 @@
private:
// views::Background overrides:
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE;
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const override;
const int corner_radius_;
const AppListMainView* main_view_; // Owned by views hierarchy.
diff --git a/ui/app_list/views/app_list_folder_view.h b/ui/app_list/views/app_list_folder_view.h
index 2692578..58a25fb 100644
--- a/ui/app_list/views/app_list_folder_view.h
+++ b/ui/app_list/views/app_list_folder_view.h
@@ -58,15 +58,15 @@
void CloseFolderPage();
// views::View
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
// AppListModelObserver
- virtual void OnAppListItemWillBeDeleted(AppListItem* item) OVERRIDE;
+ virtual void OnAppListItemWillBeDeleted(AppListItem* item) override;
// ui::ImplicitAnimationObserver
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
AppsGridView* items_grid_view() { return items_grid_view_; }
@@ -81,29 +81,29 @@
const gfx::Point& drag_point_in_root_grid);
// Overridden from views::View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// Overridden from FolderHeaderViewDelegate:
virtual void NavigateBack(AppListFolderItem* item,
- const ui::Event& event_flags) OVERRIDE;
- virtual void GiveBackFocusToSearchBox() OVERRIDE;
+ const ui::Event& event_flags) override;
+ virtual void GiveBackFocusToSearchBox() override;
virtual void SetItemName(AppListFolderItem* item,
- const std::string& name) OVERRIDE;
+ const std::string& name) override;
// Overridden from AppsGridViewFolderDelegate:
- virtual void UpdateFolderViewBackground(bool show_bubble) OVERRIDE;
+ virtual void UpdateFolderViewBackground(bool show_bubble) override;
virtual void ReparentItem(AppListItemView* original_drag_view,
const gfx::Point& drag_point_in_folder_grid)
- OVERRIDE;
+ override;
virtual void DispatchDragEventForReparent(
AppsGridView::Pointer pointer,
- const gfx::Point& drag_point_in_folder_grid) OVERRIDE;
+ const gfx::Point& drag_point_in_folder_grid) override;
virtual void DispatchEndDragEventForReparent(
bool events_forwarded_to_drag_drop_host,
- bool cancel_drag) OVERRIDE;
- virtual bool IsPointOutsideOfFolderBoundary(const gfx::Point& point) OVERRIDE;
- virtual bool IsOEMFolder() const OVERRIDE;
- virtual void SetRootLevelDragViewVisible(bool visible) OVERRIDE;
+ bool cancel_drag) override;
+ virtual bool IsPointOutsideOfFolderBoundary(const gfx::Point& point) override;
+ virtual bool IsOEMFolder() const override;
+ virtual void SetRootLevelDragViewVisible(bool visible) override;
AppsContainerView* container_view_; // Not owned.
AppListMainView* app_list_main_view_; // Not Owned.
diff --git a/ui/app_list/views/app_list_item_view.h b/ui/app_list/views/app_list_item_view.h
index 8c7945b..8328969 100644
--- a/ui/app_list/views/app_list_item_view.h
+++ b/ui/app_list/views/app_list_item_view.h
@@ -107,36 +107,36 @@
void SetTitleSubpixelAA();
// views::View overrides:
- virtual const char* GetClassName() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual void Layout() override;
+ virtual void SchedulePaintInRect(const gfx::Rect& r) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// views::ContextMenuController overrides:
virtual void ShowContextMenuForView(views::View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
// views::CustomButton overrides:
- virtual void StateChanged() OVERRIDE;
- virtual bool ShouldEnterPushedState(const ui::Event& event) OVERRIDE;
+ virtual void StateChanged() override;
+ virtual bool ShouldEnterPushedState(const ui::Event& event) override;
// views::View overrides:
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
// ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// AppListItemObserver overrides:
- virtual void ItemIconChanged() OVERRIDE;
- virtual void ItemNameChanged() OVERRIDE;
- virtual void ItemIsInstallingChanged() OVERRIDE;
- virtual void ItemPercentDownloadedChanged() OVERRIDE;
- virtual void ItemBeingDestroyed() OVERRIDE;
+ virtual void ItemIconChanged() override;
+ virtual void ItemNameChanged() override;
+ virtual void ItemIsInstallingChanged() override;
+ virtual void ItemPercentDownloadedChanged() override;
+ virtual void ItemBeingDestroyed() override;
const bool is_folder_;
const bool is_in_folder_;
diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc
index 4404d35..b7e08b1 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -57,7 +57,7 @@
private:
// Overridden from views::View:
- virtual void ChildVisibilityChanged(views::View* child) OVERRIDE {
+ virtual void ChildVisibilityChanged(views::View* child) override {
DCHECK_EQ(search_box_, child);
host_->NotifySearchBoxVisibilityChanged();
}
@@ -92,7 +92,7 @@
private:
// AppListItemObserver overrides:
- virtual void ItemIconChanged() OVERRIDE {
+ virtual void ItemIconChanged() override {
owner_->OnItemIconLoaded(this);
// Note that IconLoader is released here.
}
diff --git a/ui/app_list/views/app_list_main_view.h b/ui/app_list/views/app_list_main_view.h
index b45559d..2abe961 100644
--- a/ui/app_list/views/app_list_main_view.h
+++ b/ui/app_list/views/app_list_main_view.h
@@ -97,18 +97,18 @@
void OnItemIconLoaded(IconLoader* loader);
// Overridden from AppsGridViewDelegate:
- virtual void ActivateApp(AppListItem* item, int event_flags) OVERRIDE;
+ virtual void ActivateApp(AppListItem* item, int event_flags) override;
virtual void GetShortcutPathForApp(
const std::string& app_id,
- const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
- virtual void CancelDragInActiveFolder() OVERRIDE;
+ const base::Callback<void(const base::FilePath&)>& callback) override;
+ virtual void CancelDragInActiveFolder() override;
// Overridden from SearchBoxViewDelegate:
- virtual void QueryChanged(SearchBoxView* sender) OVERRIDE;
+ virtual void QueryChanged(SearchBoxView* sender) override;
// Overridden from SearchResultListViewDelegate:
- virtual void OnResultInstalled(SearchResult* result) OVERRIDE;
- virtual void OnResultUninstalled(SearchResult* result) OVERRIDE;
+ virtual void OnResultInstalled(SearchResult* result) override;
+ virtual void OnResultUninstalled(SearchResult* result) override;
AppListViewDelegate* delegate_; // Owned by parent view (AppListView).
AppListModel* model_; // Unowned; ownership is handled by |delegate_|.
diff --git a/ui/app_list/views/app_list_main_view_unittest.cc b/ui/app_list/views/app_list_main_view_unittest.cc
index f92e041..08cd351 100644
--- a/ui/app_list/views/app_list_main_view_unittest.cc
+++ b/ui/app_list/views/app_list_main_view_unittest.cc
@@ -69,7 +69,7 @@
virtual ~AppListMainViewTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
delegate_.reset(new AppListTestViewDelegate);
@@ -89,7 +89,7 @@
widget_->SetContentsView(main_view_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
widget_->Close();
views::ViewsTestBase::TearDown();
delegate_.reset();
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index 2a01e82..c6b8896 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -90,7 +90,7 @@
virtual ~AppListOverlayBackground() {};
// Overridden from views::Background:
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const override {
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
paint.setColor(SK_ColorWHITE);
@@ -128,7 +128,7 @@
private:
// Overridden from ui::ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
+ virtual void OnImplicitAnimationsCompleted() override {
if (target_) {
target_->SetVisible(false);
target_ = NULL;
diff --git a/ui/app_list/views/app_list_view.h b/ui/app_list/views/app_list_view.h
index 0ee715a..c9cd5cf 100644
--- a/ui/app_list/views/app_list_view.h
+++ b/ui/app_list/views/app_list_view.h
@@ -90,17 +90,17 @@
bool ShouldCenterWindow() const;
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
virtual void Paint(gfx::Canvas* canvas,
- const views::CullSet& cull_set) OVERRIDE;
- virtual void OnThemeChanged() OVERRIDE;
+ const views::CullSet& cull_set) override;
+ virtual void OnThemeChanged() override;
// WidgetDelegate overrides:
- virtual bool ShouldHandleSystemCommands() const OVERRIDE;
+ virtual bool ShouldHandleSystemCommands() const override;
// Overridden from AppListViewDelegateObserver:
- virtual void OnProfilesChanged() OVERRIDE;
- virtual void OnShutdown() OVERRIDE;
+ virtual void OnProfilesChanged() override;
+ virtual void OnShutdown() override;
void Prerender();
@@ -133,29 +133,29 @@
// Overridden from views::BubbleDelegateView:
virtual void OnBeforeBubbleWidgetInit(
views::Widget::InitParams* params,
- views::Widget* widget) const OVERRIDE;
+ views::Widget* widget) const override;
// Overridden from views::WidgetDelegateView:
- virtual views::View* GetInitiallyFocusedView() OVERRIDE;
- virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
- virtual bool WidgetHasHitTestMask() const OVERRIDE;
- virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ virtual views::View* GetInitiallyFocusedView() override;
+ virtual gfx::ImageSkia GetWindowIcon() override;
+ virtual bool WidgetHasHitTestMask() const override;
+ virtual void GetWidgetHitTestMask(gfx::Path* mask) const override;
// Overridden from views::View:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ virtual void Layout() override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
// Overridden from views::WidgetObserver:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(views::Widget* widget) override;
virtual void OnWidgetVisibilityChanged(
- views::Widget* widget, bool visible) OVERRIDE;
+ views::Widget* widget, bool visible) override;
virtual void OnWidgetActivationChanged(
- views::Widget* widget, bool active) OVERRIDE;
+ views::Widget* widget, bool active) override;
// Overridden from SpeechUIModelObserver:
virtual void OnSpeechRecognitionStateChanged(
- SpeechRecognitionState new_state) OVERRIDE;
+ SpeechRecognitionState new_state) override;
AppListViewDelegate* delegate_; // Weak. Owned by AppListService.
diff --git a/ui/app_list/views/app_list_view_unittest.cc b/ui/app_list/views/app_list_view_unittest.cc
index 29428ea..2ee50d4 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -144,12 +144,12 @@
UnitTestViewDelegate(AppListViewTestContext* parent) : parent_(parent) {}
// Overridden from app_list::AppListViewDelegate:
- virtual bool ShouldCenterWindow() const OVERRIDE {
+ virtual bool ShouldCenterWindow() const override {
return app_list::switches::IsCenteredAppListEnabled();
}
// Overridden from app_list::test::AppListTestViewDelegate:
- virtual void ViewClosing() OVERRIDE { parent_->NativeWidgetClosing(); }
+ virtual void ViewClosing() override { parent_->NativeWidgetClosing(); }
private:
AppListViewTestContext* parent_;
@@ -563,7 +563,7 @@
virtual ~AppListViewTestAura() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
// On Ash (only) the app list is placed into an aura::Window "container",
@@ -578,7 +578,7 @@
test_context_.reset(new AppListViewTestContext(GetParam(), container));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
test_context_.reset();
views::ViewsTestBase::TearDown();
}
@@ -597,13 +597,13 @@
virtual ~AppListViewTestDesktop() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
set_views_delegate(new AppListViewTestViewsDelegate(this));
views::ViewsTestBase::SetUp();
test_context_.reset(new AppListViewTestContext(GetParam(), NULL));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
test_context_.reset();
views::ViewsTestBase::TearDown();
}
@@ -620,7 +620,7 @@
// Overridden from views::ViewsDelegate:
virtual void OnBeforeWidgetInit(
views::Widget::InitParams* params,
- views::internal::NativeWidgetDelegate* delegate) OVERRIDE;
+ views::internal::NativeWidgetDelegate* delegate) override;
private:
AppListViewTestDesktop* parent_;
diff --git a/ui/app_list/views/apps_container_view.h b/ui/app_list/views/apps_container_view.h
index 3278385..895d2e4 100644
--- a/ui/app_list/views/apps_container_view.h
+++ b/ui/app_list/views/apps_container_view.h
@@ -58,12 +58,12 @@
bool IsInFolderView() const;
// views::View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
// TopIconAnimationObserver overrides:
- virtual void OnTopIconAnimationsComplete() OVERRIDE;
+ virtual void OnTopIconAnimationsComplete() override;
AppsGridView* apps_grid_view() { return apps_grid_view_; }
FolderBackgroundView* folder_background_view() {
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index 53b365d..1c24bf5 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -137,7 +137,7 @@
virtual ~RowMoveAnimationDelegate() {}
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationProgressed(const gfx::Animation* animation) override {
view_->layer()->SetOpacity(animation->GetCurrentValue());
view_->layer()->ScheduleDraw();
@@ -148,11 +148,11 @@
layer_->ScheduleDraw();
}
}
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationEnded(const gfx::Animation* animation) override {
view_->layer()->SetOpacity(1.0f);
view_->SchedulePaint();
}
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationCanceled(const gfx::Animation* animation) override {
view_->layer()->SetOpacity(1.0f);
view_->SchedulePaint();
}
@@ -181,7 +181,7 @@
}
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationProgressed(const gfx::Animation* animation) override {
view_->layer()->SetOpacity(1 - animation->GetCurrentValue());
view_->layer()->ScheduleDraw();
}
@@ -199,10 +199,10 @@
public:
ItemMoveAnimationDelegate(views::View* view) : view_(view) {}
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationEnded(const gfx::Animation* animation) override {
view_->SchedulePaint();
}
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE {
+ virtual void AnimationCanceled(const gfx::Animation* animation) override {
view_->SchedulePaint();
}
@@ -301,14 +301,14 @@
private:
// Overridden from ui::DragSourceWin.
- virtual void OnDragSourceCancel() OVERRIDE {
+ virtual void OnDragSourceCancel() override {
canceled_ = true;
}
- virtual void OnDragSourceDrop() OVERRIDE {
+ virtual void OnDragSourceDrop() override {
}
- virtual void OnDragSourceMove() OVERRIDE {
+ virtual void OnDragSourceMove() override {
grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords());
}
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index 08a11f6..3a395cb 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -127,22 +127,22 @@
PaginationModel* pagination_model() { return &pagination_model_; }
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
virtual bool GetDropFormats(
int* formats,
- std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
- virtual bool CanDrop(const OSExchangeData& data) OVERRIDE;
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
+ std::set<OSExchangeData::CustomFormat>* custom_formats) override;
+ virtual bool CanDrop(const OSExchangeData& data) override;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override;
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
// Stops the timer that triggers a page flip during a drag.
void StopPageFlipTimer();
@@ -369,27 +369,27 @@
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from AppListItemListObserver:
- virtual void OnListItemAdded(size_t index, AppListItem* item) OVERRIDE;
- virtual void OnListItemRemoved(size_t index, AppListItem* item) OVERRIDE;
+ virtual void OnListItemAdded(size_t index, AppListItem* item) override;
+ virtual void OnListItemRemoved(size_t index, AppListItem* item) override;
virtual void OnListItemMoved(size_t from_index,
size_t to_index,
- AppListItem* item) OVERRIDE;
- virtual void OnAppListItemHighlight(size_t index, bool highlight) OVERRIDE;
+ AppListItem* item) override;
+ virtual void OnAppListItemHighlight(size_t index, bool highlight) override;
// Overridden from PaginationModelObserver:
- virtual void TotalPagesChanged() OVERRIDE;
- virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
- virtual void TransitionStarted() OVERRIDE;
- virtual void TransitionChanged() OVERRIDE;
+ virtual void TotalPagesChanged() override;
+ virtual void SelectedPageChanged(int old_selected, int new_selected) override;
+ virtual void TransitionStarted() override;
+ virtual void TransitionChanged() override;
// Overridden from AppListModelObserver:
- virtual void OnAppListModelStatusChanged() OVERRIDE;
+ virtual void OnAppListModelStatusChanged() override;
// ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
// Hide a given view temporarily without losing (mouse) events and / or
// changing the size of it. If |immediate| is set the change will be
diff --git a/ui/app_list/views/apps_grid_view_unittest.cc b/ui/app_list/views/apps_grid_view_unittest.cc
index b9cc401..492b233 100644
--- a/ui/app_list/views/apps_grid_view_unittest.cc
+++ b/ui/app_list/views/apps_grid_view_unittest.cc
@@ -63,10 +63,10 @@
private:
// PaginationModelObserver overrides:
- virtual void TotalPagesChanged() OVERRIDE {
+ virtual void TotalPagesChanged() override {
}
virtual void SelectedPageChanged(int old_selected,
- int new_selected) OVERRIDE {
+ int new_selected) override {
if (!selected_pages_.empty())
selected_pages_ += ',';
selected_pages_ += base::IntToString(new_selected);
@@ -74,9 +74,9 @@
if (wait_)
ui_loop_->Quit();
}
- virtual void TransitionStarted() OVERRIDE {
+ virtual void TransitionStarted() override {
}
- virtual void TransitionChanged() OVERRIDE {
+ virtual void TransitionChanged() override {
}
base::MessageLoopForUI* ui_loop_;
@@ -95,7 +95,7 @@
virtual ~AppsGridViewTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
model_.reset(new AppListTestModel);
model_->SetFoldersEnabled(true);
@@ -108,7 +108,7 @@
test_api_.reset(new AppsGridViewTestApi(apps_grid_view_.get()));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
apps_grid_view_.reset(); // Release apps grid view before models.
views::ViewsTestBase::TearDown();
}
@@ -189,30 +189,30 @@
virtual ~TestAppsGridViewFolderDelegate() {}
// Overridden from AppsGridViewFolderDelegate:
- virtual void UpdateFolderViewBackground(bool show_bubble) OVERRIDE {
+ virtual void UpdateFolderViewBackground(bool show_bubble) override {
show_bubble_ = show_bubble;
}
virtual void ReparentItem(AppListItemView* original_drag_view,
const gfx::Point& drag_point_in_folder_grid)
- OVERRIDE {}
+ override {}
virtual void DispatchDragEventForReparent(
AppsGridView::Pointer pointer,
- const gfx::Point& drag_point_in_folder_grid) OVERRIDE {}
+ const gfx::Point& drag_point_in_folder_grid) override {}
virtual void DispatchEndDragEventForReparent(
bool events_forwarded_to_drag_drop_host,
- bool cancel_drag) OVERRIDE {}
+ bool cancel_drag) override {}
virtual bool IsPointOutsideOfFolderBoundary(const gfx::Point& point)
- OVERRIDE {
+ override {
return false;
}
- virtual bool IsOEMFolder() const OVERRIDE { return false; }
+ virtual bool IsOEMFolder() const override { return false; }
- virtual void SetRootLevelDragViewVisible(bool visible) OVERRIDE {}
+ virtual void SetRootLevelDragViewVisible(bool visible) override {}
bool show_bubble() { return show_bubble_; }
diff --git a/ui/app_list/views/cached_label.h b/ui/app_list/views/cached_label.h
index 8b4360a..3120446 100644
--- a/ui/app_list/views/cached_label.h
+++ b/ui/app_list/views/cached_label.h
@@ -28,11 +28,11 @@
#if defined(OS_WIN)
// Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
#endif
// Overridden from ui::LayerDelegate:
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
private:
bool needs_repaint_;
diff --git a/ui/app_list/views/contents_switcher_view.h b/ui/app_list/views/contents_switcher_view.h
index 9c8f67c..c6f2bdf 100644
--- a/ui/app_list/views/contents_switcher_view.h
+++ b/ui/app_list/views/contents_switcher_view.h
@@ -34,13 +34,13 @@
private:
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from PaginationModelObserver:
- virtual void TotalPagesChanged() OVERRIDE;
- virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
- virtual void TransitionStarted() OVERRIDE;
- virtual void TransitionChanged() OVERRIDE;
+ virtual void TotalPagesChanged() override;
+ virtual void SelectedPageChanged(int old_selected, int new_selected) override;
+ virtual void TransitionStarted() override;
+ virtual void TransitionChanged() override;
ContentsView* contents_view_; // Owned by views hierarchy.
diff --git a/ui/app_list/views/contents_view.h b/ui/app_list/views/contents_view.h
index 092f08d..9546a0e 100644
--- a/ui/app_list/views/contents_view.h
+++ b/ui/app_list/views/contents_view.h
@@ -102,15 +102,15 @@
void AddBlankPageForTesting();
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
// Overridden from PaginationModelObserver:
- virtual void TotalPagesChanged() OVERRIDE;
- virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
- virtual void TransitionStarted() OVERRIDE;
- virtual void TransitionChanged() OVERRIDE;
+ virtual void TotalPagesChanged() override;
+ virtual void SelectedPageChanged(int old_selected, int new_selected) override;
+ virtual void TransitionStarted() override;
+ virtual void TransitionChanged() override;
// Returns the pagination model for the ContentsView.
const PaginationModel& pagination_model() { return pagination_model_; }
diff --git a/ui/app_list/views/folder_background_view.h b/ui/app_list/views/folder_background_view.h
index af4e8cf..dd6c9dd 100644
--- a/ui/app_list/views/folder_background_view.h
+++ b/ui/app_list/views/folder_background_view.h
@@ -38,10 +38,10 @@
private:
// views::View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
AppListFolderView* folder_view_;
ShowState show_state_;
diff --git a/ui/app_list/views/folder_header_view.h b/ui/app_list/views/folder_header_view.h
index c01b72d..3d1e7b6 100644
--- a/ui/app_list/views/folder_header_view.h
+++ b/ui/app_list/views/folder_header_view.h
@@ -41,7 +41,7 @@
void OnFolderItemRemoved();
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
private:
class FolderNameView;
@@ -61,20 +61,20 @@
bool IsFolderNameEnabledForTest() const;
// views::View overrides:
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// views::TextfieldController overrides:
virtual void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
// views::ButtonListener overrides:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// AppListItemObserver overrides:
- virtual void ItemNameChanged() OVERRIDE;
+ virtual void ItemNameChanged() override;
AppListFolderItem* folder_item_; // Not owned.
diff --git a/ui/app_list/views/folder_header_view_unittest.cc b/ui/app_list/views/folder_header_view_unittest.cc
index 34f1984..6408adb 100644
--- a/ui/app_list/views/folder_header_view_unittest.cc
+++ b/ui/app_list/views/folder_header_view_unittest.cc
@@ -32,12 +32,12 @@
// FolderHeaderViewDelegate
virtual void NavigateBack(AppListFolderItem* item,
- const ui::Event& event_flags) OVERRIDE {}
+ const ui::Event& event_flags) override {}
- virtual void GiveBackFocusToSearchBox() OVERRIDE {}
+ virtual void GiveBackFocusToSearchBox() override {}
virtual void SetItemName(AppListFolderItem* item,
- const std::string& name) OVERRIDE {
+ const std::string& name) override {
folder_name_ = name;
}
@@ -57,7 +57,7 @@
virtual ~FolderHeaderViewTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
model_.reset(new AppListTestModel);
model_->SetFoldersEnabled(true);
@@ -66,7 +66,7 @@
folder_header_view_.reset(new FolderHeaderView(delegate_.get()));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
folder_header_view_.reset(); // Release apps grid view before models.
delegate_.reset();
views::ViewsTestBase::TearDown();
diff --git a/ui/app_list/views/page_switcher.cc b/ui/app_list/views/page_switcher.cc
index 84077f9..4ab6d6c 100644
--- a/ui/app_list/views/page_switcher.cc
+++ b/ui/app_list/views/page_switcher.cc
@@ -49,11 +49,11 @@
void set_button_width(int button_width) { button_width_ = button_width; }
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(button_width_, kButtonHeight);
}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
if (state() == STATE_HOVERED)
PaintButton(canvas, kPagerHoverColor);
else
diff --git a/ui/app_list/views/page_switcher.h b/ui/app_list/views/page_switcher.h
index a1ca14a..88807db 100644
--- a/ui/app_list/views/page_switcher.h
+++ b/ui/app_list/views/page_switcher.h
@@ -34,21 +34,21 @@
void UpdateUIForDragPoint(const gfx::Point& point);
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
private:
void CalculateButtonWidthAndSpacing(int contents_width);
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from PaginationModelObserver:
- virtual void TotalPagesChanged() OVERRIDE;
- virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
- virtual void TransitionStarted() OVERRIDE;
- virtual void TransitionChanged() OVERRIDE;
+ virtual void TotalPagesChanged() override;
+ virtual void SelectedPageChanged(int old_selected, int new_selected) override;
+ virtual void TransitionStarted() override;
+ virtual void TransitionChanged() override;
PaginationModel* model_; // Owned by AppsGridView.
views::View* buttons_; // Owned by views hierarchy.
diff --git a/ui/app_list/views/progress_bar_view.h b/ui/app_list/views/progress_bar_view.h
index 0e61820..4aaaa63 100644
--- a/ui/app_list/views/progress_bar_view.h
+++ b/ui/app_list/views/progress_bar_view.h
@@ -22,8 +22,8 @@
virtual ~ProgressBarView();
// views::View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
scoped_ptr<views::Painter> background_painter_;
diff --git a/ui/app_list/views/pulsing_block_view.h b/ui/app_list/views/pulsing_block_view.h
index 22bbec2..f517bc0 100644
--- a/ui/app_list/views/pulsing_block_view.h
+++ b/ui/app_list/views/pulsing_block_view.h
@@ -28,7 +28,7 @@
void OnStartDelayTimer();
// views::View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
base::OneShotTimer<PulsingBlockView> start_delay_timer_;
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index 43cb313..6af224c 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -52,7 +52,7 @@
private:
// views::Background overrides:
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
+ virtual void Paint(gfx::Canvas* canvas, views::View* view) const override {
gfx::Rect bounds = view->GetContentsBounds();
SkPaint paint;
diff --git a/ui/app_list/views/search_box_view.h b/ui/app_list/views/search_box_view.h
index a2e3c8a..ef05438 100644
--- a/ui/app_list/views/search_box_view.h
+++ b/ui/app_list/views/search_box_view.h
@@ -55,8 +55,8 @@
}
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
private:
// Updates model text and selection model with current Textfield info.
@@ -67,28 +67,28 @@
// Overridden from views::TextfieldController:
virtual void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
virtual bool HandleKeyEvent(views::Textfield* sender,
- const ui::KeyEvent& key_event) OVERRIDE;
+ const ui::KeyEvent& key_event) override;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from views::MenuButtonListener:
virtual void OnMenuButtonClicked(View* source,
- const gfx::Point& point) OVERRIDE;
+ const gfx::Point& point) override;
// Overridden from SearchBoxModelObserver:
- virtual void IconChanged() OVERRIDE;
- virtual void SpeechRecognitionButtonPropChanged() OVERRIDE;
- virtual void HintTextChanged() OVERRIDE;
- virtual void SelectionModelChanged() OVERRIDE;
- virtual void TextChanged() OVERRIDE;
+ virtual void IconChanged() override;
+ virtual void SpeechRecognitionButtonPropChanged() override;
+ virtual void HintTextChanged() override;
+ virtual void SelectionModelChanged() override;
+ virtual void TextChanged() override;
// Overridden from SpeechUIModelObserver:
virtual void OnSpeechRecognitionStateChanged(
- SpeechRecognitionState new_state) OVERRIDE;
+ SpeechRecognitionState new_state) override;
SearchBoxViewDelegate* delegate_; // Not owned.
AppListViewDelegate* view_delegate_; // Not owned.
diff --git a/ui/app_list/views/search_box_view_unittest.cc b/ui/app_list/views/search_box_view_unittest.cc
index cc7354e..a1643a0 100644
--- a/ui/app_list/views/search_box_view_unittest.cc
+++ b/ui/app_list/views/search_box_view_unittest.cc
@@ -29,7 +29,7 @@
private:
// Overridden from views::View:
- virtual bool OnKeyPressed(const ui::KeyEvent& key_event) OVERRIDE {
+ virtual bool OnKeyPressed(const ui::KeyEvent& key_event) override {
if (!::isalnum(static_cast<int>(key_event.key_code()))) {
++count_;
return true;
@@ -48,7 +48,7 @@
virtual ~SearchBoxViewTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::test::WidgetTest::SetUp();
widget_ = CreateTopLevelPlatformWidget();
view_ = new SearchBoxView(this, &view_delegate_);
@@ -58,7 +58,7 @@
view_->set_contents_view(counter_view_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
widget_->CloseNow();
views::test::WidgetTest::TearDown();
}
@@ -107,7 +107,7 @@
private:
// Overridden from SearchBoxViewDelegate:
- virtual void QueryChanged(SearchBoxView* sender) OVERRIDE {
+ virtual void QueryChanged(SearchBoxView* sender) override {
++query_changed_count_;
last_query_ = sender->search_box()->text();
}
diff --git a/ui/app_list/views/search_result_actions_view.h b/ui/app_list/views/search_result_actions_view.h
index 7e5fa75..bb11a8b 100644
--- a/ui/app_list/views/search_result_actions_view.h
+++ b/ui/app_list/views/search_result_actions_view.h
@@ -34,11 +34,11 @@
void CreateBlueButton(const SearchResult::Action& action);
// views::View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// views::ButtonListener overrides:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
SearchResultActionsViewDelegate* delegate_; // Not owned.
int selected_action_;
diff --git a/ui/app_list/views/search_result_list_view.h b/ui/app_list/views/search_result_list_view.h
index e46bc23..40e9414 100644
--- a/ui/app_list/views/search_result_list_view.h
+++ b/ui/app_list/views/search_result_list_view.h
@@ -54,8 +54,8 @@
void OnSearchResultUninstalled(SearchResultView* view);
// Overridden from views::View:
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual gfx::Size GetPreferredSize() const override;
private:
friend class test::SearchResultListViewTest;
@@ -78,20 +78,20 @@
void ForceAutoLaunchForTest();
// Overridden from views::View:
- virtual void Layout() OVERRIDE;
- virtual int GetHeightForWidth(int w) const OVERRIDE;
+ virtual void Layout() override;
+ virtual int GetHeightForWidth(int w) const override;
virtual void VisibilityChanged(
- views::View* starting_from, bool is_visible) OVERRIDE;
+ views::View* starting_from, bool is_visible) override;
// Overridden from gfx::AnimationDelegate:
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
// Overridden from ui::ListModelObserver:
- virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE;
- virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE;
- virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE;
- virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE;
+ virtual void ListItemsAdded(size_t start, size_t count) override;
+ virtual void ListItemsRemoved(size_t start, size_t count) override;
+ virtual void ListItemMoved(size_t index, size_t target_index) override;
+ virtual void ListItemsChanged(size_t start, size_t count) override;
SearchResultListViewDelegate* delegate_; // Not owned.
AppListViewDelegate* view_delegate_; // Not owned.
diff --git a/ui/app_list/views/search_result_list_view_unittest.cc b/ui/app_list/views/search_result_list_view_unittest.cc
index e48a760..a42ba68 100644
--- a/ui/app_list/views/search_result_list_view_unittest.cc
+++ b/ui/app_list/views/search_result_list_view_unittest.cc
@@ -29,7 +29,7 @@
virtual ~SearchResultListViewTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
view_.reset(new SearchResultListView(this, &view_delegate_));
view_->SetResults(view_delegate_.GetModel()->results());
@@ -111,8 +111,8 @@
}
private:
- virtual void OnResultInstalled(SearchResult* result) OVERRIDE {}
- virtual void OnResultUninstalled(SearchResult* result) OVERRIDE {}
+ virtual void OnResultInstalled(SearchResult* result) override {}
+ virtual void OnResultUninstalled(SearchResult* result) override {}
AppListTestViewDelegate view_delegate_;
scoped_ptr<SearchResultListView> view_;
diff --git a/ui/app_list/views/search_result_view.h b/ui/app_list/views/search_result_view.h
index c05e6bd..ae744f2 100644
--- a/ui/app_list/views/search_result_view.h
+++ b/ui/app_list/views/search_result_view.h
@@ -66,33 +66,33 @@
void UpdateDetailsText();
// views::View overrides:
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void ChildPreferredSizeChanged(views::View* child) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// views::ButtonListener overrides:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// views::ContextMenuController overrides:
virtual void ShowContextMenuForView(views::View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
// SearchResultObserver overrides:
- virtual void OnIconChanged() OVERRIDE;
- virtual void OnActionsChanged() OVERRIDE;
- virtual void OnIsInstallingChanged() OVERRIDE;
- virtual void OnPercentDownloadedChanged() OVERRIDE;
- virtual void OnItemInstalled() OVERRIDE;
- virtual void OnItemUninstalled() OVERRIDE;
+ virtual void OnIconChanged() override;
+ virtual void OnActionsChanged() override;
+ virtual void OnIsInstallingChanged() override;
+ virtual void OnPercentDownloadedChanged() override;
+ virtual void OnItemInstalled() override;
+ virtual void OnItemUninstalled() override;
// SearchResultActionsViewDelegate overrides:
virtual void OnSearchResultActionActivated(size_t index,
- int event_flags) OVERRIDE;
+ int event_flags) override;
SearchResult* result_; // Owned by AppListModel::SearchResults.
diff --git a/ui/app_list/views/speech_view.cc b/ui/app_list/views/speech_view.cc
index 7fb213f..82e5f3c 100644
--- a/ui/app_list/views/speech_view.cc
+++ b/ui/app_list/views/speech_view.cc
@@ -53,7 +53,7 @@
private:
// Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
DISALLOW_COPY_AND_ASSIGN(SoundLevelIndicator);
};
@@ -79,7 +79,7 @@
private:
// views::MaskedTargeterDelegate:
- virtual bool GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ virtual bool GetHitTestMask(gfx::Path* mask) const override;
DISALLOW_COPY_AND_ASSIGN(MicButton);
};
diff --git a/ui/app_list/views/speech_view.h b/ui/app_list/views/speech_view.h
index 53a2f7b..d0d9cf6 100644
--- a/ui/app_list/views/speech_view.h
+++ b/ui/app_list/views/speech_view.h
@@ -34,8 +34,8 @@
void Reset();
// Overridden from views::View:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
views::ImageButton* mic_button() { return mic_button_; }
@@ -44,14 +44,14 @@
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from SpeechUIModelObserver:
- virtual void OnSpeechSoundLevelChanged(uint8 level) OVERRIDE;
+ virtual void OnSpeechSoundLevelChanged(uint8 level) override;
virtual void OnSpeechResult(const base::string16& result,
- bool is_final) OVERRIDE;
+ bool is_final) override;
virtual void OnSpeechRecognitionStateChanged(
- SpeechRecognitionState new_state) OVERRIDE;
+ SpeechRecognitionState new_state) override;
AppListViewDelegate* delegate_;
diff --git a/ui/app_list/views/speech_view_unittest.cc b/ui/app_list/views/speech_view_unittest.cc
index 1c49faa..ad49f0d 100644
--- a/ui/app_list/views/speech_view_unittest.cc
+++ b/ui/app_list/views/speech_view_unittest.cc
@@ -18,7 +18,7 @@
virtual ~SpeechViewTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::test::WidgetTest::SetUp();
widget_ = CreateTopLevelPlatformWidget();
widget_->SetBounds(gfx::Rect(0, 0, 300, 200));
@@ -27,7 +27,7 @@
view_->SetBoundsRect(widget_->GetContentsView()->GetLocalBounds());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
widget_->CloseNow();
views::test::WidgetTest::TearDown();
}
diff --git a/ui/app_list/views/start_page_view.cc b/ui/app_list/views/start_page_view.cc
index 23d2f64..580c986 100644
--- a/ui/app_list/views/start_page_view.cc
+++ b/ui/app_list/views/start_page_view.cc
@@ -53,7 +53,7 @@
virtual ~DummySearchBoxView() {}
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
gfx::Size size(SearchBoxView::GetPreferredSize());
size.set_width(kDummySearchBoxWidth);
return size;
diff --git a/ui/app_list/views/start_page_view.h b/ui/app_list/views/start_page_view.h
index 857c65a..2949ec5 100644
--- a/ui/app_list/views/start_page_view.h
+++ b/ui/app_list/views/start_page_view.h
@@ -41,8 +41,8 @@
SearchBoxView* dummy_search_box_view() { return search_box_view_; }
// Overridden from views::View:
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void Layout() override;
private:
enum ShowState {
@@ -64,13 +64,13 @@
void ScheduleUpdate();
// Overridden from SearchBoxViewDelegate:
- virtual void QueryChanged(SearchBoxView* sender) OVERRIDE;
+ virtual void QueryChanged(SearchBoxView* sender) override;
// Overridden from ui::ListModelObserver:
- virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE;
- virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE;
- virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE;
- virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE;
+ virtual void ListItemsAdded(size_t start, size_t count) override;
+ virtual void ListItemsRemoved(size_t start, size_t count) override;
+ virtual void ListItemMoved(size_t index, size_t target_index) override;
+ virtual void ListItemsChanged(size_t start, size_t count) override;
// The parent view of ContentsView which is the parent of this view.
AppListMainView* app_list_main_view_;
diff --git a/ui/app_list/views/tile_item_view.h b/ui/app_list/views/tile_item_view.h
index baf61aa..816adfd 100644
--- a/ui/app_list/views/tile_item_view.h
+++ b/ui/app_list/views/tile_item_view.h
@@ -31,15 +31,15 @@
private:
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from SearchResultObserver:
- virtual void OnIconChanged() OVERRIDE;
- virtual void OnResultDestroying() OVERRIDE;
+ virtual void OnIconChanged() override;
+ virtual void OnResultDestroying() override;
// Owned by the model provided by the AppListViewDelegate.
SearchResult* item_;
diff --git a/ui/app_list/views/top_icon_animation_view.h b/ui/app_list/views/top_icon_animation_view.h
index 4dc2aa5..a3c1286 100644
--- a/ui/app_list/views/top_icon_animation_view.h
+++ b/ui/app_list/views/top_icon_animation_view.h
@@ -54,12 +54,12 @@
private:
// views::View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
// ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
- virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
+ virtual bool RequiresNotificationWhenAnimatorDestroyed() const override;
gfx::Size icon_size_;
views::ImageView* icon_; // Owned by views hierarchy.
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index 4f9a4a8..8b22fbb 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -142,8 +142,6 @@
}
}
-if (false) {
-
source_set("test_support") {
testonly = true
sources = [
@@ -305,5 +303,3 @@
]
}
}
-
-} # if (false)
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index 447b303..4704f7b 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -60,19 +60,19 @@
virtual ~ColoredLayer() {}
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
if (draw_) {
canvas->DrawColor(color_);
}
}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
+ const gfx::Rect& damage_rect_in_dip) override {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -97,12 +97,12 @@
max_frames_(max_frames) {
}
- virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE {}
+ virtual void OnCompositingDidCommit(ui::Compositor* compositor) override {}
virtual void OnCompositingStarted(Compositor* compositor,
- base::TimeTicks start_time) OVERRIDE {}
+ base::TimeTicks start_time) override {}
- virtual void OnCompositingEnded(Compositor* compositor) OVERRIDE {
+ virtual void OnCompositingEnded(Compositor* compositor) override {
if (start_time_.is_null()) {
start_time_ = TimeTicks::Now();
} else {
@@ -121,10 +121,10 @@
}
}
- virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE {}
+ virtual void OnCompositingAborted(Compositor* compositor) override {}
virtual void OnCompositingLockStateChanged(
- Compositor* compositor) OVERRIDE {}
+ Compositor* compositor) override {}
virtual void Draw() {}
@@ -157,7 +157,7 @@
int max_frames)
: BenchCompositorObserver(max_frames),
parent_(parent),
- webgl_(ui::LAYER_TEXTURED),
+ webgl_(ui::LAYER_SOLID_COLOR),
compositor_(compositor),
fbo_(0),
do_draw_(true) {
@@ -223,13 +223,13 @@
}
virtual ~WebGLBench() {
- webgl_.SetShowPaintedContent();
+ webgl_.SetShowSolidColorContent();
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
gl->DeleteFramebuffers(1, &fbo_);
compositor_->RemoveObserver(this);
}
- virtual void Draw() OVERRIDE {
+ virtual void Draw() override {
if (do_draw_) {
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
gl->ClearColor((frames() % kFrames)*1.0/kFrames, 1.f, 0.f, 1.f);
@@ -273,7 +273,7 @@
compositor_->RemoveObserver(this);
}
- virtual void Draw() OVERRIDE {
+ virtual void Draw() override {
layer_->set_color(
SkColorSetARGBInline(255*(frames() % kFrames)/kFrames, 255, 0, 255));
layer_->SchedulePaint(gfx::Rect(layer_->bounds().size()));
diff --git a/ui/aura/client/default_capture_client.h b/ui/aura/client/default_capture_client.h
index cae13b7..41194af 100644
--- a/ui/aura/client/default_capture_client.h
+++ b/ui/aura/client/default_capture_client.h
@@ -20,10 +20,10 @@
private:
// Overridden from client::CaptureClient:
- virtual void SetCapture(Window* window) OVERRIDE;
- virtual void ReleaseCapture(Window* window) OVERRIDE;
- virtual Window* GetCaptureWindow() OVERRIDE;
- virtual Window* GetGlobalCaptureWindow() OVERRIDE;
+ virtual void SetCapture(Window* window) override;
+ virtual void ReleaseCapture(Window* window) override;
+ virtual Window* GetCaptureWindow() override;
+ virtual Window* GetGlobalCaptureWindow() override;
Window* root_window_;
Window* capture_window_;
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index f531cd3..ec5ea52 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -39,38 +39,38 @@
explicit DemoWindowDelegate(SkColor color) : color_(color) {}
// Overridden from WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
+ virtual gfx::Size GetMinimumSize() const override {
return gfx::Size();
}
- virtual gfx::Size GetMaximumSize() const OVERRIDE {
+ virtual gfx::Size GetMaximumSize() const override {
return gfx::Size();
}
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
+ const gfx::Rect& new_bounds) override {}
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override {
return gfx::kNullCursor;
}
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
+ virtual int GetNonClientComponent(const gfx::Point& point) const override {
return HTCAPTION;
}
virtual bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) OVERRIDE {
+ const gfx::Point& location) override {
return true;
}
- virtual bool CanFocus() OVERRIDE { return true; }
- virtual void OnCaptureLost() OVERRIDE {}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual bool CanFocus() override { return true; }
+ virtual void OnCaptureLost() override {}
+ virtual void OnPaint(gfx::Canvas* canvas) override {
canvas->DrawColor(color_, SkXfermode::kSrc_Mode);
}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {}
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {}
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {}
- virtual bool HasHitTestMask() const OVERRIDE { return false; }
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
+ virtual void OnWindowDestroying(aura::Window* window) override {}
+ virtual void OnWindowDestroyed(aura::Window* window) override {}
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override {}
+ virtual bool HasHitTestMask() const override { return false; }
+ virtual void GetHitTestMask(gfx::Path* mask) const override {}
private:
SkColor color_;
@@ -91,7 +91,7 @@
// Overridden from aura::client::WindowTreeClient:
virtual aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
if (!capture_client_) {
capture_client_.reset(
new aura::client::DefaultCaptureClient(window_->GetRootWindow()));
diff --git a/ui/aura/env.h b/ui/aura/env.h
index e857da6..480c6cb 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -87,10 +87,10 @@
void NotifyHostActivated(WindowTreeHost* host);
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
- virtual ui::EventTarget* GetParentTarget() OVERRIDE;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
+ virtual bool CanAcceptEvent(const ui::Event& event) override;
+ virtual ui::EventTarget* GetParentTarget() override;
+ virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ virtual ui::EventTargeter* GetEventTargeter() override;
ObserverList<EnvObserver> observers_;
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index 7e0faa5..f1b51d8 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -196,7 +196,7 @@
run_loop_->Run();
}
- virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* gesture) override {
events_.push_back(gesture->type());
bounding_box_ = gesture->details().bounding_box();
flags_ = gesture->flags();
@@ -346,7 +346,7 @@
}
}
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
if (queue_events_) {
queue_.push(new ui::TouchEvent(*event, window_, window_));
event->StopPropagation();
@@ -409,7 +409,7 @@
bool mouse_release() const { return mouse_release_; }
bool double_click() const { return double_click_; }
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
switch (event->type()) {
case ui::ET_MOUSE_PRESSED:
double_click_ = event->flags() & ui::EF_IS_DOUBLE_CLICK;
@@ -498,8 +498,8 @@
int time_step,
int num_steps,
GestureEventConsumeDelegate* delegate) {
- int x = x_start;
- int y = y_start;
+ float x = x_start;
+ float y = y_start;
for (int i = 0; i < num_steps; i++) {
x += dx;
@@ -538,7 +538,7 @@
virtual ~TestEventHandler() {}
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
switch (event->type()) {
case ui::ET_TOUCH_RELEASED:
touch_released_count_++;
@@ -592,7 +592,7 @@
private:
// ui::EventHandler:
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
TestEventHandler::OnTouchEvent(event);
if (event->type() == ui::ET_TOUCH_CANCELLED) {
Window* target = static_cast<Window*>(event->target());
@@ -633,10 +633,10 @@
public:
GestureRecognizerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
ui::GestureConfiguration::set_show_press_delay_in_ms(2);
- ui::GestureConfiguration::set_long_press_time_in_seconds(0.003);
+ ui::GestureConfiguration::set_long_press_time_in_ms(3);
}
DISALLOW_COPY_AND_ASSIGN(GestureRecognizerTest);
@@ -939,7 +939,7 @@
// that distance to be consumed by the slop, so we set the slop radius to
// sqrt(5 * 5 + 5 * 5).
ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(
- sqrt(static_cast<double>(5 * 5 + 5 * 5)));
+ sqrt(5.f * 5 + 5 * 5));
scoped_ptr<GestureEventConsumeDelegate> delegate(
new GestureEventConsumeDelegate());
TimedEvents tes;
@@ -1010,7 +1010,7 @@
// distance to be consumed by the slop, so we set the slop radius to
// sqrt(5 * 5 + 5 * 5).
ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(
- sqrt(static_cast<double>(5 * 5 + 5 * 5)));
+ sqrt(5.f * 5 + 5 * 5));
scoped_ptr<GestureEventConsumeDelegate> delegate(
new GestureEventConsumeDelegate());
@@ -1080,7 +1080,7 @@
// Check that the bounding box during a scroll event is correct.
TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) {
TimedEvents tes;
- for (int radius = 1; radius <= 10; ++radius) {
+ for (float radius = 1; radius <= 10; ++radius) {
ui::GestureConfiguration::set_default_radius(radius);
scoped_ptr<GestureEventConsumeDelegate> delegate(
new GestureEventConsumeDelegate());
@@ -1091,44 +1091,44 @@
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
delegate.get(), -1234, bounds, root_window()));
- const int kPositionX = 101;
- const int kPositionY = 201;
+ const float kPositionX = 101;
+ const float kPositionY = 201;
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
- gfx::Point(kPositionX, kPositionY),
+ gfx::PointF(kPositionX, kPositionY),
kTouchId,
tes.Now());
DispatchEventUsingWindowDispatcher(&press);
- EXPECT_EQ(gfx::Rect(kPositionX - radius,
- kPositionY - radius,
- radius * 2,
- radius * 2).ToString(),
- delegate->bounding_box().ToString());
+ EXPECT_EQ(gfx::RectF(kPositionX - radius,
+ kPositionY - radius,
+ radius * 2,
+ radius * 2),
+ delegate->bounding_box());
const int kScrollAmount = 50;
tes.SendScrollEvents(event_processor(), kPositionX, kPositionY,
- 1, 1, kTouchId, 1, kScrollAmount, delegate.get());
+ 1, 1, kTouchId, 1, kScrollAmount, delegate.get());
EXPECT_EQ(gfx::Point(1, 1).ToString(),
delegate->scroll_begin_position().ToString());
- EXPECT_EQ(gfx::Rect(kPositionX + kScrollAmount - radius,
- kPositionY + kScrollAmount - radius,
- radius * 2,
- radius * 2).ToString(),
- delegate->bounding_box().ToString());
+ EXPECT_EQ(gfx::RectF(kPositionX + kScrollAmount - radius,
+ kPositionY + kScrollAmount - radius,
+ radius * 2,
+ radius * 2),
+ delegate->bounding_box());
// Release the touch. This should end the scroll.
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED,
- gfx::Point(kPositionX + kScrollAmount,
- kPositionY + kScrollAmount),
+ gfx::PointF(kPositionX + kScrollAmount,
+ kPositionY + kScrollAmount),
kTouchId, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
DispatchEventUsingWindowDispatcher(&release);
- EXPECT_EQ(gfx::Rect(kPositionX + kScrollAmount - radius,
- kPositionY + kScrollAmount - radius,
- radius * 2,
- radius * 2).ToString(),
- delegate->bounding_box().ToString());
+ EXPECT_EQ(gfx::RectF(kPositionX + kScrollAmount - radius,
+ kPositionY + kScrollAmount - radius,
+ radius * 2,
+ radius * 2),
+ delegate->bounding_box());
}
ui::GestureConfiguration::set_default_radius(0);
}
@@ -1366,8 +1366,7 @@
// Check that appropriate touch events generate long tap events
TEST_F(GestureRecognizerTest, GestureEventLongTap) {
- ui::GestureConfiguration::set_max_touch_down_duration_in_seconds_for_click(
- 0.0025);
+ ui::GestureConfiguration::set_max_touch_down_duration_for_click_in_ms(3);
scoped_ptr<GestureEventConsumeDelegate> delegate(
new GestureEventConsumeDelegate());
const int kWindowWidth = 123;
@@ -1574,7 +1573,7 @@
// distance to be consumed by the slop, so we set the slop radius to
// sqrt(5 * 5 + 5 * 5).
ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(
- sqrt(static_cast<double>(5 * 5 + 5 * 5)));
+ sqrt(5.f * 5 + 5 * 5));
// First, tap. Then, do a scroll using the same touch-id.
scoped_ptr<GestureEventConsumeDelegate> delegate(
@@ -1831,9 +1830,13 @@
// should generate both SCROLL_BEGIN and PINCH_BEGIN gestures.
queued_delegate->Reset();
delegate->Reset();
- int x_move = ui::GestureConfiguration::max_touch_move_in_pixels_for_click();
ui::TouchEvent move(
- ui::ET_TOUCH_MOVED, gfx::Point(203 + x_move, 303), kTouchId2, tes.Now());
+ ui::ET_TOUCH_MOVED,
+ gfx::PointF(
+ 203 + ui::GestureConfiguration::max_touch_move_in_pixels_for_click(),
+ 303),
+ kTouchId2,
+ tes.Now());
DispatchEventUsingWindowDispatcher(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
@@ -2979,7 +2982,7 @@
void set_consume_touch_move(bool consume) { consume_touch_move_ = consume; }
private:
- virtual void OnTouchEvent(ui::TouchEvent* touch) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* touch) override {
if (consume_touch_move_ && touch->type() == ui::ET_TOUCH_MOVED)
touch->SetHandled();
else
@@ -4105,7 +4108,7 @@
void set_window(aura::Window** window) { window_ = window; }
- virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* gesture) override {
GestureEventConsumeDelegate::OnGestureEvent(gesture);
if (gesture->type() != ui::ET_GESTURE_LONG_PRESS)
return;
diff --git a/ui/aura/input_state_lookup_win.h b/ui/aura/input_state_lookup_win.h
index 4178841..94e4ee6 100644
--- a/ui/aura/input_state_lookup_win.h
+++ b/ui/aura/input_state_lookup_win.h
@@ -18,7 +18,7 @@
virtual ~InputStateLookupWin();
// InputStateLookup overrides:
- virtual bool IsMouseButtonDown() const OVERRIDE;
+ virtual bool IsMouseButtonDown() const override;
private:
DISALLOW_COPY_AND_ASSIGN(InputStateLookupWin);
diff --git a/ui/aura/remote_window_tree_host_win.h b/ui/aura/remote_window_tree_host_win.h
index 9a726d1..d1454d2 100644
--- a/ui/aura/remote_window_tree_host_win.h
+++ b/ui/aura/remote_window_tree_host_win.h
@@ -116,28 +116,28 @@
void OnImeInputSourceChanged(uint16 language_id, bool is_ime);
// WindowTreeHost overrides:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
// ui::EventSource:
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
// ui::internal::RemoteInputMethodDelegateWin overrides:
- virtual void CancelComposition() OVERRIDE;
+ virtual void CancelComposition() override;
virtual void OnTextInputClientUpdated(
const std::vector<int32>& input_scopes,
- const std::vector<gfx::Rect>& composition_character_bounds) OVERRIDE;
+ const std::vector<gfx::Rect>& composition_character_bounds) override;
// Helper function to dispatch a keyboard message to the desired target.
// The default target is the WindowEventDispatcher. For nested message loop
diff --git a/ui/aura/scoped_window_targeter.h b/ui/aura/scoped_window_targeter.h
index f8546c5..14c3e89 100644
--- a/ui/aura/scoped_window_targeter.h
+++ b/ui/aura/scoped_window_targeter.h
@@ -33,7 +33,7 @@
private:
// WindowObserver:
- virtual void OnWindowDestroyed(Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(Window* window) override;
Window* window_;
scoped_ptr<ui::EventTargeter> old_targeter_;
diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc
index 039661d..a6271cc 100644
--- a/ui/aura/test/aura_test_base.cc
+++ b/ui/aura/test/aura_test_base.cc
@@ -37,21 +37,20 @@
// Changing the parameters for gesture recognition shouldn't cause
// tests to fail, so we use a separate set of parameters for unit
// testing.
- ui::GestureConfiguration::set_long_press_time_in_seconds(1.0);
- ui::GestureConfiguration::set_semi_long_press_time_in_seconds(0.4);
+ ui::GestureConfiguration::set_long_press_time_in_ms(1000);
+ ui::GestureConfiguration::set_semi_long_press_time_in_ms(400);
ui::GestureConfiguration::set_show_press_delay_in_ms(5);
ui::GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(300);
- ui::GestureConfiguration::set_max_seconds_between_double_click(0.7);
+ ui::GestureConfiguration::set_max_time_between_double_click_in_ms(700);
ui::GestureConfiguration::
set_max_separation_for_gesture_touches_in_pixels(150);
- ui::GestureConfiguration::
- set_max_touch_down_duration_in_seconds_for_click(0.8);
+ ui::GestureConfiguration::set_max_touch_down_duration_for_click_in_ms(800);
ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(5);
ui::GestureConfiguration::set_max_distance_between_taps_for_double_tap(20);
ui::GestureConfiguration::set_min_distance_for_pinch_scroll_in_pixels(20);
ui::GestureConfiguration::set_min_pinch_update_distance_in_pixels(5);
ui::GestureConfiguration::set_default_radius(0);
- ui::GestureConfiguration::set_fling_velocity_cap(15000.0f);
+ ui::GestureConfiguration::set_fling_velocity_cap(15000);
ui::GestureConfiguration::set_min_swipe_speed(10);
// The ContextFactory must exist before any Compositors are created.
diff --git a/ui/aura/test/aura_test_base.h b/ui/aura/test/aura_test_base.h
index b9f6e7f..4717243 100644
--- a/ui/aura/test/aura_test_base.h
+++ b/ui/aura/test/aura_test_base.h
@@ -24,8 +24,8 @@
virtual ~AuraTestBase();
// testing::Test:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
// Creates a normal window parented to |parent|.
aura::Window* CreateNormalWindow(int id, Window* parent,
diff --git a/ui/aura/test/event_generator_delegate_aura.cc b/ui/aura/test/event_generator_delegate_aura.cc
index a4041a3..576cc8e 100644
--- a/ui/aura/test/event_generator_delegate_aura.cc
+++ b/ui/aura/test/event_generator_delegate_aura.cc
@@ -22,17 +22,17 @@
// EventGeneratorDelegate:
virtual void SetContext(ui::test::EventGenerator* owner,
gfx::NativeWindow root_window,
- gfx::NativeWindow window) OVERRIDE {
+ gfx::NativeWindow window) override {
root_window_ = root_window;
}
// EventGeneratorDelegateAura:
- virtual WindowTreeHost* GetHostAt(const gfx::Point& point) const OVERRIDE {
+ virtual WindowTreeHost* GetHostAt(const gfx::Point& point) const override {
return root_window_->GetHost();
}
virtual client::ScreenPositionClient* GetScreenPositionClient(
- const aura::Window* window) const OVERRIDE {
+ const aura::Window* window) const override {
return NULL;
}
diff --git a/ui/aura/test/event_generator_delegate_aura.h b/ui/aura/test/event_generator_delegate_aura.h
index 5d37538..b43bf68 100644
--- a/ui/aura/test/event_generator_delegate_aura.h
+++ b/ui/aura/test/event_generator_delegate_aura.h
@@ -35,17 +35,17 @@
const aura::Window* window) const = 0;
// Overridden from ui::test::EventGeneratorDelegate:
- virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) OVERRIDE;
- virtual ui::EventSource* GetEventSource(ui::EventTarget* target) OVERRIDE;
+ virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) override;
+ virtual ui::EventSource* GetEventSource(ui::EventTarget* target) override;
virtual gfx::Point CenterOfTarget(
- const ui::EventTarget* target) const OVERRIDE;
- virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const OVERRIDE;
+ const ui::EventTarget* target) const override;
+ virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const override;
virtual void ConvertPointFromTarget(const ui::EventTarget* target,
- gfx::Point* point) const OVERRIDE;
+ gfx::Point* point) const override;
virtual void ConvertPointToTarget(const ui::EventTarget* target,
- gfx::Point* point) const OVERRIDE;
+ gfx::Point* point) const override;
virtual void ConvertPointFromHost(const ui::EventTarget* hosted_target,
- gfx::Point* point) const OVERRIDE;
+ gfx::Point* point) const override;
private:
DISALLOW_COPY_AND_ASSIGN(EventGeneratorDelegateAura);
diff --git a/ui/aura/test/test_cursor_client.h b/ui/aura/test/test_cursor_client.h
index 1372c33..c3f845e 100644
--- a/ui/aura/test/test_cursor_client.h
+++ b/ui/aura/test/test_cursor_client.h
@@ -32,26 +32,26 @@
}
// Overridden from aura::client::CursorClient:
- virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual gfx::NativeCursor GetCursor() const OVERRIDE;
- virtual void ShowCursor() OVERRIDE;
- virtual void HideCursor() OVERRIDE;
- virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
- virtual ui::CursorSetType GetCursorSet() const OVERRIDE;
- virtual bool IsCursorVisible() const OVERRIDE;
- virtual void EnableMouseEvents() OVERRIDE;
- virtual void DisableMouseEvents() OVERRIDE;
- virtual bool IsMouseEventsEnabled() const OVERRIDE;
- virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
- virtual void LockCursor() OVERRIDE;
- virtual void UnlockCursor() OVERRIDE;
- virtual bool IsCursorLocked() const OVERRIDE;
+ virtual void SetCursor(gfx::NativeCursor cursor) override;
+ virtual gfx::NativeCursor GetCursor() const override;
+ virtual void ShowCursor() override;
+ virtual void HideCursor() override;
+ virtual void SetCursorSet(ui::CursorSetType cursor_set) override;
+ virtual ui::CursorSetType GetCursorSet() const override;
+ virtual bool IsCursorVisible() const override;
+ virtual void EnableMouseEvents() override;
+ virtual void DisableMouseEvents() override;
+ virtual bool IsMouseEventsEnabled() const override;
+ virtual void SetDisplay(const gfx::Display& display) override;
+ virtual void LockCursor() override;
+ virtual void UnlockCursor() override;
+ virtual bool IsCursorLocked() const override;
virtual void AddObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE;
+ aura::client::CursorClientObserver* observer) override;
virtual void RemoveObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE;
+ aura::client::CursorClientObserver* observer) override;
virtual bool ShouldHideCursorOnKeyEvent(
- const ui::KeyEvent& event) const OVERRIDE;
+ const ui::KeyEvent& event) const override;
private:
bool visible_;
diff --git a/ui/aura/test/test_focus_client.h b/ui/aura/test/test_focus_client.h
index 06ae3c8..5f9f718 100644
--- a/ui/aura/test/test_focus_client.h
+++ b/ui/aura/test/test_focus_client.h
@@ -22,14 +22,14 @@
private:
// Overridden from client::FocusClient:
- virtual void AddObserver(client::FocusChangeObserver* observer) OVERRIDE;
- virtual void RemoveObserver(client::FocusChangeObserver* observer) OVERRIDE;
- virtual void FocusWindow(Window* window) OVERRIDE;
- virtual void ResetFocusWithinActiveWindow(Window* window) OVERRIDE;
- virtual Window* GetFocusedWindow() OVERRIDE;
+ virtual void AddObserver(client::FocusChangeObserver* observer) override;
+ virtual void RemoveObserver(client::FocusChangeObserver* observer) override;
+ virtual void FocusWindow(Window* window) override;
+ virtual void ResetFocusWithinActiveWindow(Window* window) override;
+ virtual Window* GetFocusedWindow() override;
// Overridden from WindowObserver:
- virtual void OnWindowDestroying(Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(Window* window) override;
Window* focused_window_;
ScopedObserver<Window, WindowObserver> observer_manager_;
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h
index 7310008..7b1f98b 100644
--- a/ui/aura/test/test_screen.h
+++ b/ui/aura/test/test_screen.h
@@ -45,26 +45,26 @@
// WindowObserver overrides:
virtual void OnWindowBoundsChanged(Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroying(Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowDestroying(Window* window) override;
// gfx::Screen overrides:
- virtual bool IsDIPEnabled() OVERRIDE;
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE;
+ virtual bool IsDIPEnabled() override;
+ virtual gfx::Point GetCursorScreenPoint() override;
+ virtual gfx::NativeWindow GetWindowUnderCursor() override;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE;
- virtual int GetNumDisplays() const OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE;
+ override;
+ virtual int GetNumDisplays() const override;
+ virtual std::vector<gfx::Display> GetAllDisplays() const override;
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const OVERRIDE;
+ gfx::NativeView view) const override;
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE;
+ const gfx::Point& point) const override;
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
+ const gfx::Rect& match_rect) const override;
+ virtual gfx::Display GetPrimaryDisplay() const override;
+ virtual void AddObserver(gfx::DisplayObserver* observer) override;
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) override;
private:
explicit TestScreen(const gfx::Rect& screen_bounds);
diff --git a/ui/aura/test/test_window_delegate.h b/ui/aura/test/test_window_delegate.h
index 6f36e44..1cb142a 100644
--- a/ui/aura/test/test_window_delegate.h
+++ b/ui/aura/test/test_window_delegate.h
@@ -42,24 +42,24 @@
void set_can_focus(bool can_focus) { can_focus_ = can_focus; }
// Overridden from WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override;
+ virtual int GetNonClientComponent(const gfx::Point& point) const override;
virtual bool ShouldDescendIntoChildForEventHandling(
Window* child,
- const gfx::Point& location) OVERRIDE;
- virtual bool CanFocus() OVERRIDE;
- virtual void OnCaptureLost() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual void OnWindowDestroying(Window* window) OVERRIDE;
- virtual void OnWindowDestroyed(Window* window) OVERRIDE;
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
- virtual bool HasHitTestMask() const OVERRIDE;
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ const gfx::Point& location) override;
+ virtual bool CanFocus() override;
+ virtual void OnCaptureLost() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual void OnWindowDestroying(Window* window) override;
+ virtual void OnWindowDestroyed(Window* window) override;
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
private:
int window_component_;
@@ -81,9 +81,9 @@
ui::KeyboardCode last_key_code() const { return last_key_code_; }
// Overridden from TestWindowDelegate:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnWindowDestroyed(Window* window) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnWindowDestroyed(Window* window) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
SkColor color_;
@@ -98,8 +98,8 @@
explicit MaskedWindowDelegate(const gfx::Rect mask_rect);
// Overridden from TestWindowDelegate:
- virtual bool HasHitTestMask() const OVERRIDE;
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
private:
gfx::Rect mask_rect_;
@@ -113,9 +113,9 @@
EventCountDelegate();
// Overridden from TestWindowDelegate:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Returns the counts of mouse motion events in the
// form of "<enter> <move> <leave>".
diff --git a/ui/aura/test/test_window_tree_client.h b/ui/aura/test/test_window_tree_client.h
index 7b3c5ee..8856a9f 100644
--- a/ui/aura/test/test_window_tree_client.h
+++ b/ui/aura/test/test_window_tree_client.h
@@ -21,7 +21,7 @@
// Overridden from client::WindowTreeClient:
virtual Window* GetDefaultParent(Window* context,
Window* window,
- const gfx::Rect& bounds) OVERRIDE;
+ const gfx::Rect& bounds) override;
private:
Window* root_window_;
diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc
index 59db324..8f6b278 100644
--- a/ui/aura/test/ui_controls_factory_aurax11.cc
+++ b/ui/aura/test/ui_controls_factory_aurax11.cc
@@ -55,7 +55,7 @@
bool control,
bool shift,
bool alt,
- bool command) OVERRIDE {
+ bool command) override {
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
}
@@ -66,7 +66,7 @@
bool shift,
bool alt,
bool command,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
XEvent xevent = {0};
xevent.xkey.type = KeyPress;
if (control)
@@ -98,13 +98,13 @@
return true;
}
- virtual bool SendMouseMove(long screen_x, long screen_y) OVERRIDE {
+ virtual bool SendMouseMove(long screen_x, long screen_y) override {
return SendMouseMoveNotifyWhenDone(screen_x, screen_y, base::Closure());
}
virtual bool SendMouseMoveNotifyWhenDone(
long screen_x,
long screen_y,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
gfx::Point root_location(screen_x, screen_y);
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(host_->window());
@@ -134,13 +134,13 @@
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseEvents(MouseButton type, int state) OVERRIDE {
+ virtual bool SendMouseEvents(MouseButton type, int state) override {
return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
}
virtual bool SendMouseEventsNotifyWhenDone(
MouseButton type,
int state,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
XEvent xevent = {0};
XButtonEvent* xbutton = &xevent.xbutton;
gfx::Point mouse_loc = aura::Env::GetInstance()->last_mouse_location();
@@ -181,11 +181,11 @@
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseClick(MouseButton type) OVERRIDE {
+ virtual bool SendMouseClick(MouseButton type) override {
return SendMouseEvents(type, UP | DOWN);
}
virtual void RunClosureAfterAllPendingUIEvents(
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
if (closure.is_null())
return;
static XEvent* marker_event = NULL;
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index 4c5330c..5bd96bb 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -24,7 +24,7 @@
bool control,
bool shift,
bool alt,
- bool command) OVERRIDE {
+ bool command) override {
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
}
@@ -35,7 +35,7 @@
bool shift,
bool alt,
bool command,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
int flags = button_down_mask_;
if (control) {
@@ -85,13 +85,13 @@
return true;
}
- virtual bool SendMouseMove(long screen_x, long screen_y) OVERRIDE {
+ virtual bool SendMouseMove(long screen_x, long screen_y) override {
return SendMouseMoveNotifyWhenDone(screen_x, screen_y, base::Closure());
}
virtual bool SendMouseMoveNotifyWhenDone(
long screen_x,
long screen_y,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
gfx::Point root_location(screen_x, screen_y);
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(host_->window());
@@ -112,13 +112,13 @@
return true;
}
virtual bool SendMouseEvents(ui_controls::MouseButton type,
- int state) OVERRIDE {
+ int state) override {
return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
}
virtual bool SendMouseEventsNotifyWhenDone(
ui_controls::MouseButton type,
int state,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
gfx::Point loc = aura::Env::GetInstance()->last_mouse_location();
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(host_->window());
@@ -155,11 +155,11 @@
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseClick(ui_controls::MouseButton type) OVERRIDE {
+ virtual bool SendMouseClick(ui_controls::MouseButton type) override {
return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN);
}
virtual void RunClosureAfterAllPendingUIEvents(
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
if (!closure.is_null())
base::MessageLoop::current()->PostTask(FROM_HERE, closure);
}
diff --git a/ui/aura/window.h b/ui/aura/window.h
index dd08697..1a2721a 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -312,7 +312,7 @@
typedef void (*PropertyDeallocator)(int64 value);
// Overridden from ui::LayerDelegate:
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
#if !defined(NDEBUG)
// These methods are useful when debugging.
@@ -455,18 +455,18 @@
void OnWindowBoundsChanged(const gfx::Rect& old_bounds);
// Overridden from ui::LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override;
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE;
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE;
+ const gfx::Rect& damage_rect_in_dip) override;
+ virtual base::Closure PrepareForLayerBoundsChange() override;
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
- virtual EventTarget* GetParentTarget() OVERRIDE;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
+ virtual bool CanAcceptEvent(const ui::Event& event) override;
+ virtual EventTarget* GetParentTarget() override;
+ virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ virtual ui::EventTargeter* GetEventTargeter() override;
virtual void ConvertEventToTarget(ui::EventTarget* target,
- ui::LocatedEvent* event) OVERRIDE;
+ ui::LocatedEvent* event) override;
// Updates the layer name based on the window's name and id.
void UpdateLayerName();
diff --git a/ui/aura/window_event_dispatcher.h b/ui/aura/window_event_dispatcher.h
index 1620af3..a93c5d8 100644
--- a/ui/aura/window_event_dispatcher.h
+++ b/ui/aura/window_event_dispatcher.h
@@ -168,44 +168,44 @@
Window* GetGestureTarget(ui::GestureEvent* event);
// Overridden from aura::client::CaptureDelegate:
- virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE;
- virtual void OnOtherRootGotCapture() OVERRIDE;
- virtual void SetNativeCapture() OVERRIDE;
- virtual void ReleaseNativeCapture() OVERRIDE;
+ virtual void UpdateCapture(Window* old_capture, Window* new_capture) override;
+ virtual void OnOtherRootGotCapture() override;
+ virtual void SetNativeCapture() override;
+ virtual void ReleaseNativeCapture() override;
// Overridden from ui::EventProcessor:
- virtual ui::EventTarget* GetRootTarget() OVERRIDE;
- virtual void OnEventProcessingStarted(ui::Event* event) OVERRIDE;
+ virtual ui::EventTarget* GetRootTarget() override;
+ virtual void OnEventProcessingStarted(ui::Event* event) override;
// Overridden from ui::EventDispatcherDelegate.
- virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE;
+ virtual bool CanDispatchToTarget(ui::EventTarget* target) override;
virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target,
- ui::Event* event) OVERRIDE;
+ ui::Event* event) override;
virtual ui::EventDispatchDetails PostDispatchEvent(
- ui::EventTarget* target, const ui::Event& event) OVERRIDE;
+ ui::EventTarget* target, const ui::Event& event) override;
// Overridden from ui::GestureEventHelper.
- virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE;
- virtual void DispatchGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE;
+ virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override;
+ virtual void DispatchGestureEvent(ui::GestureEvent* event) override;
+ virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) override;
// Overridden from WindowObserver:
- virtual void OnWindowDestroying(Window* window) OVERRIDE;
- virtual void OnWindowDestroyed(Window* window) OVERRIDE;
- virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(Window* window) override;
+ virtual void OnWindowDestroyed(Window* window) override;
+ virtual void OnWindowAddedToRootWindow(Window* window) override;
virtual void OnWindowRemovingFromRootWindow(Window* window,
- Window* new_root) OVERRIDE;
+ Window* new_root) override;
virtual void OnWindowVisibilityChanging(Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowVisibilityChanged(Window* window, bool visible) OVERRIDE;
+ bool visible) override;
+ virtual void OnWindowVisibilityChanged(Window* window, bool visible) override;
virtual void OnWindowBoundsChanged(Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowTransforming(Window* window) OVERRIDE;
- virtual void OnWindowTransformed(Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowTransforming(Window* window) override;
+ virtual void OnWindowTransformed(Window* window) override;
// Overridden from EnvObserver:
- virtual void OnWindowInitialized(Window* window) OVERRIDE;
+ virtual void OnWindowInitialized(Window* window) override;
// We hold and aggregate mouse drags and touch moves as a way of throttling
// resizes when HoldMouseMoves() is called. The following methods are used to
diff --git a/ui/aura/window_event_dispatcher_unittest.cc b/ui/aura/window_event_dispatcher_unittest.cc
index 94c9aba..4ef4cae 100644
--- a/ui/aura/window_event_dispatcher_unittest.cc
+++ b/ui/aura/window_event_dispatcher_unittest.cc
@@ -53,13 +53,13 @@
gfx::Point mouse_event_location() const { return mouse_event_location_; }
int mouse_event_flags() const { return mouse_event_flags_; }
- virtual int GetNonClientComponent(const gfx::Point& location) const OVERRIDE {
+ virtual int GetNonClientComponent(const gfx::Point& location) const override {
NonClientDelegate* self = const_cast<NonClientDelegate*>(this);
self->non_client_count_++;
self->non_client_location_ = location;
return HTTOPLEFT;
}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
mouse_event_count_++;
mouse_event_location_ = event->location();
mouse_event_flags_ = event->flags();
@@ -83,7 +83,7 @@
virtual ~ConsumeKeyHandler() {}
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
ui::test::TestEventHandler::OnKeyEvent(event);
event->StopPropagation();
}
@@ -268,13 +268,13 @@
private:
// Overridden from client::EventClient:
virtual bool CanProcessEventsWithinSubtree(
- const Window* window) const OVERRIDE {
+ const Window* window) const override {
return lock_ ?
window->Contains(GetLockWindow()) || GetLockWindow()->Contains(window) :
true;
}
- virtual ui::EventTarget* GetToplevelEventTarget() OVERRIDE {
+ virtual ui::EventTarget* GetToplevelEventTarget() override {
return NULL;
}
@@ -486,7 +486,7 @@
}
// ui::EventHandler overrides:
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
ui::EventHandler::OnEvent(event);
events_.push_back(event->type());
if (wait_until_event_ == event->type() && run_loop_) {
@@ -495,16 +495,16 @@
}
}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
mouse_locations_.push_back(event->location());
mouse_event_flags_.push_back(event->flags());
}
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
touch_locations_.push_back(event->location());
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
gesture_locations_.push_back(event->location());
}
@@ -838,7 +838,7 @@
private:
// ui::test::TestEventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* gesture) override {
if (!holding_moves_ && gesture->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
holding_moves_ = true;
dispatcher_->HoldPointerMoves();
@@ -1141,12 +1141,12 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
if (delete_during_pre_handle_)
delete event->target();
}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if (delete_during_pre_handle_)
delete event->target();
}
@@ -1173,13 +1173,13 @@
private:
// Overridden from WindowDelegate:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
if (delete_during_handle_)
delete window_;
got_event_ = true;
}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if (delete_during_handle_)
delete window_;
got_event_ = true;
@@ -1242,7 +1242,7 @@
virtual ~DetachesParentOnTapDelegate() {}
private:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
event->SetHandled();
return;
@@ -1287,7 +1287,7 @@
int gesture_end_count() const { return gesture_end_count_; }
private:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
switch (event->type()) {
case ui::ET_GESTURE_TAP_DOWN:
event->SetHandled();
@@ -1373,7 +1373,7 @@
virtual ~RepostGestureEventRecorder() {}
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
if (reposted_ && event->type() == ui::ET_TOUCH_PRESSED) {
done_cleanup_ = true;
Reset();
@@ -1381,7 +1381,7 @@
EventFilterRecorder::OnTouchEvent(event);
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
EXPECT_EQ(done_cleanup_ ? repost_target_ : repost_source_, event->target());
if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
if (!reposted_) {
@@ -1399,7 +1399,7 @@
// Ignore mouse events as they don't fire at all times. This causes
// the GestureRepostEventOrder test to fail randomly.
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {}
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {}
private:
aura::Window* repost_source_;
@@ -1481,7 +1481,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
EventFilterRecorder::OnMouseEvent(event);
if (window_to_delete_) {
delete window_to_delete_;
@@ -1547,7 +1547,7 @@
}
// WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(aura::Window* window) override {
*got_destroying_ = true;
*has_valid_root_ = (window->GetRootWindow() != NULL);
}
@@ -1592,7 +1592,7 @@
int mouse_event_count() const { return mouse_event_count_; }
// TestWindowDelegate:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if ((event->flags() & ui::EF_SHIFT_DOWN) != 0 &&
mouse_event_count_++ == 0) {
ui::MouseEvent mouse_event(ui::ET_MOUSE_PRESSED,
@@ -1653,13 +1653,13 @@
bool got_destroy() const { return got_destroy_; }
// TestWindowDelegate:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if ((event->flags() & ui::EF_SHIFT_DOWN) != 0) {
got_mouse_event_ = true;
delete host_;
}
}
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
got_destroy_ = true;
}
@@ -1824,11 +1824,11 @@
capture_window_.reset();
}
- virtual void OnCaptureLost() OVERRIDE {
+ virtual void OnCaptureLost() override {
capture_window_.reset();
}
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
TestWindowDelegate::OnWindowDestroyed(window);
capture_window_.reset();
}
@@ -1865,7 +1865,7 @@
virtual ~ExitMessageLoopOnMousePress() {}
protected:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
ui::test::TestEventHandler::OnMouseEvent(event);
if (event->type() == ui::ET_MOUSE_PRESSED)
base::MessageLoopForUI::current()->Quit();
@@ -1915,13 +1915,13 @@
}
protected:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
WindowEventDispatcherTest::SetUp();
window_.reset(CreateNormalWindow(1, root_window(), NULL));
window_->AddPreTargetHandler(&handler_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
window_.reset();
WindowEventDispatcherTest::TearDown();
}
@@ -1956,7 +1956,7 @@
virtual ~WindowEventDispatcherTestInHighDPI() {}
protected:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
WindowEventDispatcherTest::SetUp();
test_screen()->SetDeviceScaleFactor(2.f);
}
@@ -2034,7 +2034,7 @@
SelfDestructDelegate() {}
virtual ~SelfDestructDelegate() {}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
window_.reset();
}
@@ -2087,11 +2087,11 @@
private:
// client::FocusClient:
- virtual void AddObserver(client::FocusChangeObserver* observer) OVERRIDE {}
- virtual void RemoveObserver(client::FocusChangeObserver* observer) OVERRIDE {}
- virtual void FocusWindow(Window* window) OVERRIDE {}
- virtual void ResetFocusWithinActiveWindow(Window* window) OVERRIDE {}
- virtual Window* GetFocusedWindow() OVERRIDE { return focused_; }
+ virtual void AddObserver(client::FocusChangeObserver* observer) override {}
+ virtual void RemoveObserver(client::FocusChangeObserver* observer) override {}
+ virtual void FocusWindow(Window* window) override {}
+ virtual void ResetFocusWithinActiveWindow(Window* window) override {}
+ virtual Window* GetFocusedWindow() override { return focused_; }
Window* focused_;
@@ -2126,7 +2126,7 @@
bool dispatched() const { return dispatched_; }
private:
// ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* mouse) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* mouse) override {
if (mouse->type() == ui::ET_MOUSE_MOVED) {
ui::MouseEvent move(ui::ET_MOUSE_MOVED, target_->bounds().CenterPoint(),
target_->bounds().CenterPoint(), ui::EF_NONE, ui::EF_NONE);
@@ -2156,7 +2156,7 @@
private:
// ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* mouse) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* mouse) override {
if (mouse->type() == ui::ET_MOUSE_MOVED) {
root_window_to_move_to_->AddChild(window_to_move_);
}
@@ -2222,7 +2222,7 @@
private:
// InputStateLookup:
- virtual bool IsMouseButtonDown() const OVERRIDE { return true; }
+ virtual bool IsMouseButtonDown() const override { return true; }
DISALLOW_COPY_AND_ASSIGN(AlwaysMouseDownInputStateLookup);
};
@@ -2319,7 +2319,7 @@
window_ = window;
}
private:
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
// Convert touch event back to root window coordinates.
event->ConvertLocationToTarget(window_, window_->GetRootWindow());
dispatcher_->ProcessedTouchEvent(event, window_, ui::ER_UNHANDLED);
diff --git a/ui/aura/window_targeter.cc b/ui/aura/window_targeter.cc
index d5c9393..afe079d 100644
--- a/ui/aura/window_targeter.cc
+++ b/ui/aura/window_targeter.cc
@@ -49,8 +49,9 @@
located_event->UpdateForRootTransform(
new_root->GetHost()->GetRootTransform());
}
- ui::EventDispatchDetails details ALLOW_UNUSED =
- new_root->GetHost()->event_processor()->OnEventFromSource(event);
+ ignore_result(
+ new_root->GetHost()->event_processor()->OnEventFromSource(event));
+
target = NULL;
}
return target;
diff --git a/ui/aura/window_targeter.h b/ui/aura/window_targeter.h
index e64ef75..5054c57 100644
--- a/ui/aura/window_targeter.h
+++ b/ui/aura/window_targeter.h
@@ -20,16 +20,16 @@
protected:
// ui::EventTargeter:
virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
- ui::Event* event) OVERRIDE;
+ ui::Event* event) override;
virtual ui::EventTarget* FindTargetForLocatedEvent(
ui::EventTarget* root,
- ui::LocatedEvent* event) OVERRIDE;
+ ui::LocatedEvent* event) override;
virtual bool SubtreeCanAcceptEvent(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
virtual bool EventLocationInsideBounds(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
private:
Window* FindTargetForKeyEvent(Window* root_window,
diff --git a/ui/aura/window_targeter_unittest.cc b/ui/aura/window_targeter_unittest.cc
index 86bd8d8..847f567 100644
--- a/ui/aura/window_targeter_unittest.cc
+++ b/ui/aura/window_targeter_unittest.cc
@@ -23,7 +23,7 @@
// ui::EventTargeter:
virtual ui::EventTarget* FindTargetForLocatedEvent(
ui::EventTarget* root,
- ui::LocatedEvent* event) OVERRIDE {
+ ui::LocatedEvent* event) override {
return window_;
}
diff --git a/ui/aura/window_tracker.h b/ui/aura/window_tracker.h
index 6d4545c..3a9650e 100644
--- a/ui/aura/window_tracker.h
+++ b/ui/aura/window_tracker.h
@@ -37,7 +37,7 @@
bool Contains(Window* window);
// WindowObserver overrides:
- virtual void OnWindowDestroying(Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(Window* window) override;
private:
Windows windows_;
diff --git a/ui/aura/window_tree_host_mac.h b/ui/aura/window_tree_host_mac.h
index 8fbf4ec..da502b5 100644
--- a/ui/aura/window_tree_host_mac.h
+++ b/ui/aura/window_tree_host_mac.h
@@ -30,25 +30,25 @@
private:
// WindowTreeHost Overrides.
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void ToggleFullScreen() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual bool ConfineCursorToRootWindow() OVERRIDE;
- virtual void UnConfineCursor() OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void ToggleFullScreen() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual void SetInsets(const gfx::Insets& insets) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual bool ConfineCursorToRootWindow() override;
+ virtual void UnConfineCursor() override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor_type) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
+ virtual void PostNativeEvent(const base::NativeEvent& event) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
private:
base::scoped_nsobject<NSWindow> window_;
diff --git a/ui/aura/window_tree_host_ozone.h b/ui/aura/window_tree_host_ozone.h
index 88736f3..f0e8c98 100644
--- a/ui/aura/window_tree_host_ozone.h
+++ b/ui/aura/window_tree_host_ozone.h
@@ -26,34 +26,34 @@
private:
// ui::PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect&) OVERRIDE;
- virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE;
- virtual void DispatchEvent(ui::Event* event) OVERRIDE;
- virtual void OnCloseRequest() OVERRIDE;
- virtual void OnClosed() OVERRIDE;
- virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE;
- virtual void OnLostCapture() OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect&) override;
+ virtual void OnDamageRect(const gfx::Rect& damaged_region) override;
+ virtual void DispatchEvent(ui::Event* event) override;
+ virtual void OnCloseRequest() override;
+ virtual void OnClosed() override;
+ virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
+ virtual void OnLostCapture() override;
virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) OVERRIDE;
- virtual void OnActivationChanged(bool active) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
+ virtual void OnActivationChanged(bool active) override;
// WindowTreeHost:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void PostNativeEvent(const base::NativeEvent& event) override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor_type) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
// ui::EventSource overrides.
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
// Platform-specific part of this WindowTreeHost.
scoped_ptr<ui::PlatformWindow> platform_window_;
diff --git a/ui/aura/window_tree_host_win.h b/ui/aura/window_tree_host_win.h
index f2c5e85..bfbdc07 100644
--- a/ui/aura/window_tree_host_win.h
+++ b/ui/aura/window_tree_host_win.h
@@ -24,38 +24,38 @@
virtual ~WindowTreeHostWin();
// WindowTreeHost:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
+ virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
// ui::EventSource:
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
protected:
gfx::AcceleratedWidget hwnd() const { return widget_; }
private:
// ui::PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE;
- virtual void DispatchEvent(ui::Event* event) OVERRIDE;
- virtual void OnCloseRequest() OVERRIDE;
- virtual void OnClosed() OVERRIDE;
- virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE;
- virtual void OnLostCapture() OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override;
+ virtual void OnDamageRect(const gfx::Rect& damaged_region) override;
+ virtual void DispatchEvent(ui::Event* event) override;
+ virtual void OnCloseRequest() override;
+ virtual void OnClosed() override;
+ virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
+ virtual void OnLostCapture() override;
virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) OVERRIDE;
- virtual void OnActivationChanged(bool active) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
+ virtual void OnActivationChanged(bool active) override;
bool has_capture_;
gfx::Rect bounds_;
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 35ebb1e..06c3a3f 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -202,7 +202,7 @@
private:
// ui::PlatformEventObserver:
- virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE {
+ virtual void WillProcessEvent(const ui::PlatformEvent& event) override {
#if defined(USE_XI2_MT)
if (event->type == GenericEvent &&
(event->xgeneric.evtype == XI_TouchBegin ||
@@ -216,7 +216,7 @@
#endif // defined(USE_XI2_MT)
}
- virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE {}
+ virtual void DidProcessEvent(const ui::PlatformEvent& event) override {}
// The difference in screen's native resolution pixels between
// the border of the touchscreen and the border of the screen,
diff --git a/ui/aura/window_tree_host_x11.h b/ui/aura/window_tree_host_x11.h
index c5a0351..1c05bf0 100644
--- a/ui/aura/window_tree_host_x11.h
+++ b/ui/aura/window_tree_host_x11.h
@@ -38,26 +38,26 @@
virtual ~WindowTreeHostX11();
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// WindowTreeHost:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void PostNativeEvent(const base::NativeEvent& event) override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor_type) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
// ui::EventSource overrides.
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
protected:
// Called when X Configure Notify event is recevied.
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index bdc0c7e..937212e 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -55,7 +55,7 @@
WindowTest() : max_separation_(0) {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
// TODO: there needs to be an easier way to do this.
max_separation_ = ui::GestureConfiguration::
@@ -64,14 +64,14 @@
set_max_separation_for_gesture_touches_in_pixels(0);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
AuraTestBase::TearDown();
ui::GestureConfiguration::
set_max_separation_for_gesture_touches_in_pixels(max_separation_);
}
private:
- int max_separation_;
+ float max_separation_;
DISALLOW_COPY_AND_ASSIGN(WindowTest);
};
@@ -94,13 +94,13 @@
bool in_destroying() const { return in_destroying_; }
- virtual void OnWindowDestroying(Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(Window* window) override {
EXPECT_FALSE(in_destroying_);
in_destroying_ = true;
destroying_count_++;
}
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
EXPECT_TRUE(in_destroying_);
in_destroying_ = false;
destroyed_count_++;
@@ -123,7 +123,7 @@
: parent_delegate_(parent_delegate) {
}
- virtual void OnWindowDestroying(Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(Window* window) override {
EXPECT_TRUE(parent_delegate_->in_destroying());
DestroyTrackingDelegateImpl::OnWindowDestroying(window);
}
@@ -143,7 +143,7 @@
void set_window(Window* window) { window_ = window; }
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
EXPECT_FALSE(window_->parent());
}
@@ -175,18 +175,18 @@
int touch_event_count() const { return touch_event_count_; }
int gesture_event_count() const { return gesture_event_count_; }
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
capture_changed_event_count_++;
mouse_event_count_++;
}
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) override {
touch_event_count_++;
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
gesture_event_count_++;
}
- virtual void OnCaptureLost() OVERRIDE {
+ virtual void OnCaptureLost() override {
capture_lost_count_++;
}
@@ -205,7 +205,7 @@
public:
GestureTrackPositionDelegate() {}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
position_ = event->location();
event->StopPropagation();
}
@@ -228,7 +228,7 @@
virtual bool ShouldDescendIntoChildForEventHandling(
Window* child,
- const gfx::Point& location) OVERRIDE {
+ const gfx::Point& location) override {
return false;
}
@@ -245,7 +245,7 @@
virtual ~DestroyWindowDelegate() {}
// Overridden from WindowDelegate.
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
delete this;
}
@@ -576,7 +576,7 @@
public:
AddedToRootWindowObserver() : called_(false) {}
- virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE {
+ virtual void OnWindowAddedToRootWindow(Window* window) override {
called_ = true;
}
@@ -1087,7 +1087,7 @@
public:
MouseEnterExitWindowDelegate() : entered_(false), exited_(false) {}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
switch (event->type()) {
case ui::ET_MOUSE_ENTERED:
EXPECT_TRUE(event->flags() & ui::EF_IS_SYNTHESIZED);
@@ -1372,7 +1372,7 @@
hidden_ = 0;
}
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override {
if (visible)
shown_++;
else
@@ -1721,16 +1721,16 @@
}
private:
- virtual void OnWindowAdded(Window* new_window) OVERRIDE {
+ virtual void OnWindowAdded(Window* new_window) override {
added_count_++;
}
- virtual void OnWillRemoveWindow(Window* window) OVERRIDE {
+ virtual void OnWillRemoveWindow(Window* window) override {
removed_count_++;
}
virtual void OnWindowVisibilityChanged(Window* window,
- bool visible) OVERRIDE {
+ bool visible) override {
if (!visibility_info_) {
visibility_info_.reset(new VisibilityInfo);
visibility_info_->changed_count = 0;
@@ -1740,20 +1740,20 @@
visibility_info_->changed_count++;
}
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
EXPECT_FALSE(window->parent());
destroyed_count_++;
}
virtual void OnWindowPropertyChanged(Window* window,
const void* key,
- intptr_t old) OVERRIDE {
+ intptr_t old) override {
property_key_ = key;
old_property_value_ = old;
}
virtual void OnAncestorWindowTransformed(Window* source,
- Window* window) OVERRIDE {
+ Window* window) override {
transform_notifications_.push_back(
std::make_pair(source->id(), window->id()));
}
@@ -2043,7 +2043,7 @@
// Overridden from client::VisibilityClient:
virtual void UpdateLayerVisibility(aura::Window* window,
- bool visible) OVERRIDE {
+ bool visible) override {
if (!ignore_visibility_changes_)
window->layer()->SetVisible(visible);
}
@@ -2179,11 +2179,11 @@
}
// Overridden from WindowObserver:
- virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE {
+ virtual void OnWindowAddedToRootWindow(Window* window) override {
++added_count_;
}
virtual void OnWindowRemovingFromRootWindow(Window* window,
- Window* new_root) OVERRIDE {
+ Window* new_root) override {
++removed_count_;
}
@@ -2265,7 +2265,7 @@
virtual void OnWindowBoundsChanged(Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
root_set_ = window->GetRootWindow() != NULL;
}
@@ -2344,7 +2344,7 @@
owned_window_.reset(window);
}
- virtual void OnWindowDestroyed(Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(Window* window) override {
owned_window_.reset(NULL);
}
@@ -2390,7 +2390,7 @@
// Window
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
bounds_changed_ = true;
}
@@ -2498,11 +2498,11 @@
}
// WindowObserver overrides:
- virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE {
+ virtual void OnWindowAddedToRootWindow(Window* window) override {
added_count_++;
}
virtual void OnWindowRemovingFromRootWindow(Window* window,
- Window* new_root) OVERRIDE {
+ Window* new_root) override {
removed_count_++;
}
@@ -2564,11 +2564,11 @@
private:
// Overridden from WindowObserver:
virtual void OnWindowHierarchyChanging(
- const HierarchyChangeParams& params) OVERRIDE {
+ const HierarchyChangeParams& params) override {
params_.push_back(params);
}
virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) OVERRIDE {
+ const HierarchyChangeParams& params) override {
params_.push_back(params);
}
@@ -2949,7 +2949,7 @@
int paint_count() const { return paint_count_; }
// TestWindowDelegate::
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
paint_count_++;
canvas->GetClipBounds(&most_recent_paint_clip_bounds_);
const SkMatrix& matrix = canvas->sk_canvas()->getTotalMatrix();
@@ -3425,17 +3425,17 @@
private:
// ui::LayerAnimationObserver:
virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
+ ui::LayerAnimationSequence* sequence) override {
animation_completed_ = true;
}
virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
+ ui::LayerAnimationSequence* sequence) override {
animation_aborted_ = true;
}
virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
+ ui::LayerAnimationSequence* sequence) override {
}
bool animation_completed_;
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index d32a9ec..3a3cd76 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -892,10 +892,10 @@
"x/selection_requestor_unittest.cc",
]
deps += [
+ "//chromeos",
"//ui/aura:test_support",
"//ui/events:gesture_detection",
"//ui/chromeos:ui_chromeos",
- #'../../chromeos/chromeos.gyp:chromeos', TODO(GYP)
]
}
}
diff --git a/ui/base/accelerators/accelerator_manager_unittest.cc b/ui/base/accelerators/accelerator_manager_unittest.cc
index b8672ec..979ff4a 100644
--- a/ui/base/accelerators/accelerator_manager_unittest.cc
+++ b/ui/base/accelerators/accelerator_manager_unittest.cc
@@ -28,8 +28,8 @@
}
// Overridden from AcceleratorTarget:
- virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE;
- virtual bool CanHandleAccelerators() const OVERRIDE;
+ virtual bool AcceleratorPressed(const Accelerator& accelerator) override;
+ virtual bool CanHandleAccelerators() const override;
private:
int accelerator_pressed_count_;
diff --git a/ui/base/accelerators/platform_accelerator_cocoa.h b/ui/base/accelerators/platform_accelerator_cocoa.h
index 3f72cac..f14bc4d 100644
--- a/ui/base/accelerators/platform_accelerator_cocoa.h
+++ b/ui/base/accelerators/platform_accelerator_cocoa.h
@@ -20,8 +20,8 @@
virtual ~PlatformAcceleratorCocoa();
// PlatformAccelerator:
- virtual scoped_ptr<PlatformAccelerator> CreateCopy() const OVERRIDE;
- virtual bool Equals(const PlatformAccelerator& rhs) const OVERRIDE;
+ virtual scoped_ptr<PlatformAccelerator> CreateCopy() const override;
+ virtual bool Equals(const PlatformAccelerator& rhs) const override;
// The keyEquivalent of the NSMenuItem associated with the accelerator.
NSString* characters() const { return characters_.get(); }
diff --git a/ui/base/clipboard/clipboard_aurax11.cc b/ui/base/clipboard/clipboard_aurax11.cc
index e40af36..82542e0 100644
--- a/ui/base/clipboard/clipboard_aurax11.cc
+++ b/ui/base/clipboard/clipboard_aurax11.cc
@@ -77,8 +77,8 @@
virtual ~SelectionChangeObserver();
// ui::PlatformEventObserver:
- virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE {}
+ virtual void WillProcessEvent(const ui::PlatformEvent& event) override;
+ virtual void DidProcessEvent(const ui::PlatformEvent& event) override {}
int event_base_;
Atom clipboard_atom_;
@@ -290,8 +290,8 @@
private:
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
// Our X11 state.
Display* x_display_;
diff --git a/ui/base/clipboard/custom_data_helper.cc b/ui/base/clipboard/custom_data_helper.cc
index a6ac8d2..323a92e 100644
--- a/ui/base/clipboard/custom_data_helper.cc
+++ b/ui/base/clipboard/custom_data_helper.cc
@@ -43,16 +43,16 @@
SkippablePickle pickle(data, data_length);
PickleIterator iter(pickle);
- uint64 size = 0;
- if (!pickle.ReadUInt64(&iter, &size))
+ size_t size = 0;
+ if (!pickle.ReadSizeT(&iter, &size))
return;
// Keep track of the original elements in the types vector. On failure, we
// truncate the vector to the original size since we want to ignore corrupt
// custom data pickles.
- uint64 original_size = types->size();
+ size_t original_size = types->size();
- for (uint64 i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
types->push_back(base::string16());
if (!pickle.ReadString16(&iter, &types->back()) ||
!pickle.SkipString16(&iter)) {
@@ -69,11 +69,11 @@
SkippablePickle pickle(data, data_length);
PickleIterator iter(pickle);
- uint64 size = 0;
- if (!pickle.ReadUInt64(&iter, &size))
+ size_t size = 0;
+ if (!pickle.ReadSizeT(&iter, &size))
return;
- for (uint64 i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
base::string16 deserialized_type;
if (!pickle.ReadString16(&iter, &deserialized_type))
return;
@@ -92,11 +92,11 @@
Pickle pickle(reinterpret_cast<const char*>(data), data_length);
PickleIterator iter(pickle);
- uint64 size = 0;
- if (!pickle.ReadUInt64(&iter, &size))
+ size_t size = 0;
+ if (!pickle.ReadSizeT(&iter, &size))
return;
- for (uint64 i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
base::string16 type;
if (!pickle.ReadString16(&iter, &type)) {
// Data is corrupt, return an empty map.
@@ -116,7 +116,7 @@
void WriteCustomDataToPickle(
const std::map<base::string16, base::string16>& data,
Pickle* pickle) {
- pickle->WriteUInt64(data.size());
+ pickle->WriteSizeT(data.size());
for (std::map<base::string16, base::string16>::const_iterator it =
data.begin();
it != data.end();
diff --git a/ui/base/clipboard/custom_data_helper_unittest.cc b/ui/base/clipboard/custom_data_helper_unittest.cc
index bc79d90..a765852 100644
--- a/ui/base/clipboard/custom_data_helper_unittest.cc
+++ b/ui/base/clipboard/custom_data_helper_unittest.cc
@@ -120,7 +120,7 @@
expected.push_back(ASCIIToUTF16("f"));
Pickle malformed;
- malformed.WriteUInt64(1000);
+ malformed.WriteSizeT(1000);
malformed.WriteString16(ASCIIToUTF16("hello"));
malformed.WriteString16(ASCIIToUTF16("world"));
std::vector<base::string16> actual(expected);
@@ -128,7 +128,7 @@
EXPECT_EQ(expected, actual);
Pickle malformed2;
- malformed2.WriteUInt64(1);
+ malformed2.WriteSizeT(1);
malformed2.WriteString16(ASCIIToUTF16("hello"));
std::vector<base::string16> actual2(expected);
ReadCustomDataTypes(malformed2.data(), malformed2.size(), &actual2);
@@ -140,7 +140,7 @@
std::map<base::string16, base::string16> result_map;
Pickle malformed;
- malformed.WriteUInt64(1000);
+ malformed.WriteSizeT(1000);
malformed.WriteString16(ASCIIToUTF16("hello"));
malformed.WriteString16(ASCIIToUTF16("world"));
@@ -153,7 +153,7 @@
EXPECT_EQ(0u, result_map.size());
Pickle malformed2;
- malformed2.WriteUInt64(1);
+ malformed2.WriteSizeT(1);
malformed2.WriteString16(ASCIIToUTF16("hello"));
ReadCustomDataForType(malformed2.data(),
diff --git a/ui/base/cocoa/controls/blue_label_button_unittest.mm b/ui/base/cocoa/controls/blue_label_button_unittest.mm
index 1e2a8f8..2166d30 100644
--- a/ui/base/cocoa/controls/blue_label_button_unittest.mm
+++ b/ui/base/cocoa/controls/blue_label_button_unittest.mm
@@ -16,7 +16,7 @@
BlueLabelButtonTest() {}
// ui::CocoaTest override:
- virtual void SetUp() OVERRIDE;
+ virtual void SetUp() override;
protected:
base::scoped_nsobject<BlueLabelButton> blue_label_button_;
diff --git a/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm b/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
index ad5b2da..ffe46be 100644
--- a/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
+++ b/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
@@ -20,7 +20,7 @@
HoverImageMenuButtonTest() {}
// CocoaTest override:
- virtual void SetUp() OVERRIDE;
+ virtual void SetUp() override;
protected:
base::scoped_nsobject<HoverImageMenuButton> menu_button_;
diff --git a/ui/base/cocoa/fullscreen_window_manager.mm b/ui/base/cocoa/fullscreen_window_manager.mm
index 8482168..15a5948 100644
--- a/ui/base/cocoa/fullscreen_window_manager.mm
+++ b/ui/base/cocoa/fullscreen_window_manager.mm
@@ -85,15 +85,18 @@
}
- (void)update {
+ // From OS X 10.10, NSApplicationDidChangeScreenParametersNotification is sent
+ // when displaying a fullscreen window, which should normally only be sent if
+ // the monitor resolution has changed or new display is detected.
if (![[NSScreen screens] containsObject:desiredScreen_])
desiredScreen_.reset([[window_ screen] retain]);
base::mac::FullScreenMode newMode;
if (!fullscreenActive_)
newMode = base::mac::kFullScreenModeNormal;
- else if (desiredScreen_ == GetMenuBarScreen())
+ else if ([desiredScreen_ isEqual:GetMenuBarScreen()])
newMode = base::mac::kFullScreenModeHideAll;
- else if (desiredScreen_ == GetDockScreen())
+ else if ([desiredScreen_ isEqual:GetDockScreen()])
newMode = base::mac::kFullScreenModeHideDock;
else
newMode = base::mac::kFullScreenModeNormal;
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm
index 56e610e..161bf28 100644
--- a/ui/base/cocoa/menu_controller_unittest.mm
+++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -39,21 +39,21 @@
did_close_(false) {
}
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE {
+ virtual bool IsCommandIdChecked(int command_id) const override {
return false;
}
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
+ virtual bool IsCommandIdEnabled(int command_id) const override {
++enable_count_;
return true;
}
virtual bool GetAcceleratorForCommandId(
int command_id,
- Accelerator* accelerator) OVERRIDE { return false; }
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {
+ Accelerator* accelerator) override { return false; }
+ virtual void ExecuteCommand(int command_id, int event_flags) override {
++execute_count_;
}
- virtual void MenuWillShow(SimpleMenuModel* /*source*/) OVERRIDE {
+ virtual void MenuWillShow(SimpleMenuModel* /*source*/) override {
EXPECT_FALSE(did_show_);
EXPECT_FALSE(did_close_);
did_show_ = true;
@@ -66,7 +66,7 @@
inModes:modes];
}
- virtual void MenuClosed(SimpleMenuModel* /*source*/) OVERRIDE {
+ virtual void MenuClosed(SimpleMenuModel* /*source*/) override {
EXPECT_TRUE(did_show_);
EXPECT_FALSE(did_close_);
did_close_ = true;
@@ -86,15 +86,15 @@
class DynamicDelegate : public Delegate {
public:
DynamicDelegate() {}
- virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE {
+ virtual bool IsItemForCommandIdDynamic(int command_id) const override {
return true;
}
- virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE {
+ virtual base::string16 GetLabelForCommandId(int command_id) const override {
return label_;
}
virtual bool GetIconForCommandId(
int command_id,
- gfx::Image* icon) const OVERRIDE {
+ gfx::Image* icon) const override {
if (icon_.IsEmpty()) {
return false;
} else {
@@ -121,7 +121,7 @@
index_(index) {
}
virtual ~FontListMenuModel() {}
- virtual const gfx::FontList* GetLabelFontListAt(int index) const OVERRIDE {
+ virtual const gfx::FontList* GetLabelFontListAt(int index) const override {
return (index == index_) ? font_list_ : NULL;
}
diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm
index 0fb1fdf..839daa1 100644
--- a/ui/base/cocoa/remote_layer_api.mm
+++ b/ui/base/cocoa/remote_layer_api.mm
@@ -5,6 +5,7 @@
#include "ui/base/cocoa/remote_layer_api.h"
#include "base/command_line.h"
+#include "base/mac/mac_util.h"
#include "ui/base/ui_base_switches.h"
#include <objc/runtime.h>
@@ -12,10 +13,14 @@
namespace ui {
bool RemoteLayerAPISupported() {
- bool enabled_at_command_line =
+ // This API only works on Mac OS 10.9 and later.
+ if (!base::mac::IsOSMavericksOrLater())
+ return false;
+
+ bool disabled_at_command_line =
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableRemoteCoreAnimation);
- if (!enabled_at_command_line)
+ switches::kDisableRemoteCoreAnimation);
+ if (disabled_at_command_line)
return false;
// Verify the GPU process interfaces are present.
diff --git a/ui/base/cursor/cursor_loader_ozone.h b/ui/base/cursor/cursor_loader_ozone.h
index 402cdc2..7aef431 100644
--- a/ui/base/cursor/cursor_loader_ozone.h
+++ b/ui/base/cursor/cursor_loader_ozone.h
@@ -20,13 +20,13 @@
// CursorLoader overrides:
virtual void LoadImageCursor(int id,
int resource_id,
- const gfx::Point& hot) OVERRIDE;
+ const gfx::Point& hot) override;
virtual void LoadAnimatedCursor(int id,
int resource_id,
const gfx::Point& hot,
- int frame_delay_ms) OVERRIDE;
- virtual void UnloadAll() OVERRIDE;
- virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE;
+ int frame_delay_ms) override;
+ virtual void UnloadAll() override;
+ virtual void SetPlatformCursor(gfx::NativeCursor* cursor) override;
private:
// Pointers are owned by ResourceBundle and must not be freed here.
diff --git a/ui/base/cursor/cursor_loader_win.h b/ui/base/cursor/cursor_loader_win.h
index adcc0ae..c886af0 100644
--- a/ui/base/cursor/cursor_loader_win.h
+++ b/ui/base/cursor/cursor_loader_win.h
@@ -18,13 +18,13 @@
// Overridden from CursorLoader:
virtual void LoadImageCursor(int id,
int resource_id,
- const gfx::Point& hot) OVERRIDE;
+ const gfx::Point& hot) override;
virtual void LoadAnimatedCursor(int id,
int resource_id,
const gfx::Point& hot,
- int frame_delay_ms) OVERRIDE;
- virtual void UnloadAll() OVERRIDE;
- virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE;
+ int frame_delay_ms) override;
+ virtual void UnloadAll() override;
+ virtual void SetPlatformCursor(gfx::NativeCursor* cursor) override;
// Used to pass the cursor resource module name to the cursor loader. This is
// typically used to load non system cursors.
diff --git a/ui/base/cursor/cursor_loader_x11.h b/ui/base/cursor/cursor_loader_x11.h
index 331529b..2667221 100644
--- a/ui/base/cursor/cursor_loader_x11.h
+++ b/ui/base/cursor/cursor_loader_x11.h
@@ -25,13 +25,13 @@
// Overridden from CursorLoader:
virtual void LoadImageCursor(int id,
int resource_id,
- const gfx::Point& hot) OVERRIDE;
+ const gfx::Point& hot) override;
virtual void LoadAnimatedCursor(int id,
int resource_id,
const gfx::Point& hot,
- int frame_delay_ms) OVERRIDE;
- virtual void UnloadAll() OVERRIDE;
- virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE;
+ int frame_delay_ms) override;
+ virtual void UnloadAll() override;
+ virtual void SetPlatformCursor(gfx::NativeCursor* cursor) override;
const XcursorImage* GetXcursorImageForTest(int id);
diff --git a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h b/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
index dc51602..037fd08 100644
--- a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
+++ b/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
@@ -60,15 +60,15 @@
PlatformCursor platform_cursor);
// CursorFactoryOzone:
- virtual PlatformCursor GetDefaultCursor(int type) OVERRIDE;
+ virtual PlatformCursor GetDefaultCursor(int type) override;
virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
- const gfx::Point& hotspot) OVERRIDE;
+ const gfx::Point& hotspot) override;
virtual PlatformCursor CreateAnimatedCursor(
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& hotspot,
- int frame_delay_ms) OVERRIDE;
- virtual void RefImageCursor(PlatformCursor cursor) OVERRIDE;
- virtual void UnrefImageCursor(PlatformCursor cursor) OVERRIDE;
+ int frame_delay_ms) override;
+ virtual void RefImageCursor(PlatformCursor cursor) override;
+ virtual void UnrefImageCursor(PlatformCursor cursor) override;
private:
// Get cached BitmapCursorOzone for a default cursor.
diff --git a/ui/base/default_theme_provider.h b/ui/base/default_theme_provider.h
index 8bf2a01..0fe64d1 100644
--- a/ui/base/default_theme_provider.h
+++ b/ui/base/default_theme_provider.h
@@ -24,22 +24,22 @@
virtual ~DefaultThemeProvider();
// Overridden from ui::ThemeProvider:
- virtual bool UsingSystemTheme() const OVERRIDE;
- virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE;
- virtual SkColor GetColor(int id) const OVERRIDE;
- virtual int GetDisplayProperty(int id) const OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool HasCustomImage(int id) const OVERRIDE;
+ virtual bool UsingSystemTheme() const override;
+ virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const override;
+ virtual SkColor GetColor(int id) const override;
+ virtual int GetDisplayProperty(int id) const override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool HasCustomImage(int id) const override;
virtual base::RefCountedMemory* GetRawData(
int id,
- ui::ScaleFactor scale_factor) const OVERRIDE;
+ ui::ScaleFactor scale_factor) const override;
#if defined(OS_MACOSX)
- virtual NSImage* GetNSImageNamed(int id) const OVERRIDE;
- virtual NSColor* GetNSImageColorNamed(int id) const OVERRIDE;
- virtual NSColor* GetNSColor(int id) const OVERRIDE;
- virtual NSColor* GetNSColorTint(int id) const OVERRIDE;
- virtual NSGradient* GetNSGradient(int id) const OVERRIDE;
+ virtual NSImage* GetNSImageNamed(int id) const override;
+ virtual NSColor* GetNSImageColorNamed(int id) const override;
+ virtual NSColor* GetNSColor(int id) const override;
+ virtual NSColor* GetNSColorTint(int id) const override;
+ virtual NSGradient* GetNSGradient(int id) const override;
#endif
private:
diff --git a/ui/base/dragdrop/drag_utils.cc b/ui/base/dragdrop/drag_utils.cc
index 53f3e99..363dad4 100644
--- a/ui/base/dragdrop/drag_utils.cc
+++ b/ui/base/dragdrop/drag_utils.cc
@@ -40,7 +40,7 @@
}
// Overridden from gfx::CanvasImageSource.
- virtual void Draw(gfx::Canvas* canvas) OVERRIDE {
+ virtual void Draw(gfx::Canvas* canvas) override {
if (!icon_.isNull()) {
// Paint the icon.
canvas->DrawImageInt(icon_, (size().width() - icon_.width()) / 2, 0);
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.h b/ui/base/dragdrop/os_exchange_data_provider_aura.h
index e54a2fd..88218a2 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.h
@@ -26,38 +26,38 @@
virtual ~OSExchangeDataProviderAura();
// Overridden from OSExchangeData::Provider:
- virtual Provider* Clone() const OVERRIDE;
- virtual void MarkOriginatedFromRenderer() OVERRIDE;
- virtual bool DidOriginateFromRenderer() const OVERRIDE;
- virtual void SetString(const base::string16& data) OVERRIDE;
- virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE;
- virtual void SetFilename(const base::FilePath& path) OVERRIDE;
- virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE;
+ virtual Provider* Clone() const override;
+ virtual void MarkOriginatedFromRenderer() override;
+ virtual bool DidOriginateFromRenderer() const override;
+ virtual void SetString(const base::string16& data) override;
+ virtual void SetURL(const GURL& url, const base::string16& title) override;
+ virtual void SetFilename(const base::FilePath& path) override;
+ virtual void SetFilenames(const std::vector<FileInfo>& filenames) override;
virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
- const Pickle& data) OVERRIDE;
- virtual bool GetString(base::string16* data) const OVERRIDE;
+ const Pickle& data) override;
+ virtual bool GetString(base::string16* data) const override;
virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
GURL* url,
- base::string16* title) const OVERRIDE;
- virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
- virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE;
+ base::string16* title) const override;
+ virtual bool GetFilename(base::FilePath* path) const override;
+ virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override;
virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
- Pickle* data) const OVERRIDE;
- virtual bool HasString() const OVERRIDE;
+ Pickle* data) const override;
+ virtual bool HasString() const override;
virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const
- OVERRIDE;
- virtual bool HasFile() const OVERRIDE;
+ override;
+ virtual bool HasFile() const override;
virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const
- OVERRIDE;
+ override;
virtual void SetHtml(const base::string16& html,
- const GURL& base_url) OVERRIDE;
- virtual bool GetHtml(base::string16* html, GURL* base_url) const OVERRIDE;
- virtual bool HasHtml() const OVERRIDE;
+ const GURL& base_url) override;
+ virtual bool GetHtml(base::string16* html, GURL* base_url) const override;
+ virtual bool HasHtml() const override;
virtual void SetDragImage(const gfx::ImageSkia& image,
- const gfx::Vector2d& cursor_offset) OVERRIDE;
- virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE;
- virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE;
+ const gfx::Vector2d& cursor_offset) override;
+ virtual const gfx::ImageSkia& GetDragImage() const override;
+ virtual const gfx::Vector2d& GetDragImageOffset() const override;
private:
typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aurax11.h b/ui/base/dragdrop/os_exchange_data_provider_aurax11.h
index 702cc7e..9664b02 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aurax11.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_aurax11.h
@@ -61,45 +61,45 @@
}
// Overridden from OSExchangeData::Provider:
- virtual Provider* Clone() const OVERRIDE;
- virtual void MarkOriginatedFromRenderer() OVERRIDE;
- virtual bool DidOriginateFromRenderer() const OVERRIDE;
- virtual void SetString(const base::string16& data) OVERRIDE;
- virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE;
- virtual void SetFilename(const base::FilePath& path) OVERRIDE;
- virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE;
+ virtual Provider* Clone() const override;
+ virtual void MarkOriginatedFromRenderer() override;
+ virtual bool DidOriginateFromRenderer() const override;
+ virtual void SetString(const base::string16& data) override;
+ virtual void SetURL(const GURL& url, const base::string16& title) override;
+ virtual void SetFilename(const base::FilePath& path) override;
+ virtual void SetFilenames(const std::vector<FileInfo>& filenames) override;
virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
- const Pickle& pickle) OVERRIDE;
- virtual bool GetString(base::string16* data) const OVERRIDE;
+ const Pickle& pickle) override;
+ virtual bool GetString(base::string16* data) const override;
virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
GURL* url,
- base::string16* title) const OVERRIDE;
- virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
- virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE;
+ base::string16* title) const override;
+ virtual bool GetFilename(base::FilePath* path) const override;
+ virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override;
virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
- Pickle* pickle) const OVERRIDE;
- virtual bool HasString() const OVERRIDE;
+ Pickle* pickle) const override;
+ virtual bool HasString() const override;
virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const
- OVERRIDE;
- virtual bool HasFile() const OVERRIDE;
+ override;
+ virtual bool HasFile() const override;
virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const
- OVERRIDE;
+ override;
virtual void SetFileContents(const base::FilePath& filename,
- const std::string& file_contents) OVERRIDE;
+ const std::string& file_contents) override;
virtual void SetHtml(const base::string16& html,
- const GURL& base_url) OVERRIDE;
- virtual bool GetHtml(base::string16* html, GURL* base_url) const OVERRIDE;
- virtual bool HasHtml() const OVERRIDE;
+ const GURL& base_url) override;
+ virtual bool GetHtml(base::string16* html, GURL* base_url) const override;
+ virtual bool HasHtml() const override;
virtual void SetDragImage(const gfx::ImageSkia& image,
- const gfx::Vector2d& cursor_offset) OVERRIDE;
- virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE;
- virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE;
+ const gfx::Vector2d& cursor_offset) override;
+ virtual const gfx::ImageSkia& GetDragImage() const override;
+ virtual const gfx::Vector2d& GetDragImageOffset() const override;
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
private:
friend class OSExchangeDataProviderAuraX11Test;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_mac.h b/ui/base/dragdrop/os_exchange_data_provider_mac.h
index 1e46e2e..911973e 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_mac.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_mac.h
@@ -21,29 +21,29 @@
virtual ~OSExchangeDataProviderMac();
// Overridden from OSExchangeData::Provider:
- virtual Provider* Clone() const OVERRIDE;
- virtual void MarkOriginatedFromRenderer() OVERRIDE;
- virtual bool DidOriginateFromRenderer() const OVERRIDE;
- virtual void SetString(const base::string16& data) OVERRIDE;
- virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE;
- virtual void SetFilename(const base::FilePath& path) OVERRIDE;
- virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE;
+ virtual Provider* Clone() const override;
+ virtual void MarkOriginatedFromRenderer() override;
+ virtual bool DidOriginateFromRenderer() const override;
+ virtual void SetString(const base::string16& data) override;
+ virtual void SetURL(const GURL& url, const base::string16& title) override;
+ virtual void SetFilename(const base::FilePath& path) override;
+ virtual void SetFilenames(const std::vector<FileInfo>& filenames) override;
virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
- const Pickle& data) OVERRIDE;
- virtual bool GetString(base::string16* data) const OVERRIDE;
+ const Pickle& data) override;
+ virtual bool GetString(base::string16* data) const override;
virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
GURL* url,
- base::string16* title) const OVERRIDE;
- virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
- virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE;
+ base::string16* title) const override;
+ virtual bool GetFilename(base::FilePath* path) const override;
+ virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override;
virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
- Pickle* data) const OVERRIDE;
- virtual bool HasString() const OVERRIDE;
+ Pickle* data) const override;
+ virtual bool HasString() const override;
virtual bool HasURL(
- OSExchangeData::FilenameToURLPolicy policy) const OVERRIDE;
- virtual bool HasFile() const OVERRIDE;
+ OSExchangeData::FilenameToURLPolicy policy) const override;
+ virtual bool HasFile() const override;
virtual bool HasCustomFormat(
- const OSExchangeData::CustomFormat& format) const OVERRIDE;
+ const OSExchangeData::CustomFormat& format) const override;
private:
base::scoped_nsobject<NSPasteboard> pasteboard_;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index 669d850..d283394 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -63,7 +63,7 @@
// some sort of sequential data (why not just use an array?). See comments
// throughout.
//
-class FormatEtcEnumerator FINAL : public IEnumFORMATETC {
+class FormatEtcEnumerator final : public IEnumFORMATETC {
public:
FormatEtcEnumerator(DataObjectImpl::StoredData::const_iterator begin,
DataObjectImpl::StoredData::const_iterator end);
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h
index a89deb2..8587bd1 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.h
@@ -182,9 +182,9 @@
virtual void SetDownloadFileInfo(
const OSExchangeData::DownloadFileInfo& download_info);
virtual void SetDragImage(const gfx::ImageSkia& image,
- const gfx::Vector2d& cursor_offset) OVERRIDE;
- virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE;
- virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE;
+ const gfx::Vector2d& cursor_offset) override;
+ virtual const gfx::ImageSkia& GetDragImage() const override;
+ virtual const gfx::Vector2d& GetDragImageOffset() const override;
private:
scoped_refptr<DataObjectImpl> data_;
diff --git a/ui/base/ime/chromeos/ime_bridge.cc b/ui/base/ime/chromeos/ime_bridge.cc
index 49d0f73..98f997e 100644
--- a/ui/base/ime/chromeos/ime_bridge.cc
+++ b/ui/base/ime/chromeos/ime_bridge.cc
@@ -27,46 +27,46 @@
// IMEBridge override.
virtual IMEInputContextHandlerInterface*
- GetInputContextHandler() const OVERRIDE {
+ GetInputContextHandler() const override {
return input_context_handler_;
}
// IMEBridge override.
virtual void SetInputContextHandler(
- IMEInputContextHandlerInterface* handler) OVERRIDE {
+ IMEInputContextHandlerInterface* handler) override {
input_context_handler_ = handler;
}
// IMEBridge override.
virtual void SetCurrentEngineHandler(
- IMEEngineHandlerInterface* handler) OVERRIDE {
+ IMEEngineHandlerInterface* handler) override {
engine_handler_ = handler;
}
// IMEBridge override.
- virtual IMEEngineHandlerInterface* GetCurrentEngineHandler() const OVERRIDE {
+ virtual IMEEngineHandlerInterface* GetCurrentEngineHandler() const override {
return engine_handler_;
}
// IMEBridge override.
virtual IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() const
- OVERRIDE {
+ override {
return candidate_window_handler_;
}
// IMEBridge override.
virtual void SetCandidateWindowHandler(
- IMECandidateWindowHandlerInterface* handler) OVERRIDE {
+ IMECandidateWindowHandlerInterface* handler) override {
candidate_window_handler_ = handler;
}
// IMEBridge override.
- virtual void SetCurrentTextInputType(ui::TextInputType input_type) OVERRIDE {
+ virtual void SetCurrentTextInputType(ui::TextInputType input_type) override {
current_text_input_ = input_type;
}
// IMEBridge override.
- virtual ui::TextInputType GetCurrentTextInputType() const OVERRIDE {
+ virtual ui::TextInputType GetCurrentTextInputType() const override {
return current_text_input_;
}
diff --git a/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h
index a7705e3..9bac92c 100644
--- a/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h
@@ -30,11 +30,11 @@
// IMECandidateWindowHandlerInterface override.
virtual void UpdateLookupTable(
const ui::CandidateWindow& candidate_window,
- bool visible) OVERRIDE;
+ bool visible) override;
virtual void UpdatePreeditText(
- const base::string16& text, uint32 cursor_pos, bool visible) OVERRIDE;
+ const base::string16& text, uint32 cursor_pos, bool visible) override;
virtual void SetCursorBounds(const gfx::Rect& cursor_bounds,
- const gfx::Rect& composition_head) OVERRIDE;
+ const gfx::Rect& composition_head) override;
int set_cursor_bounds_call_count() const {
return set_cursor_bounds_call_count_;
diff --git a/ui/base/ime/chromeos/mock_ime_engine_handler.h b/ui/base/ime/chromeos/mock_ime_engine_handler.h
index 112c0dd..798cde6 100644
--- a/ui/base/ime/chromeos/mock_ime_engine_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_engine_handler.h
@@ -16,17 +16,17 @@
MockIMEEngineHandler();
virtual ~MockIMEEngineHandler();
- virtual void FocusIn(const InputContext& input_context) OVERRIDE;
- virtual void FocusOut() OVERRIDE;
- virtual void Enable(const std::string& component_id) OVERRIDE;
- virtual void Disable() OVERRIDE;
- virtual void PropertyActivate(const std::string& property_name) OVERRIDE;
- virtual void Reset() OVERRIDE;
+ virtual void FocusIn(const InputContext& input_context) override;
+ virtual void FocusOut() override;
+ virtual void Enable(const std::string& component_id) override;
+ virtual void Disable() override;
+ virtual void PropertyActivate(const std::string& property_name) override;
+ virtual void Reset() override;
virtual void ProcessKeyEvent(const ui::KeyEvent& key_event,
- const KeyEventDoneCallback& callback) OVERRIDE;
- virtual void CandidateClicked(uint32 index) OVERRIDE;
+ const KeyEventDoneCallback& callback) override;
+ virtual void CandidateClicked(uint32 index) override;
virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos,
- uint32 anchor_pos) OVERRIDE;
+ uint32 anchor_pos) override;
int focus_in_call_count() const { return focus_in_call_count_; }
int focus_out_call_count() const { return focus_out_call_count_; }
diff --git a/ui/base/ime/chromeos/mock_ime_input_context_handler.h b/ui/base/ime/chromeos/mock_ime_input_context_handler.h
index 71fe395..8e18dec 100644
--- a/ui/base/ime/chromeos/mock_ime_input_context_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_input_context_handler.h
@@ -28,11 +28,11 @@
MockIMEInputContextHandler();
virtual ~MockIMEInputContextHandler();
- virtual void CommitText(const std::string& text) OVERRIDE;
+ virtual void CommitText(const std::string& text) override;
virtual void UpdateCompositionText(const CompositionText& text,
uint32 cursor_pos,
- bool visible) OVERRIDE;
- virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE;
+ bool visible) override;
+ virtual void DeleteSurroundingText(int32 offset, uint32 length) override;
int commit_text_call_count() const { return commit_text_call_count_; }
diff --git a/ui/base/ime/dummy_input_method.h b/ui/base/ime/dummy_input_method.h
index 39b0419..a0037f5 100644
--- a/ui/base/ime/dummy_input_method.h
+++ b/ui/base/ime/dummy_input_method.h
@@ -18,30 +18,30 @@
// InputMethod overrides:
virtual void SetDelegate(
- internal::InputMethodDelegate* delegate) OVERRIDE;
- virtual void Init(bool focused) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ internal::InputMethodDelegate* delegate) override;
+ virtual void Init(bool focused) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(
- const base::NativeEvent& event, NativeEventResult* result) OVERRIDE;
- virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE;
- virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE;
- virtual TextInputClient* GetTextInputClient() const OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual TextInputType GetTextInputType() const OVERRIDE;
- virtual TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
+ const base::NativeEvent& event, NativeEventResult* result) override;
+ virtual void SetFocusedTextInputClient(TextInputClient* client) override;
+ virtual void DetachTextInputClient(TextInputClient* client) override;
+ virtual TextInputClient* GetTextInputClient() const override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual TextInputType GetTextInputType() const override;
+ virtual TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual bool IsCandidatePopupOpen() const override;
+ virtual void ShowImeIfNeeded() override;
- virtual void AddObserver(InputMethodObserver* observer) OVERRIDE;
- virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE;
+ virtual void AddObserver(InputMethodObserver* observer) override;
+ virtual void RemoveObserver(InputMethodObserver* observer) override;
private:
DISALLOW_COPY_AND_ASSIGN(DummyInputMethod);
diff --git a/ui/base/ime/dummy_input_method_delegate.h b/ui/base/ime/dummy_input_method_delegate.h
index ce64216..5055500 100644
--- a/ui/base/ime/dummy_input_method_delegate.h
+++ b/ui/base/ime/dummy_input_method_delegate.h
@@ -18,7 +18,7 @@
virtual ~DummyInputMethodDelegate();
// Overridden from InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) OVERRIDE;
+ virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) override;
private:
DISALLOW_COPY_AND_ASSIGN(DummyInputMethodDelegate);
diff --git a/ui/base/ime/dummy_text_input_client.h b/ui/base/ime/dummy_text_input_client.h
index be2295c..92705cb 100644
--- a/ui/base/ime/dummy_text_input_client.h
+++ b/ui/base/ime/dummy_text_input_client.h
@@ -17,36 +17,36 @@
virtual ~DummyTextInputClient();
// Overriden from TextInputClient.
- virtual void SetCompositionText(const CompositionText& composition) OVERRIDE;
- virtual void ConfirmCompositionText() OVERRIDE;
- virtual void ClearCompositionText() OVERRIDE;
- virtual void InsertText(const base::string16& text) OVERRIDE;
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE;
- virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
- virtual TextInputType GetTextInputType() const OVERRIDE;
- virtual TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual gfx::Rect GetCaretBounds() const OVERRIDE;
+ virtual void SetCompositionText(const CompositionText& composition) override;
+ virtual void ConfirmCompositionText() override;
+ virtual void ClearCompositionText() override;
+ virtual void InsertText(const base::string16& text) override;
+ virtual void InsertChar(base::char16 ch, int flags) override;
+ virtual gfx::NativeWindow GetAttachedWindow() const override;
+ virtual TextInputType GetTextInputType() const override;
+ virtual TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual gfx::Rect GetCaretBounds() const override;
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE;
- virtual bool HasCompositionText() const OVERRIDE;
- virtual bool GetTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE;
- virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE;
- virtual bool DeleteRange(const gfx::Range& range) OVERRIDE;
+ gfx::Rect* rect) const override;
+ virtual bool HasCompositionText() const override;
+ virtual bool GetTextRange(gfx::Range* range) const override;
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override;
+ virtual bool GetSelectionRange(gfx::Range* range) const override;
+ virtual bool SetSelectionRange(const gfx::Range& range) override;
+ virtual bool DeleteRange(const gfx::Range& range) override;
virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const OVERRIDE;
- virtual void OnInputMethodChanged() OVERRIDE;
+ base::string16* text) const override;
+ virtual void OnInputMethodChanged() override;
virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) OVERRIDE;
- virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE;
- virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void OnCandidateWindowShown() OVERRIDE;
- virtual void OnCandidateWindowUpdated() OVERRIDE;
- virtual void OnCandidateWindowHidden() OVERRIDE;
- virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE;
- virtual void ExecuteEditingCommand(int command_id) OVERRIDE;
+ base::i18n::TextDirection direction) override;
+ virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
+ virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
+ virtual void OnCandidateWindowShown() override;
+ virtual void OnCandidateWindowUpdated() override;
+ virtual void OnCandidateWindowHidden() override;
+ virtual bool IsEditingCommandEnabled(int command_id) override;
+ virtual void ExecuteEditingCommand(int command_id) override;
TextInputType text_input_type_;
diff --git a/ui/base/ime/input_method_auralinux.h b/ui/base/ime/input_method_auralinux.h
index 245055e..505abbd 100644
--- a/ui/base/ime/input_method_auralinux.h
+++ b/ui/base/ime/input_method_auralinux.h
@@ -22,29 +22,29 @@
virtual ~InputMethodAuraLinux();
// Overriden from InputMethod.
- virtual void Init(bool focused) OVERRIDE;
+ virtual void Init(bool focused) override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
// Overriden from ui::LinuxInputMethodContextDelegate
- virtual void OnCommit(const base::string16& text) OVERRIDE;
+ virtual void OnCommit(const base::string16& text) override;
virtual void OnPreeditChanged(const CompositionText& composition_text)
- OVERRIDE;
- virtual void OnPreeditEnd() OVERRIDE;
- virtual void OnPreeditStart() OVERRIDE;
+ override;
+ virtual void OnPreeditEnd() override;
+ virtual void OnPreeditStart() override;
protected:
// Overridden from InputMethodBase.
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE;
+ TextInputClient* focused) override;
private:
// Allows to fire a VKEY_PROCESSKEY key event.
diff --git a/ui/base/ime/input_method_base.h b/ui/base/ime/input_method_base.h
index ce38015..76260e6 100644
--- a/ui/base/ime/input_method_base.h
+++ b/ui/base/ime/input_method_base.h
@@ -32,28 +32,28 @@
virtual ~InputMethodBase();
// Overriden from InputMethod.
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE;
- virtual void Init(bool focused) OVERRIDE;
+ virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ virtual void Init(bool focused) override;
// If a derived class overrides OnFocus()/OnBlur(), it should call parent's
// implementation first, to make sure |system_toplevel_window_focused_| flag
// can be updated correctly.
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE;
- virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE;
- virtual TextInputClient* GetTextInputClient() const OVERRIDE;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void SetFocusedTextInputClient(TextInputClient* client) override;
+ virtual void DetachTextInputClient(TextInputClient* client) override;
+ virtual TextInputClient* GetTextInputClient() const override;
// If a derived class overrides this method, it should call parent's
// implementation.
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
- virtual TextInputType GetTextInputType() const OVERRIDE;
- virtual TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
+ virtual TextInputType GetTextInputType() const override;
+ virtual TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual void ShowImeIfNeeded() override;
- virtual void AddObserver(InputMethodObserver* observer) OVERRIDE;
- virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE;
+ virtual void AddObserver(InputMethodObserver* observer) override;
+ virtual void RemoveObserver(InputMethodObserver* observer) override;
protected:
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
diff --git a/ui/base/ime/input_method_base_unittest.cc b/ui/base/ime/input_method_base_unittest.cc
index 830bba0..797d88e 100644
--- a/ui/base/ime/input_method_base_unittest.cc
+++ b/ui/base/ime/input_method_base_unittest.cc
@@ -154,35 +154,35 @@
// Overriden from InputMethod.
virtual bool OnUntranslatedIMEMessage(
const base::NativeEvent& event,
- InputMethod::NativeEventResult* result) OVERRIDE {
+ InputMethod::NativeEventResult* result) override {
return false;
}
- virtual bool DispatchKeyEvent(const ui::KeyEvent&) OVERRIDE {
+ virtual bool DispatchKeyEvent(const ui::KeyEvent&) override {
return false;
}
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
}
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE {
+ virtual void CancelComposition(const TextInputClient* client) override {
}
- virtual void OnInputLocaleChanged() OVERRIDE {
+ virtual void OnInputLocaleChanged() override {
}
- virtual std::string GetInputLocale() OVERRIDE{
+ virtual std::string GetInputLocale() override{
return "";
}
- virtual bool IsActive() OVERRIDE {
+ virtual bool IsActive() override {
return false;
}
- virtual bool IsCandidatePopupOpen() const OVERRIDE {
+ virtual bool IsCandidatePopupOpen() const override {
return false;
}
// Overriden from InputMethodBase.
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE {
+ TextInputClient* focused) override {
verifier_->OnWillChangeFocusedClient(focused_before, focused);
}
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE {
+ TextInputClient* focused) override {
verifier_->OnDidChangeFocusedClient(focused_before, focused);
}
@@ -202,20 +202,20 @@
}
private:
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override {
}
- virtual void OnFocus() OVERRIDE {
+ virtual void OnFocus() override {
}
- virtual void OnBlur() OVERRIDE {
+ virtual void OnBlur() override {
}
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
}
- virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnTextInputStateChanged(const TextInputClient* client) override {
verifier_->OnTextInputStateChanged(client);
}
- virtual void OnShowImeIfNeeded() OVERRIDE {
+ virtual void OnShowImeIfNeeded() override {
}
- virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE {
+ virtual void OnInputMethodDestroyed(const InputMethod* client) override {
}
ClientChangeVerifier* verifier_;
@@ -230,13 +230,13 @@
virtual ~MockTextInputClient() {
}
- virtual void OnCandidateWindowShown() OVERRIDE {
+ virtual void OnCandidateWindowShown() override {
++shown_event_count_;
}
- virtual void OnCandidateWindowUpdated() OVERRIDE {
+ virtual void OnCandidateWindowUpdated() override {
++updated_event_count_;
}
- virtual void OnCandidateWindowHidden() OVERRIDE {
+ virtual void OnCandidateWindowHidden() override {
++hidden_event_count_;
}
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index b3df071..6930968 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -617,6 +617,9 @@
else if (underline_attributes[i].type ==
chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_ERROR)
underline.color = SK_ColorRED;
+ else if (underline_attributes[i].type ==
+ chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_NONE)
+ underline.color = SK_ColorTRANSPARENT;
out_composition->underlines.push_back(underline);
}
}
diff --git a/ui/base/ime/input_method_chromeos.h b/ui/base/ime/input_method_chromeos.h
index 98b42ae..a09cd3d 100644
--- a/ui/base/ime/input_method_chromeos.h
+++ b/ui/base/ime/input_method_chromeos.h
@@ -28,18 +28,18 @@
virtual ~InputMethodChromeOS();
// Overridden from InputMethod:
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
protected:
// Converts |text| into CompositionText.
@@ -59,9 +59,9 @@
// Overridden from InputMethodBase:
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE;
+ TextInputClient* focused) override;
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE;
+ TextInputClient* focused) override;
// Asks the client to confirm current composition text.
void ConfirmCompositionText();
@@ -100,11 +100,11 @@
bool ExecuteCharacterComposer(const ui::KeyEvent& event);
// chromeos::IMEInputContextHandlerInterface overrides:
- virtual void CommitText(const std::string& text) OVERRIDE;
+ virtual void CommitText(const std::string& text) override;
virtual void UpdateCompositionText(const chromeos::CompositionText& text,
uint32 cursor_pos,
- bool visible) OVERRIDE;
- virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE;
+ bool visible) override;
+ virtual void DeleteSurroundingText(int32 offset, uint32 length) override;
// Hides the composition text.
void HidePreeditText();
diff --git a/ui/base/ime/input_method_chromeos_unittest.cc b/ui/base/ime/input_method_chromeos_unittest.cc
index 1db29e9..5071872 100644
--- a/ui/base/ime/input_method_chromeos_unittest.cc
+++ b/ui/base/ime/input_method_chromeos_unittest.cc
@@ -80,7 +80,7 @@
// Overridden from InputMethodChromeOS:
virtual void ProcessKeyEventPostIME(const ui::KeyEvent& key_event,
- bool handled) OVERRIDE {
+ bool handled) override {
process_key_event_post_ime_args_.event = &key_event;
process_key_event_post_ime_args_.handled = handled;
++process_key_event_post_ime_call_count_;
@@ -210,7 +210,7 @@
virtual ~InputMethodChromeOSTest() {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
chromeos::IMEBridge::Initialize();
mock_ime_engine_handler_.reset(
@@ -230,7 +230,7 @@
ime_->SetFocusedTextInputClient(this);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
if (ime_.get()) {
if (switches::IsTextInputFocusManagerEnabled())
TextInputFocusManager::GetInstance()->BlurTextInputClient(this);
@@ -246,89 +246,89 @@
}
// Overridden from ui::internal::InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE {
+ virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
dispatched_key_event_ = event;
return false;
}
// Overridden from ui::TextInputClient:
virtual void SetCompositionText(
- const CompositionText& composition) OVERRIDE {
+ const CompositionText& composition) override {
composition_text_ = composition;
}
- virtual void ConfirmCompositionText() OVERRIDE {
+ virtual void ConfirmCompositionText() override {
confirmed_text_ = composition_text_;
composition_text_.Clear();
}
- virtual void ClearCompositionText() OVERRIDE {
+ virtual void ClearCompositionText() override {
composition_text_.Clear();
}
- virtual void InsertText(const base::string16& text) OVERRIDE {
+ virtual void InsertText(const base::string16& text) override {
inserted_text_ = text;
}
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE {
+ virtual void InsertChar(base::char16 ch, int flags) override {
inserted_char_ = ch;
inserted_char_flags_ = flags;
}
- virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE {
+ virtual gfx::NativeWindow GetAttachedWindow() const override {
return static_cast<gfx::NativeWindow>(NULL);
}
- virtual TextInputType GetTextInputType() const OVERRIDE {
+ virtual TextInputType GetTextInputType() const override {
return input_type_;
}
- virtual TextInputMode GetTextInputMode() const OVERRIDE {
+ virtual TextInputMode GetTextInputMode() const override {
return input_mode_;
}
- virtual bool CanComposeInline() const OVERRIDE {
+ virtual bool CanComposeInline() const override {
return can_compose_inline_;
}
- virtual gfx::Rect GetCaretBounds() const OVERRIDE {
+ virtual gfx::Rect GetCaretBounds() const override {
return caret_bounds_;
}
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE {
+ gfx::Rect* rect) const override {
return false;
}
- virtual bool HasCompositionText() const OVERRIDE {
+ virtual bool HasCompositionText() const override {
CompositionText empty;
return composition_text_ != empty;
}
- virtual bool GetTextRange(gfx::Range* range) const OVERRIDE {
+ virtual bool GetTextRange(gfx::Range* range) const override {
*range = text_range_;
return true;
}
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE {
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override {
return false;
}
- virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE {
+ virtual bool GetSelectionRange(gfx::Range* range) const override {
*range = selection_range_;
return true;
}
- virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE {
+ virtual bool SetSelectionRange(const gfx::Range& range) override {
return false;
}
- virtual bool DeleteRange(const gfx::Range& range) OVERRIDE { return false; }
+ virtual bool DeleteRange(const gfx::Range& range) override { return false; }
virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const OVERRIDE {
+ base::string16* text) const override {
*text = surrounding_text_.substr(range.GetMin(), range.length());
return true;
}
- virtual void OnInputMethodChanged() OVERRIDE {
+ virtual void OnInputMethodChanged() override {
++on_input_method_changed_call_count_;
}
virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) OVERRIDE { return false; }
+ base::i18n::TextDirection direction) override { return false; }
virtual void ExtendSelectionAndDelete(size_t before,
- size_t after) OVERRIDE {}
- virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {}
- virtual void OnCandidateWindowShown() OVERRIDE {}
- virtual void OnCandidateWindowUpdated() OVERRIDE {}
- virtual void OnCandidateWindowHidden() OVERRIDE {}
- virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE {
+ size_t after) override {}
+ virtual void EnsureCaretInRect(const gfx::Rect& rect) override {}
+ virtual void OnCandidateWindowShown() override {}
+ virtual void OnCandidateWindowUpdated() override {}
+ virtual void OnCandidateWindowHidden() override {}
+ virtual bool IsEditingCommandEnabled(int command_id) override {
return false;
}
- virtual void ExecuteEditingCommand(int command_id) OVERRIDE {}
+ virtual void ExecuteEditingCommand(int command_id) override {}
bool HasNativeEvent() const {
return dispatched_key_event_.HasNativeEvent();
@@ -945,7 +945,7 @@
InputMethodChromeOSKeyEventTest() {}
virtual ~InputMethodChromeOSKeyEventTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
InputMethodChromeOSTest::SetUp();
ime_->Init(true);
}
diff --git a/ui/base/ime/input_method_mac.h b/ui/base/ime/input_method_mac.h
index 08f6080..95d3cee 100644
--- a/ui/base/ime/input_method_mac.h
+++ b/ui/base/ime/input_method_mac.h
@@ -20,14 +20,14 @@
// Overriden from InputMethod.
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
private:
DISALLOW_COPY_AND_ASSIGN(InputMethodMac);
diff --git a/ui/base/ime/input_method_minimal.h b/ui/base/ime/input_method_minimal.h
index 84fd066..14700f5 100644
--- a/ui/base/ime/input_method_minimal.h
+++ b/ui/base/ime/input_method_minimal.h
@@ -18,14 +18,14 @@
// Overriden from InputMethod.
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
private:
DISALLOW_COPY_AND_ASSIGN(InputMethodMinimal);
diff --git a/ui/base/ime/input_method_win.h b/ui/base/ime/input_method_win.h
index b02d670..b6d5320 100644
--- a/ui/base/ime/input_method_win.h
+++ b/ui/base/ime/input_method_win.h
@@ -23,28 +23,28 @@
HWND toplevel_window_handle);
// Overridden from InputMethod:
- virtual void Init(bool focused) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void Init(bool focused) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
protected:
// Overridden from InputMethodBase:
// If a derived class overrides this method, it should call parent's
// implementation.
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE;
+ TextInputClient* focused) override;
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) OVERRIDE;
+ TextInputClient* focused) override;
private:
// For both WM_CHAR and WM_SYSCHAR
diff --git a/ui/base/ime/linux/fake_input_method_context.h b/ui/base/ime/linux/fake_input_method_context.h
index 67210c1..d13d2b9 100644
--- a/ui/base/ime/linux/fake_input_method_context.h
+++ b/ui/base/ime/linux/fake_input_method_context.h
@@ -15,11 +15,11 @@
FakeInputMethodContext();
// Overriden from ui::LinuxInputMethodContext
- virtual bool DispatchKeyEvent(const ui::KeyEvent& key_event) OVERRIDE;
- virtual void Reset() OVERRIDE;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& key_event) override;
+ virtual void Reset() override;
virtual void OnTextInputTypeChanged(ui::TextInputType text_input_type)
- OVERRIDE;
- virtual void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) OVERRIDE;
+ override;
+ virtual void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override;
private:
DISALLOW_COPY_AND_ASSIGN(FakeInputMethodContext);
diff --git a/ui/base/ime/linux/fake_input_method_context_factory.h b/ui/base/ime/linux/fake_input_method_context_factory.h
index b2f6b43..d6101fa 100644
--- a/ui/base/ime/linux/fake_input_method_context_factory.h
+++ b/ui/base/ime/linux/fake_input_method_context_factory.h
@@ -17,7 +17,7 @@
// Overriden from ui::LinuxInputMethodContextFactory
virtual scoped_ptr<LinuxInputMethodContext> CreateInputMethodContext(
- LinuxInputMethodContextDelegate* delegate) const OVERRIDE;
+ LinuxInputMethodContextDelegate* delegate) const override;
private:
DISALLOW_COPY_AND_ASSIGN(FakeInputMethodContextFactory);
diff --git a/ui/base/ime/mock_input_method.h b/ui/base/ime/mock_input_method.h
index 7716065..e61c6fb 100644
--- a/ui/base/ime/mock_input_method.h
+++ b/ui/base/ime/mock_input_method.h
@@ -29,29 +29,29 @@
virtual ~MockInputMethod();
// Overriden from InputMethod.
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE;
- virtual void Init(bool focused) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ virtual void Init(bool focused) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE;
- virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE;
- virtual TextInputClient* GetTextInputClient() const OVERRIDE;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual TextInputType GetTextInputType() const OVERRIDE;
- virtual TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
- virtual void AddObserver(InputMethodObserver* observer) OVERRIDE;
- virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE;
+ NativeEventResult* result) override;
+ virtual void SetFocusedTextInputClient(TextInputClient* client) override;
+ virtual void DetachTextInputClient(TextInputClient* client) override;
+ virtual TextInputClient* GetTextInputClient() const override;
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
+ virtual void CancelComposition(const TextInputClient* client) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual TextInputType GetTextInputType() const override;
+ virtual TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual bool IsCandidatePopupOpen() const override;
+ virtual void ShowImeIfNeeded() override;
+ virtual void AddObserver(InputMethodObserver* observer) override;
+ virtual void RemoveObserver(InputMethodObserver* observer) override;
private:
TextInputClient* text_input_client_;
diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc
index 9fad0ad..0b75c07 100644
--- a/ui/base/ime/remote_input_method_win.cc
+++ b/ui/base/ime/remote_input_method_win.cc
@@ -4,6 +4,7 @@
#include "ui/base/ime/remote_input_method_win.h"
+#include "base/command_line.h"
#include "base/observer_list.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/metro.h"
@@ -14,6 +15,7 @@
#include "ui/base/ime/remote_input_method_delegate_win.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/base/ime/win/tsf_input_scope.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/rect.h"
@@ -128,25 +130,25 @@
private:
// Overridden from InputMethod:
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE {
+ virtual void SetDelegate(internal::InputMethodDelegate* delegate) override {
delegate_ = delegate;
}
- virtual void Init(bool focused) OVERRIDE {
+ virtual void Init(bool focused) override {
}
- virtual void OnFocus() OVERRIDE {
+ virtual void OnFocus() override {
}
- virtual void OnBlur() OVERRIDE {
+ virtual void OnBlur() override {
}
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE {
+ NativeEventResult* result) override {
return false;
}
- virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE {
+ virtual void SetFocusedTextInputClient(TextInputClient* client) override {
std::vector<int32> prev_input_scopes;
std::swap(input_scopes_, prev_input_scopes);
std::vector<gfx::Rect> prev_bounds;
@@ -172,17 +174,17 @@
composition_character_bounds_);
}
- virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE {
+ virtual void DetachTextInputClient(TextInputClient* client) override {
if (text_input_client_ != client)
return;
SetFocusedTextInputClient(NULL);
}
- virtual TextInputClient* GetTextInputClient() const OVERRIDE {
+ virtual TextInputClient* GetTextInputClient() const override {
return text_input_client_;
}
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE {
+ virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override {
if (event.HasNativeEvent()) {
const base::NativeEvent& native_key_event = event.native_event();
if (native_key_event.message != WM_CHAR)
@@ -207,7 +209,7 @@
return delegate_->DispatchKeyEventPostIME(event);
}
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override {
if (!text_input_client_ || text_input_client_ != client)
return;
std::vector<int32> prev_input_scopes;
@@ -220,7 +222,7 @@
}
}
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
if (!text_input_client_ || text_input_client_ != client)
return;
std::vector<gfx::Rect> prev_rects;
@@ -232,15 +234,15 @@
}
}
- virtual void CancelComposition(const TextInputClient* client) OVERRIDE {
+ virtual void CancelComposition(const TextInputClient* client) override {
if (CanSendRemoteNotification(client))
remote_delegate_->CancelComposition();
}
- virtual void OnInputLocaleChanged() OVERRIDE {
+ virtual void OnInputLocaleChanged() override {
}
- virtual std::string GetInputLocale() OVERRIDE {
+ virtual std::string GetInputLocale() override {
const LCID locale_id = MAKELCID(langid_, SORT_DEFAULT);
std::string language =
GetLocaleString(locale_id, LOCALE_SISO639LANGNAME);
@@ -253,42 +255,42 @@
return language.append(1, '-').append(region);
}
- virtual bool IsActive() OVERRIDE {
+ virtual bool IsActive() override {
return true; // always turned on
}
- virtual TextInputType GetTextInputType() const OVERRIDE {
+ virtual TextInputType GetTextInputType() const override {
return text_input_client_ ? text_input_client_->GetTextInputType()
: TEXT_INPUT_TYPE_NONE;
}
- virtual TextInputMode GetTextInputMode() const OVERRIDE {
+ virtual TextInputMode GetTextInputMode() const override {
return text_input_client_ ? text_input_client_->GetTextInputMode()
: TEXT_INPUT_MODE_DEFAULT;
}
- virtual bool CanComposeInline() const OVERRIDE {
+ virtual bool CanComposeInline() const override {
return text_input_client_ ? text_input_client_->CanComposeInline() : true;
}
- virtual bool IsCandidatePopupOpen() const OVERRIDE {
+ virtual bool IsCandidatePopupOpen() const override {
return is_candidate_popup_open_;
}
- virtual void ShowImeIfNeeded() OVERRIDE {
+ virtual void ShowImeIfNeeded() override {
}
- virtual void AddObserver(InputMethodObserver* observer) OVERRIDE {
+ virtual void AddObserver(InputMethodObserver* observer) override {
observer_list_.AddObserver(observer);
}
- virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE {
+ virtual void RemoveObserver(InputMethodObserver* observer) override {
observer_list_.RemoveObserver(observer);
}
// Overridden from RemoteInputMethodPrivateWin:
virtual void SetRemoteDelegate(
- internal::RemoteInputMethodDelegateWin* delegate) OVERRIDE{
+ internal::RemoteInputMethodDelegateWin* delegate) override{
remote_delegate_ = delegate;
// Sync initial state.
@@ -298,7 +300,7 @@
}
}
- virtual void OnCandidatePopupChanged(bool visible) OVERRIDE {
+ virtual void OnCandidatePopupChanged(bool visible) override {
is_candidate_popup_open_ = visible;
if (!text_input_client_)
return;
@@ -310,7 +312,7 @@
text_input_client_->OnCandidateWindowHidden();
}
- virtual void OnInputSourceChanged(LANGID langid, bool /*is_ime*/) OVERRIDE {
+ virtual void OnInputSourceChanged(LANGID langid, bool /*is_ime*/) override {
// Note: Currently |is_ime| is not utilized yet.
const bool changed = (langid_ != langid);
langid_ = langid;
@@ -319,13 +321,13 @@
}
virtual void OnCompositionChanged(
- const CompositionText& composition_text) OVERRIDE {
+ const CompositionText& composition_text) override {
if (!text_input_client_)
return;
text_input_client_->SetCompositionText(composition_text);
}
- virtual void OnTextCommitted(const base::string16& text) OVERRIDE {
+ virtual void OnTextCommitted(const base::string16& text) override {
if (!text_input_client_)
return;
if (text_input_client_->GetTextInputType() == TEXT_INPUT_TYPE_NONE) {
@@ -364,6 +366,10 @@
} // namespace
bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget) {
+ // If the remote input method is already registered then don't do it again.
+ if (ui::g_public_interface_ && ui::g_private_interface_)
+ return false;
+
DWORD process_id = 0;
if (GetWindowThreadProcessId(widget, &process_id) == 0)
return false;
@@ -371,7 +377,9 @@
PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id));
if (!process_handle.IsValid())
return false;
- return base::win::IsProcessImmersive(process_handle.Get());
+ return base::win::IsProcessImmersive(process_handle.Get()) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kViewerConnect);
}
RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {}
diff --git a/ui/base/ime/remote_input_method_win_unittest.cc b/ui/base/ime/remote_input_method_win_unittest.cc
index 40269de..5cf8aa3 100644
--- a/ui/base/ime/remote_input_method_win_unittest.cc
+++ b/ui/base/ime/remote_input_method_win_unittest.cc
@@ -87,28 +87,28 @@
private:
// Overriden from DummyTextInputClient.
virtual void SetCompositionText(
- const ui::CompositionText& composition) OVERRIDE {
+ const ui::CompositionText& composition) override {
++call_count_set_composition_text_;
}
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE {
+ virtual void InsertChar(base::char16 ch, int flags) override {
inserted_text_.append(1, ch);
++call_count_insert_char_;
}
- virtual void InsertText(const base::string16& text) OVERRIDE {
+ virtual void InsertText(const base::string16& text) override {
inserted_text_.append(text);
++call_count_insert_text_;
}
- virtual ui::TextInputType GetTextInputType() const OVERRIDE {
+ virtual ui::TextInputType GetTextInputType() const override {
return text_input_type_;
}
- virtual ui::TextInputMode GetTextInputMode() const OVERRIDE {
+ virtual ui::TextInputMode GetTextInputMode() const override {
return text_input_mode_;
}
virtual gfx::Rect GetCaretBounds() const {
return caret_bounds_;
}
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE {
+ gfx::Rect* rect) const override {
// Emulate the situation of crbug.com/328237.
if (emulate_pepper_flash_)
return false;
@@ -117,19 +117,19 @@
*rect = composition_character_bounds_[index];
return true;
}
- virtual bool HasCompositionText() const OVERRIDE {
+ virtual bool HasCompositionText() const override {
return !composition_character_bounds_.empty();
}
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE {
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override {
if (composition_character_bounds_.empty())
return false;
*range = gfx::Range(0, composition_character_bounds_.size());
return true;
}
- virtual void OnCandidateWindowShown() OVERRIDE {
+ virtual void OnCandidateWindowShown() override {
is_candidate_window_shown_called_ = true;
}
- virtual void OnCandidateWindowHidden() OVERRIDE {
+ virtual void OnCandidateWindowHidden() override {
is_candidate_window_hidden_called_ = true;
}
@@ -159,7 +159,7 @@
}
private:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE {
+ virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
EXPECT_FALSE(event.HasNativeEvent());
fabricated_key_events_.push_back(event.key_code());
return true;
@@ -197,13 +197,13 @@
}
private:
- virtual void CancelComposition() OVERRIDE {
+ virtual void CancelComposition() override {
cancel_composition_called_ = true;
}
virtual void OnTextInputClientUpdated(
const std::vector<int32>& input_scopes,
- const std::vector<gfx::Rect>& composition_character_bounds) OVERRIDE {
+ const std::vector<gfx::Rect>& composition_character_bounds) override {
text_input_client_updated_called_ = true;
input_scopes_ = input_scopes;
composition_character_bounds_ = composition_character_bounds;
@@ -237,18 +237,18 @@
private:
// Overriden from InputMethodObserver.
- virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnTextInputTypeChanged(const TextInputClient* client) override {
}
- virtual void OnFocus() OVERRIDE {
+ virtual void OnFocus() override {
}
- virtual void OnBlur() OVERRIDE {
+ virtual void OnBlur() override {
}
- virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
}
- virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE {
+ virtual void OnTextInputStateChanged(const TextInputClient* client) override {
++on_text_input_state_changed_;
}
- virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE {
+ virtual void OnInputMethodDestroyed(const InputMethod* client) override {
++on_input_method_destroyed_changed_;
}
virtual void OnShowImeIfNeeded() {
diff --git a/ui/base/ime/win/tsf_input_scope.cc b/ui/base/ime/win/tsf_input_scope.cc
index f40f928..1c248f1 100644
--- a/ui/base/ime/win/tsf_input_scope.cc
+++ b/ui/base/ime/win/tsf_input_scope.cc
@@ -29,18 +29,18 @@
input_scopes->push_back(input_scope);
}
-class TSFInputScope FINAL : public ITfInputScope {
+class TSFInputScope final : public ITfInputScope {
public:
explicit TSFInputScope(const std::vector<InputScope>& input_scopes)
: input_scopes_(input_scopes),
ref_count_(0) {}
// ITfInputScope:
- STDMETHOD_(ULONG, AddRef)() OVERRIDE {
+ STDMETHOD_(ULONG, AddRef)() override {
return InterlockedIncrement(&ref_count_);
}
- STDMETHOD_(ULONG, Release)() OVERRIDE {
+ STDMETHOD_(ULONG, Release)() override {
const LONG count = InterlockedDecrement(&ref_count_);
if (!count) {
delete this;
@@ -49,7 +49,7 @@
return static_cast<ULONG>(count);
}
- STDMETHOD(QueryInterface)(REFIID iid, void** result) OVERRIDE {
+ STDMETHOD(QueryInterface)(REFIID iid, void** result) override {
if (!result)
return E_INVALIDARG;
if (iid == IID_IUnknown || iid == IID_ITfInputScope) {
@@ -62,7 +62,7 @@
return S_OK;
}
- STDMETHOD(GetInputScopes)(InputScope** input_scopes, UINT* count) OVERRIDE {
+ STDMETHOD(GetInputScopes)(InputScope** input_scopes, UINT* count) override {
if (!count || !input_scopes)
return E_INVALIDARG;
*input_scopes = static_cast<InputScope*>(CoTaskMemAlloc(
@@ -78,19 +78,19 @@
return S_OK;
}
- STDMETHOD(GetPhrase)(BSTR** phrases, UINT* count) OVERRIDE {
+ STDMETHOD(GetPhrase)(BSTR** phrases, UINT* count) override {
return E_NOTIMPL;
}
- STDMETHOD(GetRegularExpression)(BSTR* regexp) OVERRIDE {
+ STDMETHOD(GetRegularExpression)(BSTR* regexp) override {
return E_NOTIMPL;
}
- STDMETHOD(GetSRGS)(BSTR* srgs) OVERRIDE {
+ STDMETHOD(GetSRGS)(BSTR* srgs) override {
return E_NOTIMPL;
}
- STDMETHOD(GetXML)(BSTR* xml) OVERRIDE {
+ STDMETHOD(GetXML)(BSTR* xml) override {
return E_NOTIMPL;
}
diff --git a/ui/base/models/list_model_unittest.cc b/ui/base/models/list_model_unittest.cc
index 5666167..8422a12 100644
--- a/ui/base/models/list_model_unittest.cc
+++ b/ui/base/models/list_model_unittest.cc
@@ -47,16 +47,16 @@
}
// ListModelObserver implementation:
- virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE {
+ virtual void ListItemsAdded(size_t start, size_t count) override {
added_count_ += count;
}
- virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE {
+ virtual void ListItemsRemoved(size_t start, size_t count) override {
removed_count_ += count;
}
- virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE {
+ virtual void ListItemMoved(size_t index, size_t target_index) override {
++moved_count_;
}
- virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE {
+ virtual void ListItemsChanged(size_t start, size_t count) override {
changed_count_ += count;
}
diff --git a/ui/base/models/simple_combobox_model.h b/ui/base/models/simple_combobox_model.h
index c978ec9..4aa28c3 100644
--- a/ui/base/models/simple_combobox_model.h
+++ b/ui/base/models/simple_combobox_model.h
@@ -19,10 +19,10 @@
virtual ~SimpleComboboxModel();
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE;
- virtual base::string16 GetItemAt(int index) OVERRIDE;
- virtual bool IsItemSeparatorAt(int index) OVERRIDE;
- virtual int GetDefaultIndex() const OVERRIDE;
+ virtual int GetItemCount() const override;
+ virtual base::string16 GetItemAt(int index) override;
+ virtual bool IsItemSeparatorAt(int index) override;
+ virtual int GetDefaultIndex() const override;
private:
const std::vector<base::string16> items_;
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index 78c8fd6..f1238dd 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -140,33 +140,33 @@
int GetIndexOfCommandId(int command_id);
// Overridden from MenuModel:
- virtual bool HasIcons() const OVERRIDE;
- virtual int GetItemCount() const OVERRIDE;
- virtual ItemType GetTypeAt(int index) const OVERRIDE;
- virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const OVERRIDE;
- virtual int GetCommandIdAt(int index) const OVERRIDE;
- virtual base::string16 GetLabelAt(int index) const OVERRIDE;
- virtual base::string16 GetSublabelAt(int index) const OVERRIDE;
- virtual base::string16 GetMinorTextAt(int index) const OVERRIDE;
- virtual bool IsItemDynamicAt(int index) const OVERRIDE;
+ virtual bool HasIcons() const override;
+ virtual int GetItemCount() const override;
+ virtual ItemType GetTypeAt(int index) const override;
+ virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
+ virtual int GetCommandIdAt(int index) const override;
+ virtual base::string16 GetLabelAt(int index) const override;
+ virtual base::string16 GetSublabelAt(int index) const override;
+ virtual base::string16 GetMinorTextAt(int index) const override;
+ virtual bool IsItemDynamicAt(int index) const override;
virtual bool GetAcceleratorAt(int index,
- ui::Accelerator* accelerator) const OVERRIDE;
- virtual bool IsItemCheckedAt(int index) const OVERRIDE;
- virtual int GetGroupIdAt(int index) const OVERRIDE;
- virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE;
+ ui::Accelerator* accelerator) const override;
+ virtual bool IsItemCheckedAt(int index) const override;
+ virtual int GetGroupIdAt(int index) const override;
+ virtual bool GetIconAt(int index, gfx::Image* icon) override;
virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(
- int index) const OVERRIDE;
- virtual bool IsEnabledAt(int index) const OVERRIDE;
- virtual bool IsVisibleAt(int index) const OVERRIDE;
- virtual void HighlightChangedTo(int index) OVERRIDE;
- virtual void ActivatedAt(int index) OVERRIDE;
- virtual void ActivatedAt(int index, int event_flags) OVERRIDE;
- virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE;
- virtual void MenuWillShow() OVERRIDE;
- virtual void MenuClosed() OVERRIDE;
+ int index) const override;
+ virtual bool IsEnabledAt(int index) const override;
+ virtual bool IsVisibleAt(int index) const override;
+ virtual void HighlightChangedTo(int index) override;
+ virtual void ActivatedAt(int index) override;
+ virtual void ActivatedAt(int index, int event_flags) override;
+ virtual MenuModel* GetSubmenuModelAt(int index) const override;
+ virtual void MenuWillShow() override;
+ virtual void MenuClosed() override;
virtual void SetMenuModelDelegate(
- ui::MenuModelDelegate* menu_model_delegate) OVERRIDE;
- virtual MenuModelDelegate* GetMenuModelDelegate() const OVERRIDE;
+ ui::MenuModelDelegate* menu_model_delegate) override;
+ virtual MenuModelDelegate* GetMenuModelDelegate() const override;
protected:
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
diff --git a/ui/base/models/tree_node_model.h b/ui/base/models/tree_node_model.h
index 003d20f..5df2481 100644
--- a/ui/base/models/tree_node_model.h
+++ b/ui/base/models/tree_node_model.h
@@ -154,7 +154,7 @@
virtual void SetTitle(const base::string16& title) { title_ = title; }
// TreeModelNode:
- virtual const base::string16& GetTitle() const OVERRIDE { return title_; }
+ virtual const base::string16& GetTitle() const override { return title_; }
// Returns true if this == ancestor, or one of this nodes parents is
// ancestor.
@@ -251,40 +251,40 @@
}
// TreeModel:
- virtual NodeType* GetRoot() OVERRIDE {
+ virtual NodeType* GetRoot() override {
return root_.get();
}
- virtual int GetChildCount(TreeModelNode* parent) OVERRIDE {
+ virtual int GetChildCount(TreeModelNode* parent) override {
DCHECK(parent);
return AsNode(parent)->child_count();
}
- virtual NodeType* GetChild(TreeModelNode* parent, int index) OVERRIDE {
+ virtual NodeType* GetChild(TreeModelNode* parent, int index) override {
DCHECK(parent);
return AsNode(parent)->GetChild(index);
}
- virtual int GetIndexOf(TreeModelNode* parent, TreeModelNode* child) OVERRIDE {
+ virtual int GetIndexOf(TreeModelNode* parent, TreeModelNode* child) override {
DCHECK(parent);
return AsNode(parent)->GetIndexOf(AsNode(child));
}
- virtual TreeModelNode* GetParent(TreeModelNode* node) OVERRIDE {
+ virtual TreeModelNode* GetParent(TreeModelNode* node) override {
DCHECK(node);
return AsNode(node)->parent();
}
- virtual void AddObserver(TreeModelObserver* observer) OVERRIDE {
+ virtual void AddObserver(TreeModelObserver* observer) override {
observer_list_.AddObserver(observer);
}
- virtual void RemoveObserver(TreeModelObserver* observer) OVERRIDE {
+ virtual void RemoveObserver(TreeModelObserver* observer) override {
observer_list_.RemoveObserver(observer);
}
virtual void SetTitle(TreeModelNode* node,
- const base::string16& title) OVERRIDE {
+ const base::string16& title) override {
DCHECK(node);
AsNode(node)->SetTitle(title);
NotifyObserverTreeNodeChanged(node);
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc
index d9d387c..d1a5c88 100644
--- a/ui/base/models/tree_node_model_unittest.cc
+++ b/ui/base/models/tree_node_model_unittest.cc
@@ -37,16 +37,16 @@
virtual void TreeNodesAdded(TreeModel* model,
TreeModelNode* parent,
int start,
- int count) OVERRIDE {
+ int count) override {
added_count_++;
}
virtual void TreeNodesRemoved(TreeModel* model,
TreeModelNode* parent,
int start,
- int count) OVERRIDE {
+ int count) override {
removed_count_++;
}
- virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) OVERRIDE {
+ virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) override {
changed_count_++;
}
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 2eeb1b2..70cf242 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -51,13 +51,13 @@
TextEncodingType textEncodingType);
// ResourceHandle implementation:
- virtual bool HasResource(uint16 resource_id) const OVERRIDE;
+ virtual bool HasResource(uint16 resource_id) const override;
virtual bool GetStringPiece(uint16 resource_id,
- base::StringPiece* data) const OVERRIDE;
+ base::StringPiece* data) const override;
virtual base::RefCountedStaticMemory* GetStaticMemory(
- uint16 resource_id) const OVERRIDE;
- virtual TextEncodingType GetTextEncodingType() const OVERRIDE;
- virtual ui::ScaleFactor GetScaleFactor() const OVERRIDE;
+ uint16 resource_id) const override;
+ virtual TextEncodingType GetTextEncodingType() const override;
+ virtual ui::ScaleFactor GetScaleFactor() const override;
private:
// Does the actual loading of a pack file. Called by Load and LoadFromFile.
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index b19133a..37f6c77 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -127,7 +127,7 @@
virtual ~ResourceBundleImageSource() {}
// gfx::ImageSkiaSource overrides:
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) override {
SkBitmap image;
bool fell_back_to_1x = false;
ScaleFactor scale_factor = GetSupportedScaleFactor(scale);
diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc
index 6a3f71e..488947d 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -77,20 +77,20 @@
ui::ScaleFactor scale_factor));
virtual bool GetRawDataResource(int resource_id,
ui::ScaleFactor scale_factor,
- base::StringPiece* value) OVERRIDE {
+ base::StringPiece* value) override {
*value = GetRawDataResourceMock(resource_id, scale_factor);
return true;
}
MOCK_METHOD1(GetLocalizedStringMock, base::string16(int message_id));
virtual bool GetLocalizedString(int message_id,
- base::string16* value) OVERRIDE {
+ base::string16* value) override {
*value = GetLocalizedStringMock(message_id);
return true;
}
MOCK_METHOD1(GetFontMock,
gfx::Font*(ui::ResourceBundle::FontStyle style));
virtual scoped_ptr<gfx::Font> GetFont(
- ui::ResourceBundle::FontStyle style) OVERRIDE {
+ ui::ResourceBundle::FontStyle style) override {
return scoped_ptr<gfx::Font>(GetFontMock(style));
}
};
@@ -153,7 +153,7 @@
}
// Overridden from testing::Test:
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
delete resource_bundle_;
}
@@ -383,7 +383,7 @@
virtual ~ResourceBundleImageTest() {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// Create a temporary directory to write test resource bundles to.
ASSERT_TRUE(dir_.CreateUniqueTempDir());
}
diff --git a/ui/base/resource/resource_data_dll_win.h b/ui/base/resource/resource_data_dll_win.h
index d45ac83..0aad558 100644
--- a/ui/base/resource/resource_data_dll_win.h
+++ b/ui/base/resource/resource_data_dll_win.h
@@ -18,13 +18,13 @@
virtual ~ResourceDataDLL();
// ResourceHandle implementation:
- virtual bool HasResource(uint16 resource_id) const OVERRIDE;
+ virtual bool HasResource(uint16 resource_id) const override;
virtual bool GetStringPiece(uint16 resource_id,
- base::StringPiece* data) const OVERRIDE;
+ base::StringPiece* data) const override;
virtual base::RefCountedStaticMemory* GetStaticMemory(
- uint16 resource_id) const OVERRIDE;
- virtual TextEncodingType GetTextEncodingType() const OVERRIDE;
- virtual ScaleFactor GetScaleFactor() const OVERRIDE;
+ uint16 resource_id) const override;
+ virtual TextEncodingType GetTextEncodingType() const override;
+ virtual ScaleFactor GetScaleFactor() const override;
private:
const HINSTANCE module_;
diff --git a/ui/base/test/run_all_unittests.cc b/ui/base/test/run_all_unittests.cc
index 26885c8..1254d97 100644
--- a/ui/base/test/run_all_unittests.cc
+++ b/ui/base/test/run_all_unittests.cc
@@ -33,8 +33,8 @@
protected:
// base::TestSuite:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void Shutdown() override;
private:
DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite);
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc
index e6a4c92..2163397 100644
--- a/ui/base/ui_base_switches.cc
+++ b/ui/base/ui_base_switches.cc
@@ -9,7 +9,7 @@
#if defined(OS_MACOSX) && !defined(OS_IOS)
// Enable use of cross-process CALayers to display content directly from the
// GPU process on Mac.
-const char kEnableRemoteCoreAnimation[] = "enable-remote-core-animation";
+const char kDisableRemoteCoreAnimation[] = "disable-remote-core-animation";
#endif
// Disables use of DWM composition for top level windows.
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index a1200f8..629f9af 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -13,7 +13,7 @@
namespace switches {
#if defined(OS_MACOSX) && !defined(OS_IOS)
-UI_BASE_EXPORT extern const char kEnableRemoteCoreAnimation[];
+UI_BASE_EXPORT extern const char kDisableRemoteCoreAnimation[];
#endif
UI_BASE_EXPORT extern const char kDisableDwmComposition[];
diff --git a/ui/base/webui/OWNERS b/ui/base/webui/OWNERS
new file mode 100644
index 0000000..262db99
--- /dev/null
+++ b/ui/base/webui/OWNERS
@@ -0,0 +1,2 @@
+dbeam@chromium.org
+estade@chromium.org
diff --git a/ui/base/webui/jstemplate_builder.cc b/ui/base/webui/jstemplate_builder.cc
index 4c89565..413468f 100644
--- a/ui/base/webui/jstemplate_builder.cc
+++ b/ui/base/webui/jstemplate_builder.cc
@@ -34,7 +34,7 @@
output->append("</script>");
}
-// Appends the source for JsTemplates in a script tag.
+// Appends the source for load_time_data.js in a script tag.
void AppendLoadTimeData(std::string* output) {
// fetch and cache the pointer of the jstemplate resource source text.
base::StringPiece load_time_data_src(
@@ -102,6 +102,7 @@
std::string GetI18nTemplateHtml(const base::StringPiece& html_template,
const base::DictionaryValue* json) {
std::string output(html_template.data(), html_template.size());
+ AppendLoadTimeData(&output);
AppendJsonHtml(json, &output);
AppendI18nTemplateSourceHtml(&output);
return output;
diff --git a/ui/base/win/hwnd_subclass_unittest.cc b/ui/base/win/hwnd_subclass_unittest.cc
index 520f52b..b037db9 100644
--- a/ui/base/win/hwnd_subclass_unittest.cc
+++ b/ui/base/win/hwnd_subclass_unittest.cc
@@ -26,7 +26,7 @@
WPARAM w_param,
LPARAM l_param,
LRESULT& result,
- DWORD msg_map_id) OVERRIDE {
+ DWORD msg_map_id) override {
if (message == WM_NCHITTEST)
saw_message = true;
@@ -54,7 +54,7 @@
UINT message,
WPARAM w_param,
LPARAM l_param,
- LRESULT* l_result) OVERRIDE {
+ LRESULT* l_result) override {
if (message == WM_NCHITTEST) {
saw_message = true;
return consume_messages;
diff --git a/ui/base/x/selection_requestor_unittest.cc b/ui/base/x/selection_requestor_unittest.cc
index fe6ee42..f2c7b03 100644
--- a/ui/base/x/selection_requestor_unittest.cc
+++ b/ui/base/x/selection_requestor_unittest.cc
@@ -65,7 +65,7 @@
}
protected:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// Make X11 synchronous for our display connection.
XSynchronize(x_display_, True);
@@ -85,7 +85,7 @@
requestor_.reset(new SelectionRequestor(x_display_, x_window_, NULL));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
requestor_.reset();
event_source_.reset();
XDestroyWindow(x_display_, x_window_);
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index 524edb6..c595e9d 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -43,12 +43,13 @@
#include "ui/events/x/device_data_manager_x11.h"
#include "ui/events/x/touch_factory_x11.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/geometry/insets.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/point_conversions.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/point_conversions.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/x/x11_error_tracker.h"
@@ -580,7 +581,7 @@
XDisplay* display = gfx::GetXDisplay();
XID root_window = GetX11RootWindow();
gfx::Rect root_bounds;
- if (!GetWindowRect(root_window, &root_bounds)) {
+ if (!GetOuterWindowBounds(root_window, &root_bounds)) {
LOG(ERROR) << "Failed to get the bounds of the X11 root window";
return;
}
@@ -624,7 +625,7 @@
window_desktop == current_desktop);
}
-bool GetWindowRect(XID window, gfx::Rect* rect) {
+bool GetInnerWindowBounds(XID window, gfx::Rect* rect) {
Window root, child;
int x, y;
unsigned int width, height;
@@ -640,11 +641,31 @@
*rect = gfx::Rect(x, y, width, height);
+ return true;
+}
+
+bool GetWindowExtents(XID window, gfx::Insets* extents) {
std::vector<int> insets;
- if (GetIntArrayProperty(window, "_NET_FRAME_EXTENTS", &insets) &&
- insets.size() == 4) {
- rect->Inset(-insets[0], -insets[2], -insets[1], -insets[3]);
- }
+ if (!GetIntArrayProperty(window, "_NET_FRAME_EXTENTS", &insets))
+ return false;
+ if (insets.size() != 4)
+ return false;
+
+ int left = insets[0];
+ int right = insets[1];
+ int top = insets[2];
+ int bottom = insets[3];
+ extents->Set(-top, -left, -bottom, -right);
+ return true;
+}
+
+bool GetOuterWindowBounds(XID window, gfx::Rect* rect) {
+ if (!GetInnerWindowBounds(window, rect))
+ return false;
+
+ gfx::Insets extents;
+ if (GetWindowExtents(window, &extents))
+ rect->Inset(extents);
// Not all window managers support _NET_FRAME_EXTENTS so return true even if
// requesting the property fails.
@@ -656,7 +677,7 @@
TRACE_EVENT0("ui", "WindowContainsPoint");
gfx::Rect window_rect;
- if (!GetWindowRect(window, &window_rect))
+ if (!GetOuterWindowBounds(window, &window_rect))
return false;
if (!window_rect.Contains(screen_loc))
@@ -1297,7 +1318,7 @@
}
gfx::Rect window_rect;
- if (!ui::GetWindowRect(window, &window_rect))
+ if (!ui::GetOuterWindowBounds(window, &window_rect))
return false;
// We can't use gfx::Screen here because we don't have an aura::Window. So
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 42e928f5..1346f74 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -20,7 +20,6 @@
#include "ui/base/ui_base_export.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/point.h"
#include "ui/gfx/x/x11_types.h"
typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers.
@@ -30,6 +29,7 @@
namespace gfx {
class Canvas;
+class Insets;
class Point;
class Rect;
}
@@ -121,8 +121,17 @@
// Returns true if |window| is visible.
UI_BASE_EXPORT bool IsWindowVisible(XID window);
-// Returns the bounds of |window|.
-UI_BASE_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect);
+// Returns the inner bounds of |window| (excluding the non-client area).
+UI_BASE_EXPORT bool GetInnerWindowBounds(XID window, gfx::Rect* rect);
+
+// Returns the non-client area extents of |window|. This is a negative inset; it
+// represents the negative size of the window border on all sides.
+// InnerWindowBounds.Inset(WindowExtents) = OuterWindowBounds.
+// Returns false if the window manager does not provide extents information.
+UI_BASE_EXPORT bool GetWindowExtents(XID window, gfx::Insets* extents);
+
+// Returns the outer bounds of |window| (including the non-client area).
+UI_BASE_EXPORT bool GetOuterWindowBounds(XID window, gfx::Rect* rect);
// Returns true if |window| contains the point |screen_loc|.
UI_BASE_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc);
@@ -295,8 +304,8 @@
: x11_data_(length ? x11_data : NULL), length_(length) {}
// Overridden from RefCountedMemory:
- virtual const unsigned char* front() const OVERRIDE;
- virtual size_t size() const OVERRIDE;
+ virtual const unsigned char* front() const override;
+ virtual size_t size() const override;
private:
virtual ~XRefcountedMemory();
diff --git a/ui/chromeos/network/network_icon.cc b/ui/chromeos/network/network_icon.cc
index 3d274d5..c5cddd6 100644
--- a/ui/chromeos/network/network_icon.cc
+++ b/ui/chromeos/network/network_icon.cc
@@ -214,7 +214,7 @@
: size_(size) {
}
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) override {
gfx::Size pixel_size = gfx::ToFlooredSize(gfx::ScaleSize(size_, scale));
SkBitmap empty_bitmap = GetEmptyBitmap(pixel_size);
return gfx::ImageSkiaRep(empty_bitmap, scale);
@@ -237,7 +237,7 @@
// TODO(pkotwicz): Figure out what to do when a new image resolution becomes
// available.
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) override {
gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale);
if (icon_rep.is_null())
return gfx::ImageSkiaRep();
diff --git a/ui/chromeos/network/network_icon_animation.h b/ui/chromeos/network/network_icon_animation.h
index ad73bb2..8877f5d 100644
--- a/ui/chromeos/network/network_icon_animation.h
+++ b/ui/chromeos/network/network_icon_animation.h
@@ -33,7 +33,7 @@
void RemoveObserver(AnimationObserver* observer);
// gfx::AnimationDelegate implementation.
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
static NetworkIconAnimation* GetInstance();
diff --git a/ui/chromeos/network/network_list.h b/ui/chromeos/network/network_list.h
index 96e9ea1..ca98f5d 100644
--- a/ui/chromeos/network/network_list.h
+++ b/ui/chromeos/network/network_list.h
@@ -51,7 +51,7 @@
bool UpdateInfoLabel(int message_id, int index, views::Label** label);
// network_icon::AnimationObserver:
- virtual void NetworkIconChanged() OVERRIDE;
+ virtual void NetworkIconChanged() override;
NetworkListDelegate* delegate_;
views::View* content_;
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index e9d3e4f..c90e07b 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -768,8 +768,8 @@
}
void TouchExplorationController::DispatchEvent(ui::Event* event) {
- ui::EventDispatchDetails result ALLOW_UNUSED =
- root_window_->GetHost()->dispatcher()->OnEventFromSource(event);
+ ignore_result(
+ root_window_->GetHost()->dispatcher()->OnEventFromSource(event));
}
// This is an override for a function that is only called for timer-based events
diff --git a/ui/chromeos/touch_exploration_controller.h b/ui/chromeos/touch_exploration_controller.h
index 3cf4be0..2f428a5 100644
--- a/ui/chromeos/touch_exploration_controller.h
+++ b/ui/chromeos/touch_exploration_controller.h
@@ -177,9 +177,9 @@
// Overridden from ui::EventRewriter
virtual ui::EventRewriteStatus RewriteEvent(
const ui::Event& event,
- scoped_ptr<ui::Event>* rewritten_event) OVERRIDE;
+ scoped_ptr<ui::Event>* rewritten_event) override;
virtual ui::EventRewriteStatus NextDispatchEvent(
- const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE;
+ const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) override;
// Event handlers based on the current state - see State, below.
ui::EventRewriteStatus InNoFingersDown(
@@ -235,7 +235,7 @@
// the user moves fast enough to trigger a gesture. After the user
// completes their gesture, this method will decide what keyboard
// input their gesture corresponded to.
- virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* gesture) override;
// Process the gesture events that have been created.
void ProcessGestureEvents();
diff --git a/ui/chromeos/touch_exploration_controller_unittest.cc b/ui/chromeos/touch_exploration_controller_unittest.cc
index c43885e..3fabbe7 100644
--- a/ui/chromeos/touch_exploration_controller_unittest.cc
+++ b/ui/chromeos/touch_exploration_controller_unittest.cc
@@ -33,7 +33,7 @@
events_.clear();
}
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
if (event->IsMouseEvent()) {
events_.push_back(
new ui::MouseEvent(static_cast<ui::MouseEvent&>(*event)));
@@ -75,21 +75,21 @@
class MockTouchExplorationControllerDelegate
: public ui::TouchExplorationControllerDelegate {
public:
- virtual void SetOutputLevel(int volume) OVERRIDE {
+ virtual void SetOutputLevel(int volume) override {
volume_changes_.push_back(volume);
}
- virtual void SilenceSpokenFeedback() OVERRIDE {
+ virtual void SilenceSpokenFeedback() override {
}
- virtual void PlayVolumeAdjustEarcon() OVERRIDE {
+ virtual void PlayVolumeAdjustEarcon() override {
++num_times_adjust_sound_played_;
}
- virtual void PlayPassthroughEarcon() OVERRIDE {
+ virtual void PlayPassthroughEarcon() override {
++num_times_passthrough_played_;
}
- virtual void PlayExitScreenEarcon() OVERRIDE {
+ virtual void PlayExitScreenEarcon() override {
++num_times_exit_screen_played_;
}
- virtual void PlayEnterScreenEarcon() OVERRIDE {
+ virtual void PlayEnterScreenEarcon() override {
++num_times_enter_screen_played_;
}
@@ -204,7 +204,7 @@
}
virtual ~TouchExplorationTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
if (gfx::GetGLImplementation() == gfx::kGLImplementationNone)
gfx::GLSurface::InitializeOneOffForTests();
aura::test::AuraTestBase::SetUp();
@@ -217,7 +217,7 @@
cursor_client()->DisableMouseEvents();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
root_window()->RemovePreTargetHandler(&event_capturer_);
SwitchTouchExplorationMode(false);
cursor_client_.reset();
diff --git a/ui/chromeos/user_activity_power_manager_notifier.h b/ui/chromeos/user_activity_power_manager_notifier.h
index 483f1b5..47cbcf9 100644
--- a/ui/chromeos/user_activity_power_manager_notifier.h
+++ b/ui/chromeos/user_activity_power_manager_notifier.h
@@ -26,7 +26,7 @@
virtual ~UserActivityPowerManagerNotifier();
// UserActivityObserver implementation.
- virtual void OnUserActivity(const Event* event) OVERRIDE;
+ virtual void OnUserActivity(const Event* event) override;
private:
::wm::UserActivityDetector* detector_; // not owned
diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn
index 6e89292..38b79ad 100644
--- a/ui/compositor/BUILD.gn
+++ b/ui/compositor/BUILD.gn
@@ -77,8 +77,6 @@
}
}
-if (false) {
-
source_set("test_support") {
testonly = true
sources = [
@@ -111,6 +109,7 @@
deps = [
"//base/test:test_support",
"//cc",
+ "//cc/surfaces",
"//cc:test_support",
"//skia",
"//testing/gtest",
@@ -134,8 +133,6 @@
}
}
-} # if (false)
-
# TODO(GYP) enable this when all dependencies are complete and it links.
#test("compositor_unittests") {
# sources = [
diff --git a/ui/compositor/closure_animation_observer.h b/ui/compositor/closure_animation_observer.h
index 320ea2b..638960a 100644
--- a/ui/compositor/closure_animation_observer.h
+++ b/ui/compositor/closure_animation_observer.h
@@ -23,7 +23,7 @@
virtual ~ClosureAnimationObserver();
// ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
const base::Closure closure_;
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 1b6f342..41fa0eb 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -20,6 +20,7 @@
#include "cc/layers/layer.h"
#include "cc/output/begin_frame_args.h"
#include "cc/output/context_provider.h"
+#include "cc/surfaces/surface_id_allocator.h"
#include "cc/trees/layer_tree_host.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/compositor/compositor_observer.h"
@@ -68,12 +69,31 @@
namespace ui {
+class SatisfySwapPromise : public cc::SwapPromise {
+ public:
+ explicit SatisfySwapPromise(uint32_t id) : id_(id) {}
+
+ private:
+ virtual void DidSwap(cc::CompositorFrameMetadata* metadata) override {
+ metadata->satisfies_sequences.push_back(id_);
+ }
+
+ virtual void DidNotSwap(DidNotSwapReason reason) override {
+ // TODO(jbauman): Send to the SurfaceManager immediately.
+ DCHECK(false);
+ }
+ virtual int64 TraceId() const override { return 0; }
+ uint32_t id_;
+};
+
Compositor::Compositor(gfx::AcceleratedWidget widget,
ui::ContextFactory* context_factory,
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: context_factory_(context_factory),
root_layer_(NULL),
widget_(widget),
+ surface_id_allocator_(context_factory->CreateSurfaceIdAllocator()),
+ surface_sequence_number_(0),
compositor_thread_loop_(context_factory->GetCompositorMessageLoop()),
task_runner_(task_runner),
vsync_manager_(new CompositorVSyncManager()),
@@ -142,6 +162,7 @@
host_ = cc::LayerTreeHost::CreateThreaded(
this,
context_factory_->GetSharedBitmapManager(),
+ context_factory_->GetGpuMemoryBufferManager(),
settings,
task_runner_,
compositor_thread_loop_);
@@ -150,6 +171,7 @@
this,
this,
context_factory_->GetSharedBitmapManager(),
+ context_factory_->GetGpuMemoryBufferManager(),
settings,
task_runner_);
}
@@ -406,6 +428,16 @@
host_->SetDebugState(debug_state);
}
+cc::SurfaceSequence Compositor::InsertSurfaceSequenceForNextFrame() {
+ cc::SurfaceSequence sequence;
+ sequence.id_namespace = surface_id_allocator_->id_namespace();
+ sequence.sequence = ++surface_sequence_number_;
+ scoped_ptr<cc::SwapPromise> promise(
+ new SatisfySwapPromise(surface_sequence_number_));
+ host_->QueueSwapPromise(promise.Pass());
+ return sequence;
+}
+
scoped_refptr<CompositorLock> Compositor::GetCompositorLock() {
if (!compositor_lock_) {
compositor_lock_ = new CompositorLock(this);
diff --git a/ui/compositor/compositor.gyp b/ui/compositor/compositor.gyp
index 4a1437e..76cb687 100644
--- a/ui/compositor/compositor.gyp
+++ b/ui/compositor/compositor.gyp
@@ -14,6 +14,7 @@
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/cc/cc.gyp:cc',
+ '<(DEPTH)/cc/cc.gyp:cc_surfaces',
'<(DEPTH)/gpu/gpu.gyp:command_buffer_common',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
@@ -87,6 +88,7 @@
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/cc/cc.gyp:cc',
+ '<(DEPTH)/cc/cc.gyp:cc_surfaces',
'<(DEPTH)/cc/cc_tests.gyp:cc_test_support',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/testing/gtest.gyp:gtest',
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 541f19d..471cfa7 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -13,6 +13,7 @@
#include "base/observer_list.h"
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
+#include "cc/surfaces/surface_sequence.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -33,10 +34,12 @@
namespace cc {
class ContextProvider;
+class GpuMemoryBufferManager;
class Layer;
class LayerTreeDebugState;
class LayerTreeHost;
class SharedBitmapManager;
+class SurfaceIdAllocator;
}
namespace gfx {
@@ -92,9 +95,15 @@
// Gets the shared bitmap manager for software mode.
virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0;
+ // Gets the GPU memory buffer manager.
+ virtual cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0;
+
// Gets the compositor message loop, or NULL if not using threaded
// compositing.
virtual base::MessageLoopProxy* GetCompositorMessageLoop() = 0;
+
+ // Creates a Surface ID allocator with a new namespace.
+ virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() = 0;
};
// This class represents a lock on the compositor, that can be used to prevent
@@ -228,31 +237,31 @@
void OnSwapBuffersAborted();
// LayerTreeHostClient implementation.
- virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
- virtual void DidBeginMainFrame() OVERRIDE {}
- virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual void WillBeginMainFrame(int frame_id) override {}
+ virtual void DidBeginMainFrame() override {}
+ virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override;
+ virtual void Layout() override;
virtual void ApplyViewportDeltas(
const gfx::Vector2d& inner_delta,
const gfx::Vector2d& outer_delta,
float page_scale,
- float top_controls_delta) OVERRIDE {}
+ float top_controls_delta) override {}
virtual void ApplyViewportDeltas(
const gfx::Vector2d& scroll_delta,
float page_scale,
- float top_controls_delta) OVERRIDE {}
- virtual void RequestNewOutputSurface(bool fallback) OVERRIDE;
- virtual void DidInitializeOutputSurface() OVERRIDE {}
- virtual void WillCommit() OVERRIDE {}
- virtual void DidCommit() OVERRIDE;
- virtual void DidCommitAndDrawFrame() OVERRIDE;
- virtual void DidCompleteSwapBuffers() OVERRIDE;
+ float top_controls_delta) override {}
+ virtual void RequestNewOutputSurface(bool fallback) override;
+ virtual void DidInitializeOutputSurface() override {}
+ virtual void WillCommit() override {}
+ virtual void DidCommit() override;
+ virtual void DidCommitAndDrawFrame() override;
+ virtual void DidCompleteSwapBuffers() override;
// cc::LayerTreeHostSingleThreadClient implementation.
- virtual void ScheduleComposite() OVERRIDE;
- virtual void ScheduleAnimation() OVERRIDE;
- virtual void DidPostSwapBuffers() OVERRIDE;
- virtual void DidAbortSwapBuffers() OVERRIDE;
+ virtual void ScheduleComposite() override;
+ virtual void ScheduleAnimation() override;
+ virtual void DidPostSwapBuffers() override;
+ virtual void DidAbortSwapBuffers() override;
int last_started_frame() { return last_started_frame_; }
int last_ended_frame() { return last_ended_frame_; }
@@ -266,6 +275,14 @@
return &layer_animator_collection_;
}
+ // Inserts a SurfaceSequence that will be satisfied on the next frame this
+ // compositor commits and swaps.
+ cc::SurfaceSequence InsertSurfaceSequenceForNextFrame();
+
+ cc::SurfaceIdAllocator* surface_id_allocator() {
+ return surface_id_allocator_.get();
+ }
+
private:
friend class base::RefCounted<Compositor>;
friend class CompositorLock;
@@ -290,6 +307,8 @@
ObserverList<CompositorAnimationObserver> animation_observer_list_;
gfx::AcceleratedWidget widget_;
+ scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
+ uint32_t surface_sequence_number_;
scoped_refptr<cc::Layer> root_web_layer_;
scoped_ptr<cc::LayerTreeHost> host_;
scoped_refptr<base::MessageLoopProxy> compositor_thread_loop_;
diff --git a/ui/compositor/float_animation_curve_adapter.h b/ui/compositor/float_animation_curve_adapter.h
index 9959772..84a9992 100644
--- a/ui/compositor/float_animation_curve_adapter.h
+++ b/ui/compositor/float_animation_curve_adapter.h
@@ -21,9 +21,9 @@
virtual ~FloatAnimationCurveAdapter() { }
// FloatAnimationCurve implementation.
- virtual double Duration() const OVERRIDE;
- virtual scoped_ptr<cc::AnimationCurve> Clone() const OVERRIDE;
- virtual float GetValue(double t) const OVERRIDE;
+ virtual double Duration() const override;
+ virtual scoped_ptr<cc::AnimationCurve> Clone() const override;
+ virtual float GetValue(double t) const override;
private:
gfx::Tween::Type tween_type_;
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index b08a3d0..dd0de44 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -77,7 +77,7 @@
owner_(NULL),
cc_layer_(NULL),
device_scale_factor_(1.0f) {
- CreateWebLayer();
+ CreateCcLayer();
}
Layer::Layer(LayerType type)
@@ -101,7 +101,7 @@
owner_(NULL),
cc_layer_(NULL),
device_scale_factor_(1.0f) {
- CreateWebLayer();
+ CreateCcLayer();
}
Layer::~Layer() {
@@ -491,6 +491,7 @@
new_layer->SetOpacity(cc_layer_->opacity());
new_layer->SetTransform(cc_layer_->transform());
new_layer->SetPosition(cc_layer_->position());
+ new_layer->SetBackgroundColor(cc_layer_->background_color());
cc_layer_ = new_layer.get();
content_layer_ = NULL;
@@ -529,8 +530,7 @@
const cc::TextureMailbox& mailbox,
scoped_ptr<cc::SingleReleaseCallback> release_callback,
gfx::Size texture_size_in_dip) {
- DCHECK_EQ(type_, LAYER_TEXTURED);
- DCHECK(!solid_color_layer_.get());
+ DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
DCHECK(mailbox.IsValid());
DCHECK(release_callback);
if (!texture_layer_.get()) {
@@ -558,7 +558,7 @@
void Layer::SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider,
gfx::Size frame_size_in_dip) {
- DCHECK_EQ(type_, LAYER_TEXTURED);
+ DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
scoped_refptr<cc::DelegatedRendererLayer> new_layer =
cc::DelegatedRendererLayer::Create(frame_provider);
@@ -570,7 +570,7 @@
}
void Layer::SetShowSurface(cc::SurfaceId id, gfx::Size frame_size_in_dip) {
- DCHECK_EQ(type_, LAYER_TEXTURED);
+ DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
scoped_refptr<cc::SurfaceLayer> new_layer = cc::SurfaceLayer::Create();
new_layer->SetSurfaceId(id);
@@ -581,17 +581,15 @@
RecomputeDrawsContentAndUVRect();
}
-void Layer::SetShowPaintedContent() {
- if (content_layer_.get())
+void Layer::SetShowSolidColorContent() {
+ DCHECK_EQ(type_, LAYER_SOLID_COLOR);
+
+ if (solid_color_layer_.get())
return;
- scoped_refptr<cc::Layer> new_layer;
- if (Layer::UsingPictureLayer())
- new_layer = cc::PictureLayer::Create(this);
- else
- new_layer = cc::ContentLayer::Create(this);
+ scoped_refptr<cc::SolidColorLayer> new_layer = cc::SolidColorLayer::Create();
SwitchToLayer(new_layer);
- content_layer_ = new_layer;
+ solid_color_layer_ = new_layer;
mailbox_ = cc::TextureMailbox();
if (mailbox_release_callback_) {
@@ -627,9 +625,8 @@
void Layer::SetColor(SkColor color) { GetAnimator()->SetColor(color); }
bool Layer::SchedulePaint(const gfx::Rect& invalid_rect) {
- if (type_ == LAYER_SOLID_COLOR ||
- type_ == LAYER_NINE_PATCH ||
- (!delegate_ && !mailbox_.IsValid()))
+ if ((type_ == LAYER_SOLID_COLOR && !texture_layer_.get()) ||
+ type_ == LAYER_NINE_PATCH || (!delegate_ && !mailbox_.IsValid()))
return false;
damaged_region_.op(invalid_rect.x(),
@@ -745,7 +742,7 @@
class LayerDebugInfo : public base::debug::ConvertableToTraceFormat {
public:
explicit LayerDebugInfo(std::string name) : name_(name) { }
- virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE {
+ virtual void AppendAsTraceFormat(std::string* out) const override {
base::DictionaryValue dictionary;
dictionary.SetString("layer_name", name_);
base::JSONWriter::Write(&dictionary, out);
@@ -873,7 +870,7 @@
void Layer::SetColorFromAnimation(SkColor color) {
DCHECK_EQ(type_, LAYER_SOLID_COLOR);
- solid_color_layer_->SetBackgroundColor(color);
+ cc_layer_->SetBackgroundColor(color);
SetFillsBoundsOpaquely(SkColorGetA(color) == 0xFF);
}
@@ -976,7 +973,7 @@
children_[i]->SendPendingThreadedAnimations();
}
-void Layer::CreateWebLayer() {
+void Layer::CreateCcLayer() {
if (type_ == LAYER_SOLID_COLOR) {
solid_color_layer_ = cc::SolidColorLayer::Create();
cc_layer_ = solid_color_layer_.get();
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index d009af4..ed75ff5 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -282,7 +282,8 @@
surface_layer_.get();
}
- void SetShowPaintedContent();
+ // Show a solid color instead of delegated or surface contents.
+ void SetShowSolidColorContent();
// Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
void SetColor(SkColor color);
@@ -327,9 +328,9 @@
virtual void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
- ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE;
- virtual void DidChangeLayerCanUseLCDText() OVERRIDE {}
- virtual bool FillsBoundsCompletely() const OVERRIDE;
+ ContentLayerClient::GraphicsContextStatus gc_status) override;
+ virtual void DidChangeLayerCanUseLCDText() override {}
+ virtual bool FillsBoundsCompletely() const override;
cc::Layer* cc_layer() { return cc_layer_; }
@@ -337,7 +338,7 @@
virtual bool PrepareTextureMailbox(
cc::TextureMailbox* mailbox,
scoped_ptr<cc::SingleReleaseCallback>* release_callback,
- bool use_shared_memory) OVERRIDE;
+ bool use_shared_memory) override;
float device_scale_factor() const { return device_scale_factor_; }
@@ -348,10 +349,10 @@
// LayerClient
virtual scoped_refptr<base::debug::ConvertableToTraceFormat>
- TakeDebugInfo() OVERRIDE;
+ TakeDebugInfo() override;
// LayerAnimationEventObserver
- virtual void OnAnimationStarted(const cc::AnimationEvent& event) OVERRIDE;
+ virtual void OnAnimationStarted(const cc::AnimationEvent& event) override;
// Whether this layer has animations waiting to get sent to its cc::Layer.
bool HasPendingThreadedAnimations() {
@@ -374,30 +375,30 @@
bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
// Implementation of LayerAnimatorDelegate
- virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE;
+ virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
virtual void SetTransformFromAnimation(
- const gfx::Transform& transform) OVERRIDE;
- virtual void SetOpacityFromAnimation(float opacity) OVERRIDE;
- virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE;
- virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE;
- virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE;
- virtual void SetColorFromAnimation(SkColor color) OVERRIDE;
- virtual void ScheduleDrawForAnimation() OVERRIDE;
- virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE;
- virtual gfx::Transform GetTransformForAnimation() const OVERRIDE;
- virtual float GetOpacityForAnimation() const OVERRIDE;
- virtual bool GetVisibilityForAnimation() const OVERRIDE;
- virtual float GetBrightnessForAnimation() const OVERRIDE;
- virtual float GetGrayscaleForAnimation() const OVERRIDE;
- virtual SkColor GetColorForAnimation() const OVERRIDE;
- virtual float GetDeviceScaleFactor() const OVERRIDE;
+ const gfx::Transform& transform) override;
+ virtual void SetOpacityFromAnimation(float opacity) override;
+ virtual void SetVisibilityFromAnimation(bool visibility) override;
+ virtual void SetBrightnessFromAnimation(float brightness) override;
+ virtual void SetGrayscaleFromAnimation(float grayscale) override;
+ virtual void SetColorFromAnimation(SkColor color) override;
+ virtual void ScheduleDrawForAnimation() override;
+ virtual const gfx::Rect& GetBoundsForAnimation() const override;
+ virtual gfx::Transform GetTransformForAnimation() const override;
+ virtual float GetOpacityForAnimation() const override;
+ virtual bool GetVisibilityForAnimation() const override;
+ virtual float GetBrightnessForAnimation() const override;
+ virtual float GetGrayscaleForAnimation() const override;
+ virtual SkColor GetColorForAnimation() const override;
+ virtual float GetDeviceScaleFactor() const override;
virtual void AddThreadedAnimation(
- scoped_ptr<cc::Animation> animation) OVERRIDE;
- virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE;
- virtual LayerAnimatorCollection* GetLayerAnimatorCollection() OVERRIDE;
+ scoped_ptr<cc::Animation> animation) override;
+ virtual void RemoveThreadedAnimation(int animation_id) override;
+ virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override;
// Creates a corresponding composited layer for |type_|.
- void CreateWebLayer();
+ void CreateCcLayer();
// Recomputes and sets to |cc_layer_|.
void RecomputeDrawsContentAndUVRect();
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index ade7765..b74aebc 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -35,13 +35,13 @@
virtual ~Pause() {}
private:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {}
virtual bool OnProgress(double t,
- LayerAnimationDelegate* delegate) OVERRIDE {
+ LayerAnimationDelegate* delegate) override {
return false;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnGetTarget(TargetValue* target) const override {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
DISALLOW_COPY_AND_ASSIGN(Pause);
};
@@ -57,21 +57,21 @@
virtual ~TransformTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetTransformForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(
gfx::Tween::TransformValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->transform = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
gfx::Transform start_;
@@ -92,20 +92,20 @@
virtual ~InterpolatedTransformTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(
interpolated_transform_->Interpolate(static_cast<float>(t)));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->transform = interpolated_transform_->Interpolate(1.0f);
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
scoped_ptr<InterpolatedTransform> interpolated_transform_;
@@ -124,21 +124,21 @@
virtual ~BoundsTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetBoundsForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetBoundsFromAnimation(
gfx::Tween::RectValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->bounds = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
gfx::Rect start_;
@@ -159,21 +159,21 @@
virtual ~OpacityTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetOpacityForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetOpacityFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->opacity = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -194,20 +194,20 @@
virtual ~VisibilityTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetVisibilityForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetVisibilityFromAnimation(t == 1.0 ? target_ : start_);
return t == 1.0;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->visibility = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
bool start_;
@@ -228,21 +228,21 @@
virtual ~BrightnessTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetBrightnessForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetBrightnessFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->brightness = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -263,21 +263,21 @@
virtual ~GrayscaleTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetGrayscaleForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetGrayscaleFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->grayscale = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -298,21 +298,21 @@
virtual ~ColorTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetColorForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetColorFromAnimation(
gfx::Tween::ColorValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->color = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {}
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
SkColor start_;
@@ -331,7 +331,7 @@
}
virtual ~ThreadedLayerAnimationElement() {}
- virtual bool IsThreaded() const OVERRIDE {
+ virtual bool IsThreaded() const override {
return (duration() != base::TimeDelta());
}
@@ -341,7 +341,7 @@
}
virtual bool OnProgress(double t,
- LayerAnimationDelegate* delegate) OVERRIDE {
+ LayerAnimationDelegate* delegate) override {
if (t < 1.0)
return false;
@@ -353,14 +353,14 @@
return true;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
delegate->RemoveThreadedAnimation(animation_id());
}
}
virtual void RequestEffectiveStart(
- LayerAnimationDelegate* delegate) OVERRIDE {
+ LayerAnimationDelegate* delegate) override {
DCHECK(animation_group_id());
if (duration() == base::TimeDelta()) {
set_effective_start_time(requested_start_time());
@@ -392,11 +392,11 @@
virtual ~ThreadedOpacityTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetOpacityForAnimation();
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetOpacityFromAnimation(gfx::Tween::FloatValueBetween(
@@ -406,11 +406,11 @@
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetOpacityFromAnimation(target_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() OVERRIDE {
+ virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::AnimationCurve> animation_curve(
new FloatAnimationCurveAdapter(tween_type(),
start_,
@@ -424,7 +424,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->opacity = target_;
}
@@ -447,11 +447,11 @@
virtual ~ThreadedTransformTransition() {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetTransformForAnimation();
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetTransformFromAnimation(gfx::Tween::TransformValueBetween(
@@ -461,11 +461,11 @@
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(target_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() OVERRIDE {
+ virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::AnimationCurve> animation_curve(
new TransformAnimationCurveAdapter(tween_type(),
start_,
@@ -479,7 +479,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->transform = target_;
}
@@ -512,7 +512,7 @@
}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnStart(LayerAnimationDelegate* delegate) override {
gfx::Transform start(delegate->GetTransformForAnimation());
effective_start_ = base_transform_ * start;
@@ -533,18 +533,18 @@
base_target_);
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetTransformFromAnimation(ComputeCurrentTransform());
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) OVERRIDE {
+ virtual void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(computed_target_transform_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() OVERRIDE {
+ virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::Animation> animation(
cc::Animation::Create(animation_curve_->Clone(),
animation_id(),
@@ -553,7 +553,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
+ virtual void OnGetTarget(TargetValue* target) const override {
target->transform = computed_target_transform_;
}
diff --git a/ui/compositor/layer_animation_observer.h b/ui/compositor/layer_animation_observer.h
index 9ae389d..8db5a4a 100644
--- a/ui/compositor/layer_animation_observer.h
+++ b/ui/compositor/layer_animation_observer.h
@@ -43,7 +43,7 @@
// If the animator is destroyed during an animation, the animations are
// aborted. The resulting NotifyAborted notifications will NOT be sent to
- // this observer if this function returns false. NOTE: IF YOU OVERRIDE THIS
+ // this observer if this function returns false. NOTE: IF YOU override THIS
// FUNCTION TO RETURN TRUE, YOU MUST REMEMBER TO REMOVE YOURSELF AS AN
// OBSERVER WHEN YOU ARE DESTROYED.
virtual bool RequiresNotificationWhenAnimatorDestroyed() const;
@@ -117,15 +117,15 @@
// LayerAnimationObserver implementation
virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnAttachedToSequence(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnDetachedFromSequence(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
// OnImplicitAnimationsCompleted is not fired unless the observer is active.
bool active() const { return active_; }
diff --git a/ui/compositor/layer_animator_collection.h b/ui/compositor/layer_animator_collection.h
index eef06fb..b7bfe2e 100644
--- a/ui/compositor/layer_animator_collection.h
+++ b/ui/compositor/layer_animator_collection.h
@@ -34,7 +34,7 @@
base::TimeTicks last_tick_time() const { return last_tick_time_; }
// CompositorAnimationObserver:
- virtual void OnAnimationStep(base::TimeTicks timestamp) OVERRIDE;
+ virtual void OnAnimationStep(base::TimeTicks timestamp) override;
private:
Compositor* compositor_;
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc
index c12647f..ad4ff61 100644
--- a/ui/compositor/layer_animator_unittest.cc
+++ b/ui/compositor/layer_animator_unittest.cc
@@ -80,11 +80,11 @@
private:
// ImplicitAnimationObserver implementation
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
+ virtual void OnImplicitAnimationsCompleted() override {
animations_completed_ = true;
}
- virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE {
+ virtual bool RequiresNotificationWhenAnimatorDestroyed() const override {
return notify_when_animator_destructed_;
}
@@ -102,17 +102,17 @@
}
virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
animator_->StopAnimating();
}
virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
animator_->StopAnimating();
}
virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
}
private:
@@ -158,7 +158,7 @@
}
virtual void ProgressAnimation(LayerAnimationSequence* sequence,
- base::TimeTicks now) OVERRIDE {
+ base::TimeTicks now) override {
EXPECT_TRUE(HasAnimation(sequence));
LayerAnimator::ProgressAnimation(sequence, now);
}
@@ -1948,7 +1948,7 @@
max_width_(max_width) {
}
- virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE {
+ virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override {
TestLayerAnimationDelegate::SetBoundsFromAnimation(bounds);
if (bounds.width() > max_width_)
animator_->StopAnimating();
@@ -2282,19 +2282,19 @@
// LayerAnimationObserver implementation.
virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
if (delete_on_animation_ended_)
delete this;
}
virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
if (delete_on_animation_aborted_)
delete this;
}
virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
if (delete_on_animation_scheduled_)
delete this;
}
@@ -2508,7 +2508,7 @@
virtual ~CollectionLayerAnimationDelegate() {}
// LayerAnimationDelegate:
- virtual LayerAnimatorCollection* GetLayerAnimatorCollection() OVERRIDE {
+ virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override {
return &collection;
}
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index e83eb33..6ebe72b 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -62,17 +62,17 @@
virtual ~ColoredLayer() { }
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
canvas->DrawColor(color_);
}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
+ const gfx::Rect& damage_rect_in_dip) override {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -92,7 +92,7 @@
virtual ~LayerWithRealCompositorTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
bool enable_pixel_output = true;
ui::ContextFactory* context_factory =
InitializeContextFactoryForTests(enable_pixel_output);
@@ -103,7 +103,7 @@
compositor_host_->Show();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
compositor_host_.reset();
TerminateContextFactoryForTests();
}
@@ -228,10 +228,10 @@
}
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
SkISize size = canvas->sk_canvas()->getBaseLayerSize();
paint_size_ = gfx::Size(size.width(), size.height());
- canvas->FillRect(gfx::Rect(paint_size_), colors_[color_index_]);
+ canvas->DrawColor(colors_[color_index_]);
color_index_ = (color_index_ + 1) % static_cast<int>(colors_.size());
const SkMatrix& matrix = canvas->sk_canvas()->getTotalMatrix();
scale_x_ = matrix.getScaleX();
@@ -239,13 +239,13 @@
}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
+ const gfx::Rect& damage_rect_in_dip) override {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
device_scale_factor_ = device_scale_factor;
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -281,14 +281,15 @@
private:
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
painted_ = true;
+ canvas->DrawColor(SK_ColorWHITE);
}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ const gfx::Rect& damage_rect_in_dip) override {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -305,11 +306,11 @@
private:
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {}
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ const gfx::Rect& damage_rect_in_dip) override {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -334,24 +335,24 @@
}
private:
- virtual void OnCompositingDidCommit(Compositor* compositor) OVERRIDE {
+ virtual void OnCompositingDidCommit(Compositor* compositor) override {
committed_ = true;
}
virtual void OnCompositingStarted(Compositor* compositor,
- base::TimeTicks start_time) OVERRIDE {
+ base::TimeTicks start_time) override {
started_ = true;
}
- virtual void OnCompositingEnded(Compositor* compositor) OVERRIDE {
+ virtual void OnCompositingEnded(Compositor* compositor) override {
ended_ = true;
}
- virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE {
+ virtual void OnCompositingAborted(Compositor* compositor) override {
aborted_ = true;
}
- virtual void OnCompositingLockStateChanged(Compositor* compositor) OVERRIDE {
+ virtual void OnCompositingLockStateChanged(Compositor* compositor) override {
}
bool committed_;
@@ -399,7 +400,7 @@
virtual ~LayerWithDelegateTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
bool enable_pixel_output = false;
ui::ContextFactory* context_factory =
InitializeContextFactoryForTests(enable_pixel_output);
@@ -410,7 +411,7 @@
compositor_host_->Show();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
compositor_host_.reset();
TerminateContextFactoryForTests();
}
@@ -607,12 +608,12 @@
LayerWithNullDelegateTest() {}
virtual ~LayerWithNullDelegateTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
LayerWithDelegateTest::SetUp();
default_layer_delegate_.reset(new NullLayerDelegate());
}
- virtual Layer* CreateLayer(LayerType type) OVERRIDE {
+ virtual Layer* CreateLayer(LayerType type) override {
Layer* layer = new Layer(type);
layer->set_delegate(default_layer_delegate_.get());
return layer;
@@ -630,7 +631,7 @@
return layer;
}
- virtual Layer* CreateNoTextureLayer(const gfx::Rect& bounds) OVERRIDE {
+ virtual Layer* CreateNoTextureLayer(const gfx::Rect& bounds) override {
Layer* layer = CreateLayer(LAYER_NOT_DRAWN);
layer->SetBounds(bounds);
return layer;
@@ -667,8 +668,7 @@
}
TEST_F(LayerWithNullDelegateTest, SwitchLayerPreservesCCLayerState) {
- scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED,
- gfx::Rect(20, 20, 400, 400)));
+ scoped_ptr<Layer> l1(CreateLayer(LAYER_SOLID_COLOR));
l1->SetFillsBoundsOpaquely(true);
l1->SetForceRenderSurface(true);
l1->SetVisible(false);
@@ -706,7 +706,7 @@
EXPECT_TRUE(callback1_run);
EXPECT_FALSE(callback2_run);
- l1->SetShowPaintedContent();
+ l1->SetShowSolidColorContent();
EXPECT_EQ(gfx::Point3F(), l1->cc_layer()->transform_origin());
EXPECT_TRUE(l1->cc_layer()->DrawsContent());
EXPECT_TRUE(l1->cc_layer()->contents_opaque());
@@ -1196,7 +1196,7 @@
private:
// Overridden from LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
paint_count_++;
if (!schedule_paint_rect_.IsEmpty()) {
layer_->SchedulePaint(schedule_paint_rect_);
@@ -1208,12 +1208,12 @@
}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
+ const gfx::Rect& damage_rect_in_dip) override {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Closure();
}
@@ -1491,15 +1491,16 @@
TEST_F(LayerWithDelegateTest, ExternalContent) {
scoped_ptr<Layer> root(CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000)));
- scoped_ptr<Layer> child(CreateLayer(LAYER_TEXTURED));
+ scoped_ptr<Layer> child(CreateLayer(LAYER_SOLID_COLOR));
child->SetBounds(gfx::Rect(0, 0, 10, 10));
child->SetVisible(true);
root->Add(child.get());
- // The layer is already showing painted content, so the cc layer won't change.
+ // The layer is already showing solid color content, so the cc layer won't
+ // change.
scoped_refptr<cc::Layer> before = child->cc_layer();
- child->SetShowPaintedContent();
+ child->SetShowSolidColorContent();
EXPECT_TRUE(child->cc_layer());
EXPECT_EQ(before.get(), child->cc_layer());
@@ -1517,7 +1518,7 @@
// Changing to painted content should change the underlying cc layer.
before = child->cc_layer();
- child->SetShowPaintedContent();
+ child->SetShowSolidColorContent();
EXPECT_TRUE(child->cc_layer());
EXPECT_NE(before.get(), child->cc_layer());
}
@@ -1712,7 +1713,7 @@
FrameDamageCheckingDelegate() : delegated_frame_damage_called_(false) {}
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {
+ const gfx::Rect& damage_rect_in_dip) override {
delegated_frame_damage_called_ = true;
delegated_frame_damage_rect_ = damage_rect_in_dip;
}
diff --git a/ui/compositor/scoped_layer_animation_settings.cc b/ui/compositor/scoped_layer_animation_settings.cc
index 487f96a..462f537 100644
--- a/ui/compositor/scoped_layer_animation_settings.cc
+++ b/ui/compositor/scoped_layer_animation_settings.cc
@@ -34,10 +34,10 @@
inverse_layers_.push_back(inverse_layer);
}
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {}
+ virtual void OnImplicitAnimationsCompleted() override {}
virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) OVERRIDE {
+ LayerAnimationSequence* sequence) override {
DCHECK(base_layer_ != NULL)
<< "Must set base layer with ScopedLayerAnimationSettings::"
<< "SetInverslyAnimatedBaseLayer";
diff --git a/ui/compositor/test/draw_waiter_for_test.h b/ui/compositor/test/draw_waiter_for_test.h
index 051c58f..9d8c169 100644
--- a/ui/compositor/test/draw_waiter_for_test.h
+++ b/ui/compositor/test/draw_waiter_for_test.h
@@ -32,12 +32,12 @@
void WaitImpl(Compositor* compositor);
// CompositorObserver implementation.
- virtual void OnCompositingDidCommit(Compositor* compositor) OVERRIDE;
+ virtual void OnCompositingDidCommit(Compositor* compositor) override;
virtual void OnCompositingStarted(Compositor* compositor,
- base::TimeTicks start_time) OVERRIDE;
- virtual void OnCompositingEnded(Compositor* compositor) OVERRIDE;
- virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE;
- virtual void OnCompositingLockStateChanged(Compositor* compositor) OVERRIDE;
+ base::TimeTicks start_time) override;
+ virtual void OnCompositingEnded(Compositor* compositor) override;
+ virtual void OnCompositingAborted(Compositor* compositor) override;
+ virtual void OnCompositingLockStateChanged(Compositor* compositor) override;
scoped_ptr<base::RunLoop> wait_run_loop_;
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index fa2380f..3bf0d3e 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -6,7 +6,8 @@
#include "base/command_line.h"
#include "base/threading/thread.h"
-#include "cc/output/output_surface.h"
+#include "cc/surfaces/surface_id_allocator.h"
+#include "cc/test/pixel_test_output_surface.h"
#include "cc/test/test_shared_bitmap_manager.h"
#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/reflector.h"
@@ -19,7 +20,7 @@
namespace ui {
InProcessContextFactory::InProcessContextFactory()
- : shared_bitmap_manager_(new cc::TestSharedBitmapManager()) {
+ : next_surface_id_namespace_(1u) {
DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone)
<< "If running tests, ensure that main() is calling "
<< "gfx::GLSurface::InitializeOneOffForTests()";
@@ -59,7 +60,7 @@
scoped_refptr<ContextProviderInProcess> context_provider =
ContextProviderInProcess::Create(context3d.Pass(), "UICompositor");
- return make_scoped_ptr(new cc::OutputSurface(context_provider));
+ return make_scoped_ptr(new cc::PixelTestOutputSurface(context_provider));
}
scoped_refptr<Reflector> InProcessContextFactory::CreateReflector(
@@ -93,7 +94,12 @@
bool InProcessContextFactory::DoesCreateTestContexts() { return false; }
cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() {
- return shared_bitmap_manager_.get();
+ return &shared_bitmap_manager_;
+}
+
+cc::GpuMemoryBufferManager*
+InProcessContextFactory::GetGpuMemoryBufferManager() {
+ return &gpu_memory_buffer_manager_;
}
base::MessageLoopProxy* InProcessContextFactory::GetCompositorMessageLoop() {
@@ -102,4 +108,10 @@
return compositor_thread_->message_loop_proxy().get();
}
+scoped_ptr<cc::SurfaceIdAllocator>
+InProcessContextFactory::CreateSurfaceIdAllocator() {
+ return make_scoped_ptr(
+ new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
+}
+
} // namespace ui
diff --git a/ui/compositor/test/in_process_context_factory.h b/ui/compositor/test/in_process_context_factory.h
index 1179729..70d7214 100644
--- a/ui/compositor/test/in_process_context_factory.h
+++ b/ui/compositor/test/in_process_context_factory.h
@@ -5,6 +5,8 @@
#ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
#define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
+#include "cc/test/test_gpu_memory_buffer_manager.h"
+#include "cc/test/test_shared_bitmap_manager.h"
#include "ui/compositor/compositor.h"
namespace base {
@@ -27,25 +29,30 @@
// ContextFactory implementation
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
Compositor* compositor,
- bool software_fallback) OVERRIDE;
+ bool software_fallback) override;
virtual scoped_refptr<Reflector> CreateReflector(
Compositor* mirrored_compositor,
- Layer* mirroring_layer) OVERRIDE;
- virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
+ Layer* mirroring_layer) override;
+ virtual void RemoveReflector(scoped_refptr<Reflector> reflector) override;
virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
- OVERRIDE;
- virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
- virtual bool DoesCreateTestContexts() OVERRIDE;
- virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE;
- virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE;
+ override;
+ virtual void RemoveCompositor(Compositor* compositor) override;
+ virtual bool DoesCreateTestContexts() override;
+ virtual cc::SharedBitmapManager* GetSharedBitmapManager() override;
+ virtual cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
+ virtual base::MessageLoopProxy* GetCompositorMessageLoop() override;
+ virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator()
+ override;
private:
scoped_ptr<base::Thread> compositor_thread_;
scoped_refptr<webkit::gpu::ContextProviderInProcess>
shared_main_thread_contexts_;
- scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_;
+ cc::TestSharedBitmapManager shared_bitmap_manager_;
+ cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
+ uint32_t next_surface_id_namespace_;
DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
};
diff --git a/ui/compositor/test/test_compositor_host_mac.mm b/ui/compositor/test/test_compositor_host_mac.mm
index d7b4ab2..da3a8c2 100644
--- a/ui/compositor/test/test_compositor_host_mac.mm
+++ b/ui/compositor/test/test_compositor_host_mac.mm
@@ -88,8 +88,8 @@
private:
// TestCompositorHost:
- virtual void Show() OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
+ virtual void Show() override;
+ virtual ui::Compositor* GetCompositor() override;
gfx::Rect bounds_;
diff --git a/ui/compositor/test/test_compositor_host_ozone.cc b/ui/compositor/test/test_compositor_host_ozone.cc
index de4721e..4871564 100644
--- a/ui/compositor/test/test_compositor_host_ozone.cc
+++ b/ui/compositor/test/test_compositor_host_ozone.cc
@@ -24,8 +24,8 @@
private:
// Overridden from TestCompositorHost:
- virtual void Show() OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
+ virtual void Show() override;
+ virtual ui::Compositor* GetCompositor() override;
void Draw();
diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc
index 4693a03..99a5a85 100644
--- a/ui/compositor/test/test_compositor_host_win.cc
+++ b/ui/compositor/test/test_compositor_host_win.cc
@@ -29,10 +29,10 @@
}
// Overridden from TestCompositorHost:
- virtual void Show() OVERRIDE {
+ virtual void Show() override {
ShowWindow(hwnd(), SW_SHOWNORMAL);
}
- virtual ui::Compositor* GetCompositor() OVERRIDE {
+ virtual ui::Compositor* GetCompositor() override {
return compositor_.get();
}
diff --git a/ui/compositor/test/test_compositor_host_x11.cc b/ui/compositor/test/test_compositor_host_x11.cc
index 43b7429..d881d15 100644
--- a/ui/compositor/test/test_compositor_host_x11.cc
+++ b/ui/compositor/test/test_compositor_host_x11.cc
@@ -27,8 +27,8 @@
private:
// Overridden from TestCompositorHost:
- virtual void Show() OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
+ virtual void Show() override;
+ virtual ui::Compositor* GetCompositor() override;
void Draw();
diff --git a/ui/compositor/test/test_layer_animation_delegate.h b/ui/compositor/test/test_layer_animation_delegate.h
index 0732c99..3ccb108 100644
--- a/ui/compositor/test/test_layer_animation_delegate.h
+++ b/ui/compositor/test/test_layer_animation_delegate.h
@@ -19,27 +19,27 @@
virtual ~TestLayerAnimationDelegate();
// Implementation of LayerAnimationDelegate
- virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE;
+ virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
virtual void SetTransformFromAnimation(
- const gfx::Transform& transform) OVERRIDE;
- virtual void SetOpacityFromAnimation(float opacity) OVERRIDE;
- virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE;
- virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE;
- virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE;
- virtual void SetColorFromAnimation(SkColor color) OVERRIDE;
- virtual void ScheduleDrawForAnimation() OVERRIDE;
- virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE;
- virtual gfx::Transform GetTransformForAnimation() const OVERRIDE;
- virtual float GetOpacityForAnimation() const OVERRIDE;
- virtual bool GetVisibilityForAnimation() const OVERRIDE;
- virtual float GetBrightnessForAnimation() const OVERRIDE;
- virtual float GetGrayscaleForAnimation() const OVERRIDE;
- virtual SkColor GetColorForAnimation() const OVERRIDE;
- virtual float GetDeviceScaleFactor() const OVERRIDE;
+ const gfx::Transform& transform) override;
+ virtual void SetOpacityFromAnimation(float opacity) override;
+ virtual void SetVisibilityFromAnimation(bool visibility) override;
+ virtual void SetBrightnessFromAnimation(float brightness) override;
+ virtual void SetGrayscaleFromAnimation(float grayscale) override;
+ virtual void SetColorFromAnimation(SkColor color) override;
+ virtual void ScheduleDrawForAnimation() override;
+ virtual const gfx::Rect& GetBoundsForAnimation() const override;
+ virtual gfx::Transform GetTransformForAnimation() const override;
+ virtual float GetOpacityForAnimation() const override;
+ virtual bool GetVisibilityForAnimation() const override;
+ virtual float GetBrightnessForAnimation() const override;
+ virtual float GetGrayscaleForAnimation() const override;
+ virtual SkColor GetColorForAnimation() const override;
+ virtual float GetDeviceScaleFactor() const override;
virtual void AddThreadedAnimation(
- scoped_ptr<cc::Animation> animation) OVERRIDE;
- virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE;
- virtual LayerAnimatorCollection* GetLayerAnimatorCollection() OVERRIDE;
+ scoped_ptr<cc::Animation> animation) override;
+ virtual void RemoveThreadedAnimation(int animation_id) override;
+ virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override;
private:
gfx::Rect bounds_;
diff --git a/ui/compositor/test/test_layer_animation_observer.h b/ui/compositor/test/test_layer_animation_observer.h
index 52789f8..bfdcd28 100644
--- a/ui/compositor/test/test_layer_animation_observer.h
+++ b/ui/compositor/test/test_layer_animation_observer.h
@@ -20,15 +20,15 @@
virtual ~TestLayerAnimationObserver();
virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) OVERRIDE;
+ LayerAnimationSequence* sequence) override;
- virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE;
+ virtual bool RequiresNotificationWhenAnimatorDestroyed() const override;
const LayerAnimationSequence* last_ended_sequence() const {
return last_ended_sequence_;
diff --git a/ui/compositor/test/test_suite.h b/ui/compositor/test/test_suite.h
index 2d86fdc..3daf439 100644
--- a/ui/compositor/test/test_suite.h
+++ b/ui/compositor/test/test_suite.h
@@ -24,8 +24,8 @@
protected:
// Overridden from base::TestSuite:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void Shutdown() override;
private:
scoped_ptr<base::MessageLoop> message_loop_;
diff --git a/ui/compositor/transform_animation_curve_adapter.cc b/ui/compositor/transform_animation_curve_adapter.cc
index e875ca0..e0ae5ef 100644
--- a/ui/compositor/transform_animation_curve_adapter.cc
+++ b/ui/compositor/transform_animation_curve_adapter.cc
@@ -71,7 +71,9 @@
target_value_.IsIdentityOrTranslation();
}
-bool TransformAnimationCurveAdapter::MaximumScale(float* max_scale) const {
+bool TransformAnimationCurveAdapter::MaximumTargetScale(
+ bool forward_direction,
+ float* max_scale) const {
return false;
}
@@ -134,7 +136,8 @@
base_curve_.IsTranslation();
}
-bool InverseTransformCurveAdapter::MaximumScale(float* max_scale) const {
+bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction,
+ float* max_scale) const {
return false;
}
diff --git a/ui/compositor/transform_animation_curve_adapter.h b/ui/compositor/transform_animation_curve_adapter.h
index c410ac0..6c63ba1 100644
--- a/ui/compositor/transform_animation_curve_adapter.h
+++ b/ui/compositor/transform_animation_curve_adapter.h
@@ -25,14 +25,15 @@
virtual ~TransformAnimationCurveAdapter();
// TransformAnimationCurve implementation.
- virtual double Duration() const OVERRIDE;
- virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
- virtual gfx::Transform GetValue(double t) const OVERRIDE;
+ virtual double Duration() const override;
+ virtual scoped_ptr<AnimationCurve> Clone() const override;
+ virtual gfx::Transform GetValue(double t) const override;
virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const OVERRIDE;
- virtual bool AffectsScale() const OVERRIDE;
- virtual bool IsTranslation() const OVERRIDE;
- virtual bool MaximumScale(float* max_scale) const OVERRIDE;
+ gfx::BoxF* bounds) const override;
+ virtual bool AffectsScale() const override;
+ virtual bool IsTranslation() const override;
+ virtual bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
private:
gfx::Tween::Type tween_type_;
@@ -54,14 +55,15 @@
virtual ~InverseTransformCurveAdapter();
- virtual double Duration() const OVERRIDE;
- virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
- virtual gfx::Transform GetValue(double t) const OVERRIDE;
+ virtual double Duration() const override;
+ virtual scoped_ptr<AnimationCurve> Clone() const override;
+ virtual gfx::Transform GetValue(double t) const override;
virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const OVERRIDE;
- virtual bool AffectsScale() const OVERRIDE;
- virtual bool IsTranslation() const OVERRIDE;
- virtual bool MaximumScale(float* max_scale) const OVERRIDE;
+ gfx::BoxF* bounds) const override;
+ virtual bool AffectsScale() const override;
+ virtual bool IsTranslation() const override;
+ virtual bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
private:
TransformAnimationCurveAdapter base_curve_;
diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h
index bd0576c..bbc7b53 100644
--- a/ui/display/chromeos/display_configurator.h
+++ b/ui/display/chromeos/display_configurator.h
@@ -186,7 +186,7 @@
bool SetDisplayMode(MultipleDisplayState new_state);
// NativeDisplayDelegate::Observer overrides:
- virtual void OnConfigurationChanged() OVERRIDE;
+ virtual void OnConfigurationChanged() override;
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
diff --git a/ui/display/chromeos/display_configurator_unittest.cc b/ui/display/chromeos/display_configurator_unittest.cc
index 79cfd7b..7ecb145 100644
--- a/ui/display/chromeos/display_configurator_unittest.cc
+++ b/ui/display/chromeos/display_configurator_unittest.cc
@@ -154,24 +154,24 @@
void set_hdcp_state(HDCPState state) { hdcp_state_ = state; }
// DisplayConfigurator::Delegate overrides:
- virtual void Initialize() OVERRIDE { log_->AppendAction(kInitXRandR); }
- virtual void GrabServer() OVERRIDE { log_->AppendAction(kGrab); }
- virtual void UngrabServer() OVERRIDE { log_->AppendAction(kUngrab); }
- virtual void SyncWithServer() OVERRIDE { log_->AppendAction(kSync); }
- virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE {
+ virtual void Initialize() override { log_->AppendAction(kInitXRandR); }
+ virtual void GrabServer() override { log_->AppendAction(kGrab); }
+ virtual void UngrabServer() override { log_->AppendAction(kUngrab); }
+ virtual void SyncWithServer() override { log_->AppendAction(kSync); }
+ virtual void SetBackgroundColor(uint32_t color_argb) override {
log_->AppendAction(GetBackgroundAction(color_argb));
}
- virtual void ForceDPMSOn() OVERRIDE { log_->AppendAction(kForceDPMS); }
- virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE {
+ virtual void ForceDPMSOn() override { log_->AppendAction(kForceDPMS); }
+ virtual std::vector<DisplaySnapshot*> GetDisplays() override {
return outputs_;
}
virtual void AddMode(const DisplaySnapshot& output,
- const DisplayMode* mode) OVERRIDE {
+ const DisplayMode* mode) override {
log_->AppendAction(GetAddOutputModeAction(output, mode));
}
virtual bool Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
- const gfx::Point& origin) OVERRIDE {
+ const gfx::Point& origin) override {
log_->AppendAction(GetCrtcAction(output, mode, origin));
if (max_configurable_pixels_ == 0)
@@ -182,38 +182,38 @@
return mode->size().GetArea() <= max_configurable_pixels_;
}
- virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE {
+ virtual void CreateFrameBuffer(const gfx::Size& size) override {
log_->AppendAction(
GetFramebufferAction(size,
outputs_.size() >= 1 ? outputs_[0] : NULL,
outputs_.size() >= 2 ? outputs_[1] : NULL));
}
virtual bool GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) OVERRIDE {
+ HDCPState* state) override {
*state = hdcp_state_;
return true;
}
virtual bool SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) OVERRIDE {
+ HDCPState state) override {
log_->AppendAction(GetSetHDCPStateAction(output, state));
return true;
}
virtual std::vector<ui::ColorCalibrationProfile>
- GetAvailableColorCalibrationProfiles(const DisplaySnapshot& output) OVERRIDE {
+ GetAvailableColorCalibrationProfiles(const DisplaySnapshot& output) override {
return std::vector<ui::ColorCalibrationProfile>();
}
virtual bool SetColorCalibrationProfile(
const DisplaySnapshot& output,
- ui::ColorCalibrationProfile new_profile) OVERRIDE {
+ ui::ColorCalibrationProfile new_profile) override {
return false;
}
- virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE {}
+ virtual void AddObserver(NativeDisplayObserver* observer) override {}
- virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE {}
+ virtual void RemoveObserver(NativeDisplayObserver* observer) override {}
private:
// Outputs to be returned by GetDisplays().
@@ -262,13 +262,13 @@
// DisplayConfigurator::Observer overrides:
virtual void OnDisplayModeChanged(
- const DisplayConfigurator::DisplayStateList& outputs) OVERRIDE {
+ const DisplayConfigurator::DisplayStateList& outputs) override {
num_changes_++;
latest_outputs_ = outputs;
}
virtual void OnDisplayModeChangeFailed(MultipleDisplayState failed_new_state)
- OVERRIDE {
+ override {
num_failures_++;
latest_failed_state_ = failed_new_state;
}
@@ -296,11 +296,11 @@
// DisplayConfigurator::StateController overrides:
virtual MultipleDisplayState GetStateForDisplayIds(
- const std::vector<int64_t>& outputs) const OVERRIDE {
+ const std::vector<int64_t>& outputs) const override {
return state_;
}
virtual bool GetResolutionForDisplayId(int64_t display_id,
- gfx::Size* size) const OVERRIDE {
+ gfx::Size* size) const override {
return false;
}
@@ -316,11 +316,11 @@
TestMirroringController() : software_mirroring_enabled_(false) {}
virtual ~TestMirroringController() {}
- virtual void SetSoftwareMirroring(bool enabled) OVERRIDE {
+ virtual void SetSoftwareMirroring(bool enabled) override {
software_mirroring_enabled_ = enabled;
}
- virtual bool SoftwareMirroringEnabled() const OVERRIDE {
+ virtual bool SoftwareMirroringEnabled() const override {
return software_mirroring_enabled_;
}
@@ -339,7 +339,7 @@
test_api_(&configurator_) {}
virtual ~DisplayConfiguratorTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
log_.reset(new ActionLogger());
native_display_delegate_ = new TestNativeDisplayDelegate(log_.get());
diff --git a/ui/display/chromeos/test/test_display_snapshot.h b/ui/display/chromeos/test/test_display_snapshot.h
index 3d52f79..95653ca 100644
--- a/ui/display/chromeos/test/test_display_snapshot.h
+++ b/ui/display/chromeos/test/test_display_snapshot.h
@@ -39,7 +39,7 @@
}
// DisplaySnapshot overrides:
- virtual std::string ToString() const OVERRIDE;
+ virtual std::string ToString() const override;
private:
DISALLOW_COPY_AND_ASSIGN(TestDisplaySnapshot);
diff --git a/ui/display/chromeos/x11/display_snapshot_x11.h b/ui/display/chromeos/x11/display_snapshot_x11.h
index 01a44c6..50128b4 100644
--- a/ui/display/chromeos/x11/display_snapshot_x11.h
+++ b/ui/display/chromeos/x11/display_snapshot_x11.h
@@ -38,7 +38,7 @@
int index() const { return index_; }
// DisplaySnapshot overrides:
- virtual std::string ToString() const OVERRIDE;
+ virtual std::string ToString() const override;
private:
RROutput output_;
diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.cc b/ui/display/chromeos/x11/native_display_delegate_x11.cc
index 6959f46..50dc322 100644
--- a/ui/display/chromeos/x11/native_display_delegate_x11.cc
+++ b/ui/display/chromeos/x11/native_display_delegate_x11.cc
@@ -83,14 +83,14 @@
// NativeDisplayDelegateX11::HelperDelegate overrides:
virtual void UpdateXRandRConfiguration(const base::NativeEvent& event)
- OVERRIDE {
+ override {
XRRUpdateConfiguration(event);
}
virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const
- OVERRIDE {
+ override {
return delegate_->cached_outputs_.get();
}
- virtual void NotifyDisplayObservers() OVERRIDE {
+ virtual void NotifyDisplayObservers() override {
FOR_EACH_OBSERVER(
NativeDisplayObserver, delegate_->observers_, OnConfigurationChanged());
}
diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.h b/ui/display/chromeos/x11/native_display_delegate_x11.h
index d349843..4208d38 100644
--- a/ui/display/chromeos/x11/native_display_delegate_x11.h
+++ b/ui/display/chromeos/x11/native_display_delegate_x11.h
@@ -68,31 +68,31 @@
virtual ~NativeDisplayDelegateX11();
// NativeDisplayDelegate overrides:
- virtual void Initialize() OVERRIDE;
- virtual void GrabServer() OVERRIDE;
- virtual void UngrabServer() OVERRIDE;
- virtual void SyncWithServer() OVERRIDE;
- virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE;
- virtual void ForceDPMSOn() OVERRIDE;
- virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void GrabServer() override;
+ virtual void UngrabServer() override;
+ virtual void SyncWithServer() override;
+ virtual void SetBackgroundColor(uint32_t color_argb) override;
+ virtual void ForceDPMSOn() override;
+ virtual std::vector<DisplaySnapshot*> GetDisplays() override;
virtual void AddMode(const DisplaySnapshot& output,
- const DisplayMode* mode) OVERRIDE;
+ const DisplayMode* mode) override;
virtual bool Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
- const gfx::Point& origin) OVERRIDE;
- virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE;
+ const gfx::Point& origin) override;
+ virtual void CreateFrameBuffer(const gfx::Size& size) override;
virtual bool GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) OVERRIDE;
+ HDCPState* state) override;
virtual bool SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) OVERRIDE;
+ HDCPState state) override;
virtual std::vector<ColorCalibrationProfile>
GetAvailableColorCalibrationProfiles(
- const DisplaySnapshot& output) OVERRIDE;
+ const DisplaySnapshot& output) override;
virtual bool SetColorCalibrationProfile(
const DisplaySnapshot& output,
- ColorCalibrationProfile new_profile) OVERRIDE;
- virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
+ ColorCalibrationProfile new_profile) override;
+ virtual void AddObserver(NativeDisplayObserver* observer) override;
+ virtual void RemoveObserver(NativeDisplayObserver* observer) override;
private:
class HelperDelegateX11;
diff --git a/ui/display/chromeos/x11/native_display_event_dispatcher_x11.h b/ui/display/chromeos/x11/native_display_event_dispatcher_x11.h
index e490074..e3ff9c0 100644
--- a/ui/display/chromeos/x11/native_display_event_dispatcher_x11.h
+++ b/ui/display/chromeos/x11/native_display_event_dispatcher_x11.h
@@ -25,8 +25,8 @@
virtual ~NativeDisplayEventDispatcherX11();
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock);
diff --git a/ui/display/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc b/ui/display/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc
index d7cf589..45bca9f 100644
--- a/ui/display/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc
+++ b/ui/display/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc
@@ -58,10 +58,10 @@
// NativeDisplayDelegateX11::HelperDelegate overrides:
virtual void UpdateXRandRConfiguration(const base::NativeEvent& event)
- OVERRIDE;
+ override;
virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const
- OVERRIDE;
- virtual void NotifyDisplayObservers() OVERRIDE;
+ override;
+ virtual void NotifyDisplayObservers() override;
private:
int num_calls_update_xrandr_config_;
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 7277cb3..c697e54 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -16,6 +16,8 @@
component("events_base") {
sources = [
+ "android/scroller.cc",
+ "android/scroller.h",
"device_data_manager.cc",
"device_data_manager.h",
"device_hotplug_event_observer.h",
@@ -23,6 +25,7 @@
"event_switches.cc",
"event_switches.h",
"events_base_export.h",
+ "gesture_curve.h",
"gesture_event_details.cc",
"gesture_event_details.h",
"gestures/fling_curve.cc",
@@ -273,6 +276,7 @@
test("events_unittests") {
sources = [
+ "android/scroller_unittest.cc",
"cocoa/events_mac_unittest.mm",
"event_dispatcher_unittest.cc",
"event_processor_unittest.cc",
diff --git a/ui/events/android/OWNERS b/ui/events/android/OWNERS
new file mode 100644
index 0000000..77debc1
--- /dev/null
+++ b/ui/events/android/OWNERS
@@ -0,0 +1 @@
+jdduke@chromium.org
diff --git a/ui/gfx/android/scroller.cc b/ui/events/android/scroller.cc
similarity index 86%
rename from ui/gfx/android/scroller.cc
rename to ui/events/android/scroller.cc
index b9aea38..17c457b 100644
--- a/ui/gfx/android/scroller.cc
+++ b/ui/events/android/scroller.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/android/scroller.h"
+#include "ui/events/android/scroller.h"
#include <cmath>
#include "base/lazy_instance.h"
-namespace gfx {
+namespace ui {
namespace {
// Default scroll duration from android.widget.Scroller.
@@ -122,9 +122,7 @@
}
private:
- enum {
- NUM_SAMPLES = 100
- };
+ enum { NUM_SAMPLES = 100 };
float spline_position_[NUM_SAMPLES + 1];
float spline_time_[NUM_SAMPLES + 1];
@@ -160,8 +158,8 @@
} // namespace
Scroller::Config::Config()
- : fling_friction(kDefaultFriction),
- flywheel_enabled(false) {}
+ : fling_friction(kDefaultFriction), flywheel_enabled(false) {
+}
Scroller::Scroller(const Config& config)
: mode_(UNDEFINED),
@@ -187,9 +185,27 @@
distance_(0),
fling_friction_(config.fling_friction),
deceleration_(ComputeDeceleration(fling_friction_)),
- tuning_coeff_(ComputeDeceleration(0.84f)) {}
+ tuning_coeff_(ComputeDeceleration(0.84f)) {
+}
-Scroller::~Scroller() {}
+Scroller::~Scroller() {
+}
+
+bool Scroller::ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) {
+ DCHECK(offset);
+ DCHECK(velocity);
+ if (!ComputeScrollOffsetInternal(time)) {
+ *offset = gfx::Vector2dF(GetFinalX(), GetFinalY());
+ *velocity = gfx::Vector2dF();
+ return false;
+ }
+
+ *offset = gfx::Vector2dF(GetCurrX(), GetCurrY());
+ *velocity = gfx::Vector2dF(GetCurrVelocityX(), GetCurrVelocityY());
+ return true;
+}
void Scroller::StartScroll(float start_x,
float start_y,
@@ -210,6 +226,7 @@
float dy,
base::TimeTicks start_time,
base::TimeDelta duration) {
+ DCHECK_GT(duration.ToInternalValue(), 0);
mode_ = SCROLL_MODE;
finished_ = false;
duration_ = duration;
@@ -232,6 +249,8 @@
float min_y,
float max_y,
base::TimeTicks start_time) {
+ DCHECK(velocity_x || velocity_y);
+
// Continue a scroll or fling in progress.
if (flywheel_enabled_ && !finished_) {
float old_velocity_x = GetCurrVelocityX();
@@ -250,6 +269,7 @@
velocity_ = velocity;
duration_ = GetSplineFlingDuration(velocity);
+ DCHECK_GT(duration_.ToInternalValue(), 0);
duration_seconds_reciprocal_ = 1.0 / duration_.InSecondsF();
start_time_ = start_time;
curr_time_ = start_time_;
@@ -276,68 +296,6 @@
RecomputeDeltas();
}
-bool Scroller::ComputeScrollOffset(base::TimeTicks time) {
- if (finished_)
- return false;
-
- if (time == curr_time_)
- return true;
-
- base::TimeDelta time_passed = time - start_time_;
-
- if (time_passed < base::TimeDelta()) {
- time_passed = base::TimeDelta();
- }
-
- if (time_passed >= duration_) {
- curr_x_ = final_x_;
- curr_y_ = final_y_;
- curr_time_ = start_time_ + duration_;
- finished_ = true;
- return true;
- }
-
- curr_time_ = time;
-
- const float t = time_passed.InSecondsF() * duration_seconds_reciprocal_;
-
- switch (mode_) {
- case UNDEFINED:
- NOTREACHED() << "|StartScroll()| or |Fling()| must be called prior to "
- "scroll offset computation.";
- return false;
-
- case SCROLL_MODE: {
- float x = g_viscosity_constants.Get().ApplyViscosity(t);
-
- curr_x_ = start_x_ + x * delta_x_;
- curr_y_ = start_y_ + x * delta_y_;
- } break;
-
- case FLING_MODE: {
- float distance_coef = 1.f;
- float velocity_coef = 0.f;
- g_spline_constants.Get().CalculateCoefficients(
- t, &distance_coef, &velocity_coef);
-
- curr_velocity_ = velocity_coef * distance_ * duration_seconds_reciprocal_;
-
- curr_x_ = start_x_ + distance_coef * delta_x_;
- curr_x_ = Clamped(curr_x_, min_x_, max_x_);
-
- curr_y_ = start_y_ + distance_coef * delta_y_;
- curr_y_ = Clamped(curr_y_, min_y_, max_y_);
-
- float diff_x = std::abs(curr_x_ - final_x_);
- float diff_y = std::abs(curr_y_ - final_y_);
- if (diff_x < kThresholdForFlingEnd && diff_y < kThresholdForFlingEnd)
- finished_ = true;
- } break;
- }
-
- return true;
-}
-
void Scroller::ExtendDuration(base::TimeDelta extend) {
base::TimeDelta passed = GetTimePassed();
duration_ = passed + extend;
@@ -365,19 +323,29 @@
finished_ = true;
}
-void Scroller::ForceFinished(bool finished) { finished_ = finished; }
+void Scroller::ForceFinished(bool finished) {
+ finished_ = finished;
+}
-bool Scroller::IsFinished() const { return finished_; }
+bool Scroller::IsFinished() const {
+ return finished_;
+}
base::TimeDelta Scroller::GetTimePassed() const {
return curr_time_ - start_time_;
}
-base::TimeDelta Scroller::GetDuration() const { return duration_; }
+base::TimeDelta Scroller::GetDuration() const {
+ return duration_;
+}
-float Scroller::GetCurrX() const { return curr_x_; }
+float Scroller::GetCurrX() const {
+ return curr_x_;
+}
-float Scroller::GetCurrY() const { return curr_y_; }
+float Scroller::GetCurrY() const {
+ return curr_y_;
+}
float Scroller::GetCurrVelocity() const {
if (finished_)
@@ -395,19 +363,83 @@
return delta_y_norm_ * GetCurrVelocity();
}
-float Scroller::GetStartX() const { return start_x_; }
+float Scroller::GetStartX() const {
+ return start_x_;
+}
-float Scroller::GetStartY() const { return start_y_; }
+float Scroller::GetStartY() const {
+ return start_y_;
+}
-float Scroller::GetFinalX() const { return final_x_; }
+float Scroller::GetFinalX() const {
+ return final_x_;
+}
-float Scroller::GetFinalY() const { return final_y_; }
+float Scroller::GetFinalY() const {
+ return final_y_;
+}
bool Scroller::IsScrollingInDirection(float xvel, float yvel) const {
return !finished_ && Signum(xvel) == Signum(delta_x_) &&
Signum(yvel) == Signum(delta_y_);
}
+bool Scroller::ComputeScrollOffsetInternal(base::TimeTicks time) {
+ if (finished_)
+ return false;
+
+ if (time <= start_time_)
+ return true;
+
+ if (time == curr_time_)
+ return true;
+
+ base::TimeDelta time_passed = time - start_time_;
+ if (time_passed >= duration_) {
+ AbortAnimation();
+ return false;
+ }
+
+ curr_time_ = time;
+
+ const float u = time_passed.InSecondsF() * duration_seconds_reciprocal_;
+ switch (mode_) {
+ case UNDEFINED:
+ NOTREACHED() << "|StartScroll()| or |Fling()| must be called prior to "
+ "scroll offset computation.";
+ return false;
+
+ case SCROLL_MODE: {
+ float x = g_viscosity_constants.Get().ApplyViscosity(u);
+
+ curr_x_ = start_x_ + x * delta_x_;
+ curr_y_ = start_y_ + x * delta_y_;
+ } break;
+
+ case FLING_MODE: {
+ float distance_coef = 1.f;
+ float velocity_coef = 0.f;
+ g_spline_constants.Get().CalculateCoefficients(
+ u, &distance_coef, &velocity_coef);
+
+ curr_velocity_ = velocity_coef * distance_ * duration_seconds_reciprocal_;
+
+ curr_x_ = start_x_ + distance_coef * delta_x_;
+ curr_x_ = Clamped(curr_x_, min_x_, max_x_);
+
+ curr_y_ = start_y_ + distance_coef * delta_y_;
+ curr_y_ = Clamped(curr_y_, min_y_, max_y_);
+
+ float diff_x = std::abs(curr_x_ - final_x_);
+ float diff_y = std::abs(curr_y_ - final_y_);
+ if (diff_x < kThresholdForFlingEnd && diff_y < kThresholdForFlingEnd)
+ AbortAnimation();
+ } break;
+ }
+
+ return !finished_;
+}
+
void Scroller::RecomputeDeltas() {
delta_x_ = final_x_ - start_x_;
delta_y_ = final_y_ - start_y_;
@@ -441,4 +473,4 @@
std::exp(kDecelerationRate / decel_minus_one * l);
}
-} // namespace gfx
+} // namespace ui
diff --git a/ui/gfx/android/scroller.h b/ui/events/android/scroller.h
similarity index 85%
rename from ui/gfx/android/scroller.h
rename to ui/events/android/scroller.h
index 39d7255..f276a83 100644
--- a/ui/gfx/android/scroller.h
+++ b/ui/events/android/scroller.h
@@ -2,18 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GFX_ANDROID_SCROLLER_H_
-#define UI_GFX_ANDROID_SCROLLER_H_
+#ifndef UI_EVENTS_ANDROID_SCROLLER_H_
+#define UI_EVENTS_ANDROID_SCROLLER_H_
#include "base/time/time.h"
-#include "ui/gfx/gfx_export.h"
+#include "ui/events/events_base_export.h"
+#include "ui/events/gesture_curve.h"
+#include "ui/gfx/geometry/vector2d_f.h"
-namespace gfx {
+namespace ui {
// Native port of android.widget.Scroller.
// * Change-Id: I4365946f890a76fcfa78ca9d69f2a8e0848095a9
// * Please update the Change-Id as upstream Android changes are pulled.
-class GFX_EXPORT Scroller {
+class EVENTS_BASE_EXPORT Scroller : public GestureCurve {
public:
struct Config {
Config();
@@ -26,7 +28,12 @@
};
explicit Scroller(const Config& config);
- ~Scroller();
+ virtual ~Scroller();
+
+ // GestureCurve implementation.
+ virtual bool ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) override;
// Start scrolling by providing a starting point and the distance to travel.
// The default value of 250 milliseconds will be used for the duration.
@@ -57,10 +64,6 @@
float max_y,
base::TimeTicks start_time);
- // Call this when you want to know the new location. If it returns true,
- // the animation is not yet finished.
- bool ComputeScrollOffset(base::TimeTicks time);
-
// Extend the scroll animation by |extend|. This allows a running animation
// to scroll further and longer when used with |SetFinalX()| or |SetFinalY()|.
void ExtendDuration(base::TimeDelta extend);
@@ -102,7 +105,7 @@
FLING_MODE,
};
- void OnDurationChanged();
+ bool ComputeScrollOffsetInternal(base::TimeTicks time);
void RecomputeDeltas();
double GetSplineDeceleration(float velocity) const;
@@ -143,6 +146,6 @@
float tuning_coeff_;
};
-} // namespace gfx
+} // namespace ui
-#endif // UI_GFX_ANDROID_SCROLLER_H_
+#endif // UI_EVENTS_ANDROID_SCROLLER_H_
diff --git a/ui/events/android/scroller_unittest.cc b/ui/events/android/scroller_unittest.cc
new file mode 100644
index 0000000..759984e
--- /dev/null
+++ b/ui/events/android/scroller_unittest.cc
@@ -0,0 +1,176 @@
+// Copyright 2014 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.
+
+#include "base/time/time.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/events/android/scroller.h"
+
+namespace ui {
+namespace {
+
+const float kDefaultStartX = 7.f;
+const float kDefaultStartY = 25.f;
+const float kDefaultDeltaX = -20.f;
+const float kDefaultDeltaY = 73.f;
+const float kDefaultVelocityX = -350.f;
+const float kDefaultVelocityY = 220.f;
+const float kEpsilon = 1e-3f;
+
+Scroller::Config DefaultConfig() {
+ return Scroller::Config();
+}
+
+} // namespace
+
+class ScrollerTest : public testing::Test {};
+
+TEST_F(ScrollerTest, Scroll) {
+ Scroller scroller(DefaultConfig());
+ base::TimeTicks start_time = base::TimeTicks::Now();
+
+ // Start a scroll and verify initialized values.
+ scroller.StartScroll(kDefaultStartX,
+ kDefaultStartY,
+ kDefaultDeltaX,
+ kDefaultDeltaY,
+ start_time);
+
+ EXPECT_EQ(kDefaultStartX, scroller.GetStartX());
+ EXPECT_EQ(kDefaultStartY, scroller.GetStartY());
+ EXPECT_EQ(kDefaultStartX, scroller.GetCurrX());
+ EXPECT_EQ(kDefaultStartY, scroller.GetCurrY());
+ EXPECT_EQ(kDefaultStartX + kDefaultDeltaX, scroller.GetFinalX());
+ EXPECT_EQ(kDefaultStartY + kDefaultDeltaY, scroller.GetFinalY());
+ EXPECT_FALSE(scroller.IsFinished());
+ EXPECT_EQ(base::TimeDelta(), scroller.GetTimePassed());
+
+ // Advance halfway through the scroll.
+ const base::TimeDelta scroll_duration = scroller.GetDuration();
+ gfx::Vector2dF offset, velocity;
+ EXPECT_TRUE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration / 2, &offset, &velocity));
+
+ // Ensure we've moved in the direction of the delta, but have yet to reach
+ // the target.
+ EXPECT_GT(kDefaultStartX, offset.x());
+ EXPECT_LT(kDefaultStartY, offset.y());
+ EXPECT_LT(scroller.GetFinalX(), offset.x());
+ EXPECT_GT(scroller.GetFinalY(), offset.y());
+ EXPECT_FALSE(scroller.IsFinished());
+
+ // Ensure our velocity is non-zero and in the same direction as the delta.
+ EXPECT_GT(0.f, velocity.x() * kDefaultDeltaX);
+ EXPECT_GT(0.f, velocity.y() * kDefaultDeltaY);
+ EXPECT_TRUE(scroller.IsScrollingInDirection(kDefaultDeltaX, kDefaultDeltaY));
+
+ // Repeated offset computations at the same timestamp should yield identical
+ // results.
+ float curr_x = offset.x();
+ float curr_y = offset.y();
+ float curr_velocity_x = velocity.x();
+ float curr_velocity_y = velocity.y();
+ EXPECT_TRUE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration / 2, &offset, &velocity));
+ EXPECT_EQ(curr_x, offset.x());
+ EXPECT_EQ(curr_y, offset.y());
+ EXPECT_EQ(curr_velocity_x, velocity.x());
+ EXPECT_EQ(curr_velocity_y, velocity.y());
+
+ // Advance to the end.
+ EXPECT_FALSE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration, &offset, &velocity));
+ EXPECT_EQ(scroller.GetFinalX(), offset.x());
+ EXPECT_EQ(scroller.GetFinalY(), offset.y());
+ EXPECT_TRUE(scroller.IsFinished());
+ EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
+ EXPECT_NEAR(0.f, velocity.x(), kEpsilon);
+ EXPECT_NEAR(0.f, velocity.y(), kEpsilon);
+
+ // Try to advance further; nothing should change.
+ EXPECT_FALSE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration * 2, &offset, &velocity));
+ EXPECT_EQ(scroller.GetFinalX(), offset.x());
+ EXPECT_EQ(scroller.GetFinalY(), offset.y());
+ EXPECT_TRUE(scroller.IsFinished());
+ EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
+}
+
+TEST_F(ScrollerTest, Fling) {
+ Scroller scroller(DefaultConfig());
+ base::TimeTicks start_time = base::TimeTicks::Now();
+
+ // Start a fling and verify initialized values.
+ scroller.Fling(kDefaultStartX,
+ kDefaultStartY,
+ kDefaultVelocityX,
+ kDefaultVelocityY,
+ INT_MIN,
+ INT_MAX,
+ INT_MIN,
+ INT_MAX,
+ start_time);
+
+ EXPECT_EQ(kDefaultStartX, scroller.GetStartX());
+ EXPECT_EQ(kDefaultStartY, scroller.GetStartY());
+ EXPECT_EQ(kDefaultStartX, scroller.GetCurrX());
+ EXPECT_EQ(kDefaultStartY, scroller.GetCurrY());
+ EXPECT_GT(kDefaultStartX, scroller.GetFinalX());
+ EXPECT_LT(kDefaultStartY, scroller.GetFinalY());
+ EXPECT_FALSE(scroller.IsFinished());
+ EXPECT_EQ(base::TimeDelta(), scroller.GetTimePassed());
+
+ // Advance halfway through the fling.
+ const base::TimeDelta scroll_duration = scroller.GetDuration();
+ gfx::Vector2dF offset, velocity;
+ scroller.ComputeScrollOffset(
+ start_time + scroll_duration / 2, &offset, &velocity);
+
+ // Ensure we've moved in the direction of the velocity, but have yet to reach
+ // the target.
+ EXPECT_GT(kDefaultStartX, offset.x());
+ EXPECT_LT(kDefaultStartY, offset.y());
+ EXPECT_LT(scroller.GetFinalX(), offset.x());
+ EXPECT_GT(scroller.GetFinalY(), offset.y());
+ EXPECT_FALSE(scroller.IsFinished());
+
+ // Ensure our velocity is non-zero and in the same direction as the original
+ // velocity.
+ EXPECT_LT(0.f, velocity.x() * kDefaultVelocityX);
+ EXPECT_LT(0.f, velocity.y() * kDefaultVelocityY);
+ EXPECT_TRUE(
+ scroller.IsScrollingInDirection(kDefaultVelocityX, kDefaultVelocityY));
+
+ // Repeated offset computations at the same timestamp should yield identical
+ // results.
+ float curr_x = offset.x();
+ float curr_y = offset.y();
+ float curr_velocity_x = velocity.x();
+ float curr_velocity_y = velocity.y();
+ EXPECT_TRUE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration / 2, &offset, &velocity));
+ EXPECT_EQ(curr_x, offset.x());
+ EXPECT_EQ(curr_y, offset.y());
+ EXPECT_EQ(curr_velocity_x, velocity.x());
+ EXPECT_EQ(curr_velocity_y, velocity.y());
+
+ // Advance to the end.
+ EXPECT_FALSE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration, &offset, &velocity));
+ EXPECT_EQ(scroller.GetFinalX(), offset.x());
+ EXPECT_EQ(scroller.GetFinalY(), offset.y());
+ EXPECT_TRUE(scroller.IsFinished());
+ EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
+ EXPECT_NEAR(0.f, velocity.x(), kEpsilon);
+ EXPECT_NEAR(0.f, velocity.y(), kEpsilon);
+
+ // Try to advance further; nothing should change.
+ EXPECT_FALSE(scroller.ComputeScrollOffset(
+ start_time + scroll_duration * 2, &offset, &velocity));
+ EXPECT_EQ(scroller.GetFinalX(), offset.x());
+ EXPECT_EQ(scroller.GetFinalY(), offset.y());
+ EXPECT_TRUE(scroller.IsFinished());
+ EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
+}
+
+} // namespace ui
diff --git a/ui/events/device_data_manager.h b/ui/events/device_data_manager.h
index aae8272..54c139b 100644
--- a/ui/events/device_data_manager.h
+++ b/ui/events/device_data_manager.h
@@ -61,7 +61,7 @@
// DeviceHotplugEventObserver:
virtual void OnTouchscreenDevicesUpdated(
- const std::vector<TouchscreenDevice>& devices) OVERRIDE;
+ const std::vector<TouchscreenDevice>& devices) override;
double touch_radius_scale_map_[kMaxDeviceNum];
diff --git a/ui/events/event.h b/ui/events/event.h
index 8f2c79a..e970826 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -470,7 +470,7 @@
// Overridden from LocatedEvent.
virtual void UpdateForRootTransform(
- const gfx::Transform& inverted_root_transform) OVERRIDE;
+ const gfx::Transform& inverted_root_transform) override;
private:
gfx::Vector2d offset_;
@@ -522,7 +522,7 @@
// Overridden from LocatedEvent.
virtual void UpdateForRootTransform(
- const gfx::Transform& inverted_root_transform) OVERRIDE;
+ const gfx::Transform& inverted_root_transform) override;
protected:
void set_radius(float radius_x, float radius_y) {
diff --git a/ui/events/event_dispatcher_unittest.cc b/ui/events/event_dispatcher_unittest.cc
index 248784a..415add7 100644
--- a/ui/events/event_dispatcher_unittest.cc
+++ b/ui/events/event_dispatcher_unittest.cc
@@ -38,19 +38,19 @@
private:
// Overridden from EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE {
+ virtual bool CanAcceptEvent(const ui::Event& event) override {
return true;
}
- virtual EventTarget* GetParentTarget() OVERRIDE {
+ virtual EventTarget* GetParentTarget() override {
return parent_;
}
- virtual scoped_ptr<EventTargetIterator> GetChildIterator() const OVERRIDE {
+ virtual scoped_ptr<EventTargetIterator> GetChildIterator() const override {
return scoped_ptr<EventTargetIterator>();
}
- virtual EventTargeter* GetEventTargeter() OVERRIDE {
+ virtual EventTargeter* GetEventTargeter() override {
return NULL;
}
@@ -94,7 +94,7 @@
private:
// Overridden from EventHandler:
- virtual void OnEvent(Event* event) OVERRIDE {
+ virtual void OnEvent(Event* event) override {
ui::EventHandler::OnEvent(event);
ReceivedEvent(event);
SetStatusOnEvent(event);
@@ -141,7 +141,7 @@
virtual ~EventHandlerDestroyDispatcherDelegate() {}
private:
- virtual void ReceivedEvent(Event* event) OVERRIDE {
+ virtual void ReceivedEvent(Event* event) override {
TestEventHandler::ReceivedEvent(event);
delete dispatcher_delegate_;
}
@@ -158,7 +158,7 @@
virtual ~InvalidateTargetEventHandler() {}
private:
- virtual void ReceivedEvent(Event* event) OVERRIDE {
+ virtual void ReceivedEvent(Event* event) override {
TestEventHandler::ReceivedEvent(event);
TestTarget* target = static_cast<TestTarget*>(event->target());
target->set_valid(false);
@@ -186,7 +186,7 @@
}
private:
- virtual void ReceivedEvent(Event* event) OVERRIDE {
+ virtual void ReceivedEvent(Event* event) override {
TestEventHandler::ReceivedEvent(event);
delete to_destroy_;
to_destroy_ = NULL;
@@ -215,7 +215,7 @@
private:
// Overridden from EventDispatcherDelegate:
- virtual bool CanDispatchToTarget(EventTarget* target) OVERRIDE {
+ virtual bool CanDispatchToTarget(EventTarget* target) override {
TestTarget* test_target = static_cast<TestTarget*>(target);
return test_target->valid();
}
diff --git a/ui/events/event_processor_unittest.cc b/ui/events/event_processor_unittest.cc
index d6720a8..33a8162 100644
--- a/ui/events/event_processor_unittest.cc
+++ b/ui/events/event_processor_unittest.cc
@@ -23,7 +23,7 @@
virtual ~EventProcessorTest() {}
// testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
processor_.SetRoot(scoped_ptr<EventTarget>(new TestEventTarget()));
processor_.Reset();
root()->SetEventTargeter(make_scoped_ptr(new EventTargeter()));
@@ -69,7 +69,7 @@
protected:
virtual bool SubtreeShouldBeExploredForEvent(
- EventTarget* target, const LocatedEvent& event) OVERRIDE {
+ EventTarget* target, const LocatedEvent& event) override {
T* t = static_cast<T*>(target);
return (t->bounds().Contains(event.location()));
}
@@ -107,7 +107,7 @@
private:
// EventTarget:
virtual void ConvertEventToTarget(EventTarget* target,
- LocatedEvent* event) OVERRIDE {
+ LocatedEvent* event) override {
event->ConvertLocationToTarget(this,
static_cast<BoundsTestTarget*>(target));
}
@@ -185,7 +185,7 @@
virtual ~ReDispatchEventHandler() {}
// TestEventHandler:
- virtual void OnMouseEvent(MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(MouseEvent* event) override {
TestEventHandler::OnMouseEvent(event);
EXPECT_EQ(expected_target_, event->target());
@@ -327,7 +327,7 @@
private:
// EventTargeter:
virtual bool SubtreeShouldBeExploredForEvent(
- EventTarget* target, const LocatedEvent& event) OVERRIDE {
+ EventTarget* target, const LocatedEvent& event) override {
return false;
}
};
@@ -369,12 +369,12 @@
private:
// EventTargeter:
virtual EventTarget* FindTargetForEvent(EventTarget* root,
- Event* event) OVERRIDE {
+ Event* event) override {
return initial_target_;
}
virtual EventTarget* FindNextBestTarget(EventTarget* previous_target,
- Event* event) OVERRIDE {
+ Event* event) override {
return previous_target->GetParentTarget();
}
diff --git a/ui/events/event_rewriter_unittest.cc b/ui/events/event_rewriter_unittest.cc
index 11a05c9..08e592f 100644
--- a/ui/events/event_rewriter_unittest.cc
+++ b/ui/events/event_rewriter_unittest.cc
@@ -45,7 +45,7 @@
void CheckAllReceived() { EXPECT_TRUE(expected_events_.empty()); }
// EventProcessor:
- virtual EventDispatchDetails OnEventFromSource(Event* event) OVERRIDE {
+ virtual EventDispatchDetails OnEventFromSource(Event* event) override {
EXPECT_FALSE(expected_events_.empty());
EXPECT_EQ(expected_events_.front(), event->type());
expected_events_.pop_front();
@@ -62,7 +62,7 @@
public:
explicit TestEventRewriteSource(EventProcessor* processor)
: processor_(processor) {}
- virtual EventProcessor* GetEventProcessor() OVERRIDE { return processor_; }
+ virtual EventProcessor* GetEventProcessor() override { return processor_; }
void Send(EventType type) {
scoped_ptr<Event> event(new TestEvent(type));
(void)SendEventToProcessor(event.get());
@@ -85,14 +85,14 @@
virtual EventRewriteStatus RewriteEvent(const Event& event,
scoped_ptr<Event>* rewritten_event)
- OVERRIDE {
+ override {
if (status_ == EVENT_REWRITE_REWRITTEN)
rewritten_event->reset(new TestEvent(type_));
return status_;
}
virtual EventRewriteStatus NextDispatchEvent(const Event& last_event,
scoped_ptr<Event>* new_event)
- OVERRIDE {
+ override {
NOTREACHED();
return status_;
}
@@ -115,7 +115,7 @@
}
virtual EventRewriteStatus RewriteEvent(const Event& event,
scoped_ptr<Event>* rewritten_event)
- OVERRIDE {
+ override {
RewriteRules::iterator find =
rules_.find(RewriteCase(state_, event.type()));
if (find == rules_.end())
@@ -132,7 +132,7 @@
}
virtual EventRewriteStatus NextDispatchEvent(const Event& last_event,
scoped_ptr<Event>* new_event)
- OVERRIDE {
+ override {
EXPECT_TRUE(last_rewritten_event_);
const TestEvent* arg_last = static_cast<const TestEvent*>(&last_event);
EXPECT_EQ(last_rewritten_event_->unique_id(), arg_last->unique_id());
diff --git a/ui/events/event_target.h b/ui/events/event_target.h
index 3ffec55..cf8ff8a 100644
--- a/ui/events/event_target.h
+++ b/ui/events/event_target.h
@@ -85,12 +85,12 @@
EventHandler* target_handler() { return target_handler_; }
// Overridden from EventHandler:
- virtual void OnEvent(Event* event) OVERRIDE;
- virtual void OnKeyEvent(KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(GestureEvent* event) OVERRIDE;
+ virtual void OnEvent(Event* event) override;
+ virtual void OnKeyEvent(KeyEvent* event) override;
+ virtual void OnMouseEvent(MouseEvent* event) override;
+ virtual void OnScrollEvent(ScrollEvent* event) override;
+ virtual void OnTouchEvent(TouchEvent* event) override;
+ virtual void OnGestureEvent(GestureEvent* event) override;
private:
friend class EventDispatcher;
diff --git a/ui/events/event_target_iterator.h b/ui/events/event_target_iterator.h
index 3083c83..28b4a30 100644
--- a/ui/events/event_target_iterator.h
+++ b/ui/events/event_target_iterator.h
@@ -30,7 +30,7 @@
}
virtual ~EventTargetIteratorImpl() {}
- virtual EventTarget* GetNextTarget() OVERRIDE {
+ virtual EventTarget* GetNextTarget() override {
if (begin_ == end_)
return NULL;
EventTarget* target = *(begin_);
diff --git a/ui/events/event_targeter.cc b/ui/events/event_targeter.cc
index 3cdc83e..5d43b29 100644
--- a/ui/events/event_targeter.cc
+++ b/ui/events/event_targeter.cc
@@ -39,9 +39,8 @@
continue;
target->ConvertEventToTarget(child, event);
target = child;
- EventTarget* child_target = targeter ?
- targeter->FindTargetForLocatedEvent(child, event) :
- FindTargetForLocatedEvent(child, event);
+ EventTarget* child_target =
+ targeter->FindTargetForLocatedEvent(child, event);
if (child_target)
return child_target;
}
diff --git a/ui/events/events.gyp b/ui/events/events.gyp
index 40ccca6..8af08c5 100644
--- a/ui/events/events.gyp
+++ b/ui/events/events.gyp
@@ -38,6 +38,8 @@
],
'sources': [
# Note: sources list duplicated in GN build.
+ 'android/scroller.cc',
+ 'android/scroller.h',
'device_data_manager.cc',
'device_data_manager.h',
'device_hotplug_event_observer.h',
@@ -45,6 +47,7 @@
'event_switches.cc',
'event_switches.h',
'events_base_export.h',
+ 'gesture_curve.h',
'gesture_event_details.cc',
'gesture_event_details.h',
'gestures/fling_curve.cc',
@@ -307,6 +310,7 @@
],
'sources': [
# Note: sources list duplicated in GN build.
+ 'android/scroller_unittest.cc',
'cocoa/events_mac_unittest.mm',
'event_dispatcher_unittest.cc',
'event_processor_unittest.cc',
diff --git a/ui/events/gesture_curve.h b/ui/events/gesture_curve.h
new file mode 100644
index 0000000..7300e32
--- /dev/null
+++ b/ui/events/gesture_curve.h
@@ -0,0 +1,31 @@
+// Copyright 2014 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 UI_EVENTS_GESTURE_CURVE_H_
+#define UI_EVENTS_GESTURE_CURVE_H_
+
+#include "base/time/time.h"
+#include "ui/gfx/geometry/vector2d_f.h"
+
+namespace ui {
+
+// An abstraction of curve-based gesture motion, allowing platform-specific
+// motion tailoring.
+class EVENTS_BASE_EXPORT GestureCurve {
+ public:
+ virtual ~GestureCurve() {}
+
+ // The output |offset| represents the total movement of the curve from its
+ // start until |time|.
+ // The output |velocity| represents the instantenous velocity at |time|.
+ // Returns false if |time| exceeds the fling duration, in which case
+ // the terminal offset will be reported.
+ virtual bool ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) = 0;
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_GESTURE_CURVE_H_
diff --git a/ui/events/gesture_detection/filtered_gesture_provider.h b/ui/events/gesture_detection/filtered_gesture_provider.h
index 4d63be6..a2ac7fc 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider.h
+++ b/ui/events/gesture_detection/filtered_gesture_provider.h
@@ -40,10 +40,10 @@
private:
// GestureProviderClient implementation.
- virtual void OnGestureEvent(const ui::GestureEventData& event) OVERRIDE;
+ virtual void OnGestureEvent(const ui::GestureEventData& event) override;
// TouchDispositionGestureFilterClient implementation.
- virtual void ForwardGestureEvent(const ui::GestureEventData& event) OVERRIDE;
+ virtual void ForwardGestureEvent(const ui::GestureEventData& event) override;
GestureProviderClient* const client_;
diff --git a/ui/events/gesture_detection/gesture_config_helper_aura.cc b/ui/events/gesture_detection/gesture_config_helper_aura.cc
index 94469c5..a536bbc 100644
--- a/ui/events/gesture_detection/gesture_config_helper_aura.cc
+++ b/ui/events/gesture_detection/gesture_config_helper_aura.cc
@@ -18,11 +18,11 @@
GestureDetector::Config config;
config.longpress_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::long_press_time_in_seconds() * 1000.);
+ GestureConfiguration::long_press_time_in_ms());
config.showpress_timeout = base::TimeDelta::FromMilliseconds(
GestureConfiguration::show_press_delay_in_ms());
config.double_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::semi_long_press_time_in_seconds() * 1000.);
+ GestureConfiguration::semi_long_press_time_in_ms());
config.touch_slop =
GestureConfiguration::max_touch_move_in_pixels_for_click();
config.double_tap_slop =
@@ -38,25 +38,21 @@
config.two_finger_tap_max_separation =
GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
config.two_finger_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::max_touch_down_duration_in_seconds_for_click() *
- 1000.);
+ GestureConfiguration::max_touch_down_duration_for_click_in_ms());
return config;
}
ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
ScaleGestureDetector::Config config;
- double min_pinch_update_distance =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCompensateForUnstablePinchZoom)
- ? GestureConfiguration::min_pinch_update_distance_in_pixels()
- : 0;
-
config.span_slop =
GestureConfiguration::max_touch_move_in_pixels_for_click() * 2;
config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels();
- config.min_pinch_update_span_delta = min_pinch_update_distance;
+ config.min_pinch_update_span_delta =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kCompensateForUnstablePinchZoom) ?
+ GestureConfiguration::min_pinch_update_distance_in_pixels() : 0;
return config;
}
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index 51d119b..6925c6c 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -195,21 +195,21 @@
// ScaleGestureListener implementation.
virtual bool OnScaleBegin(const ScaleGestureDetector& detector,
- const MotionEvent& e) OVERRIDE {
+ const MotionEvent& e) override {
if (ignore_multitouch_zoom_events_ && !detector.InDoubleTapMode())
return false;
return true;
}
virtual void OnScaleEnd(const ScaleGestureDetector& detector,
- const MotionEvent& e) OVERRIDE {
+ const MotionEvent& e) override {
if (!pinch_event_sent_)
return;
Send(CreateGesture(ET_GESTURE_PINCH_END, e));
}
virtual bool OnScale(const ScaleGestureDetector& detector,
- const MotionEvent& e) OVERRIDE {
+ const MotionEvent& e) override {
if (ignore_multitouch_zoom_events_ && !detector.InDoubleTapMode())
return false;
if (!pinch_event_sent_) {
@@ -264,7 +264,7 @@
}
// GestureListener implementation.
- virtual bool OnDown(const MotionEvent& e) OVERRIDE {
+ virtual bool OnDown(const MotionEvent& e) override {
GestureEventDetails tap_details(ET_GESTURE_TAP_DOWN);
Send(CreateGesture(tap_details, e));
@@ -275,7 +275,7 @@
virtual bool OnScroll(const MotionEvent& e1,
const MotionEvent& e2,
float raw_distance_x,
- float raw_distance_y) OVERRIDE {
+ float raw_distance_y) override {
float distance_x = raw_distance_x;
float distance_y = raw_distance_y;
if (!scroll_event_sent_) {
@@ -348,7 +348,7 @@
virtual bool OnFling(const MotionEvent& e1,
const MotionEvent& e2,
float velocity_x,
- float velocity_y) OVERRIDE {
+ float velocity_y) override {
if (snap_scroll_controller_.IsSnappingScrolls()) {
if (snap_scroll_controller_.IsSnapHorizontal()) {
velocity_y = 0;
@@ -378,14 +378,14 @@
virtual bool OnSwipe(const MotionEvent& e1,
const MotionEvent& e2,
float velocity_x,
- float velocity_y) OVERRIDE {
+ float velocity_y) override {
GestureEventDetails swipe_details(ET_GESTURE_SWIPE, velocity_x, velocity_y);
Send(CreateGesture(swipe_details, e2));
return true;
}
virtual bool OnTwoFingerTap(const MotionEvent& e1,
- const MotionEvent& e2) OVERRIDE {
+ const MotionEvent& e2) override {
// The location of the two finger tap event should be the location of the
// primary pointer.
GestureEventDetails two_finger_tap_details(
@@ -404,13 +404,13 @@
return true;
}
- virtual void OnShowPress(const MotionEvent& e) OVERRIDE {
+ virtual void OnShowPress(const MotionEvent& e) override {
GestureEventDetails show_press_details(ET_GESTURE_SHOW_PRESS);
show_press_event_sent_ = true;
Send(CreateGesture(show_press_details, e));
}
- virtual bool OnSingleTapUp(const MotionEvent& e) OVERRIDE {
+ virtual bool OnSingleTapUp(const MotionEvent& e) override {
// This is a hack to address the issue where user hovers
// over a link for longer than double_tap_timeout_, then
// OnSingleTapConfirmed() is not triggered. But we still
@@ -444,7 +444,7 @@
}
// DoubleTapListener implementation.
- virtual bool OnSingleTapConfirmed(const MotionEvent& e) OVERRIDE {
+ virtual bool OnSingleTapConfirmed(const MotionEvent& e) override {
// Long taps in the edges of the screen have their events delayed by
// ContentViewHolder for tab swipe operations. As a consequence of the delay
// this method might be called after receiving the up event.
@@ -458,11 +458,11 @@
return true;
}
- virtual bool OnDoubleTap(const MotionEvent& e) OVERRIDE {
+ virtual bool OnDoubleTap(const MotionEvent& e) override {
return scale_gesture_detector_.OnDoubleTap(e);
}
- virtual bool OnDoubleTapEvent(const MotionEvent& e) OVERRIDE {
+ virtual bool OnDoubleTapEvent(const MotionEvent& e) override {
switch (e.GetAction()) {
case MotionEvent::ACTION_DOWN:
gesture_detector_.set_longpress_enabled(false);
@@ -481,7 +481,7 @@
return false;
}
- virtual void OnLongPress(const MotionEvent& e) OVERRIDE {
+ virtual void OnLongPress(const MotionEvent& e) override {
DCHECK(!IsDoubleTapInProgress());
SetIgnoreSingleTap(true);
GestureEventDetails long_press_details(ET_GESTURE_LONG_PRESS);
diff --git a/ui/events/gesture_detection/gesture_provider_unittest.cc b/ui/events/gesture_detection/gesture_provider_unittest.cc
index a25a0b5..da305ff 100644
--- a/ui/events/gesture_detection/gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/gesture_provider_unittest.cc
@@ -123,15 +123,15 @@
}
// Test
- virtual void SetUp() OVERRIDE { SetUpWithConfig(GetDefaultConfig()); }
+ virtual void SetUp() override { SetUpWithConfig(GetDefaultConfig()); }
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
gestures_.clear();
gesture_provider_.reset();
}
// GestureProviderClient
- virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE {
+ virtual void OnGestureEvent(const GestureEventData& gesture) override {
if (gesture.type() == ET_GESTURE_SCROLL_BEGIN)
active_scroll_begin_event_.reset(new GestureEventData(gesture));
gestures_.push_back(gesture);
diff --git a/ui/events/gesture_detection/motion_event.h b/ui/events/gesture_detection/motion_event.h
index bb17ef1..2277277 100644
--- a/ui/events/gesture_detection/motion_event.h
+++ b/ui/events/gesture_detection/motion_event.h
@@ -42,7 +42,7 @@
// The implementer promises that |GetPointerId()| will never exceed
// MAX_POINTER_ID.
- enum { MAX_POINTER_ID = 31, MAX_TOUCH_POINT_COUNT = 12 };
+ enum { MAX_POINTER_ID = 31, MAX_TOUCH_POINT_COUNT = 16 };
virtual ~MotionEvent() {}
diff --git a/ui/events/gesture_detection/motion_event_buffer.cc b/ui/events/gesture_detection/motion_event_buffer.cc
index e8e0eb1..11d2df7 100644
--- a/ui/events/gesture_detection/motion_event_buffer.cc
+++ b/ui/events/gesture_detection/motion_event_buffer.cc
@@ -175,96 +175,96 @@
}
virtual ~CompoundMotionEvent() {}
- virtual int GetId() const OVERRIDE { return latest().GetId(); }
+ virtual int GetId() const override { return latest().GetId(); }
- virtual Action GetAction() const OVERRIDE { return latest().GetAction(); }
+ virtual Action GetAction() const override { return latest().GetAction(); }
- virtual int GetActionIndex() const OVERRIDE {
+ virtual int GetActionIndex() const override {
return latest().GetActionIndex();
}
- virtual size_t GetPointerCount() const OVERRIDE {
+ virtual size_t GetPointerCount() const override {
return latest().GetPointerCount();
}
- virtual int GetPointerId(size_t pointer_index) const OVERRIDE {
+ virtual int GetPointerId(size_t pointer_index) const override {
return latest().GetPointerId(pointer_index);
}
- virtual float GetX(size_t pointer_index) const OVERRIDE {
+ virtual float GetX(size_t pointer_index) const override {
return latest().GetX(pointer_index);
}
- virtual float GetY(size_t pointer_index) const OVERRIDE {
+ virtual float GetY(size_t pointer_index) const override {
return latest().GetY(pointer_index);
}
- virtual float GetRawX(size_t pointer_index) const OVERRIDE {
+ virtual float GetRawX(size_t pointer_index) const override {
return latest().GetRawX(pointer_index);
}
- virtual float GetRawY(size_t pointer_index) const OVERRIDE {
+ virtual float GetRawY(size_t pointer_index) const override {
return latest().GetRawY(pointer_index);
}
- virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE {
+ virtual float GetTouchMajor(size_t pointer_index) const override {
return latest().GetTouchMajor(pointer_index);
}
- virtual float GetTouchMinor(size_t pointer_index) const OVERRIDE {
+ virtual float GetTouchMinor(size_t pointer_index) const override {
return latest().GetTouchMinor(pointer_index);
}
- virtual float GetOrientation(size_t pointer_index) const OVERRIDE {
+ virtual float GetOrientation(size_t pointer_index) const override {
return latest().GetOrientation(pointer_index);
}
- virtual float GetPressure(size_t pointer_index) const OVERRIDE {
+ virtual float GetPressure(size_t pointer_index) const override {
return latest().GetPressure(pointer_index);
}
- virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE {
+ virtual ToolType GetToolType(size_t pointer_index) const override {
return latest().GetToolType(pointer_index);
}
- virtual int GetButtonState() const OVERRIDE {
+ virtual int GetButtonState() const override {
return latest().GetButtonState();
}
- virtual int GetFlags() const OVERRIDE { return latest().GetFlags(); }
+ virtual int GetFlags() const override { return latest().GetFlags(); }
- virtual base::TimeTicks GetEventTime() const OVERRIDE {
+ virtual base::TimeTicks GetEventTime() const override {
return latest().GetEventTime();
}
- virtual size_t GetHistorySize() const OVERRIDE { return events_.size() - 1; }
+ virtual size_t GetHistorySize() const override { return events_.size() - 1; }
virtual base::TimeTicks GetHistoricalEventTime(
- size_t historical_index) const OVERRIDE {
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetEventTime();
}
virtual float GetHistoricalTouchMajor(
size_t pointer_index,
- size_t historical_index) const OVERRIDE {
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetTouchMajor();
}
virtual float GetHistoricalX(size_t pointer_index,
- size_t historical_index) const OVERRIDE {
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetX(pointer_index);
}
virtual float GetHistoricalY(size_t pointer_index,
- size_t historical_index) const OVERRIDE {
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetY(pointer_index);
}
- virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE {
+ virtual scoped_ptr<MotionEvent> Clone() const override {
MotionEventVector cloned_events;
cloned_events.reserve(events_.size());
for (size_t i = 0; i < events_.size(); ++i)
@@ -273,7 +273,7 @@
new CompoundMotionEvent(cloned_events.Pass()));
}
- virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE {
+ virtual scoped_ptr<MotionEvent> Cancel() const override {
return latest().Cancel();
}
diff --git a/ui/events/gesture_detection/motion_event_buffer_unittest.cc b/ui/events/gesture_detection/motion_event_buffer_unittest.cc
index f51897f..badbd98 100644
--- a/ui/events/gesture_detection/motion_event_buffer_unittest.cc
+++ b/ui/events/gesture_detection/motion_event_buffer_unittest.cc
@@ -44,11 +44,11 @@
virtual ~MotionEventBufferTest() {}
// MotionEventBufferClient implementation.
- virtual void ForwardMotionEvent(const MotionEvent& event) OVERRIDE {
+ virtual void ForwardMotionEvent(const MotionEvent& event) override {
forwarded_events_.push_back(event.Clone().release());
}
- virtual void SetNeedsFlush() OVERRIDE { needs_flush_ = true; }
+ virtual void SetNeedsFlush() override { needs_flush_ = true; }
bool GetAndResetNeedsFlush() {
bool needs_flush = needs_flush_;
diff --git a/ui/events/gesture_detection/motion_event_generic.h b/ui/events/gesture_detection/motion_event_generic.h
index 2750cb2..41911c1 100644
--- a/ui/events/gesture_detection/motion_event_generic.h
+++ b/ui/events/gesture_detection/motion_event_generic.h
@@ -39,25 +39,25 @@
virtual ~MotionEventGeneric();
// MotionEvent implementation.
- virtual int GetId() const OVERRIDE;
- virtual Action GetAction() const OVERRIDE;
- virtual int GetActionIndex() const OVERRIDE;
- virtual size_t GetPointerCount() const OVERRIDE;
- virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
- virtual float GetX(size_t pointer_index) const OVERRIDE;
- virtual float GetY(size_t pointer_index) const OVERRIDE;
- virtual float GetRawX(size_t pointer_index) const OVERRIDE;
- virtual float GetRawY(size_t pointer_index) const OVERRIDE;
- virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
- virtual float GetTouchMinor(size_t pointer_index) const OVERRIDE;
- virtual float GetOrientation(size_t pointer_index) const OVERRIDE;
- virtual float GetPressure(size_t pointer_index) const OVERRIDE;
- virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE;
- virtual int GetButtonState() const OVERRIDE;
- virtual int GetFlags() const OVERRIDE;
- virtual base::TimeTicks GetEventTime() const OVERRIDE;
- virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
- virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
+ virtual int GetId() const override;
+ virtual Action GetAction() const override;
+ virtual int GetActionIndex() const override;
+ virtual size_t GetPointerCount() const override;
+ virtual int GetPointerId(size_t pointer_index) const override;
+ virtual float GetX(size_t pointer_index) const override;
+ virtual float GetY(size_t pointer_index) const override;
+ virtual float GetRawX(size_t pointer_index) const override;
+ virtual float GetRawY(size_t pointer_index) const override;
+ virtual float GetTouchMajor(size_t pointer_index) const override;
+ virtual float GetTouchMinor(size_t pointer_index) const override;
+ virtual float GetOrientation(size_t pointer_index) const override;
+ virtual float GetPressure(size_t pointer_index) const override;
+ virtual ToolType GetToolType(size_t pointer_index) const override;
+ virtual int GetButtonState() const override;
+ virtual int GetFlags() const override;
+ virtual base::TimeTicks GetEventTime() const override;
+ virtual scoped_ptr<MotionEvent> Clone() const override;
+ virtual scoped_ptr<MotionEvent> Cancel() const override;
void PushPointer(const PointerProperties& pointer);
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc b/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
index 7e99c94..d8a2551 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
@@ -26,17 +26,17 @@
virtual ~TouchDispositionGestureFilterTest() {}
// testing::Test
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
queue_.reset(new TouchDispositionGestureFilter(this));
touch_event_.set_flags(kDefaultEventFlags);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
queue_.reset();
}
// TouchDispositionGestureFilterClient
- virtual void ForwardGestureEvent(const GestureEventData& event) OVERRIDE {
+ virtual void ForwardGestureEvent(const GestureEventData& event) override {
++sent_gesture_count_;
last_sent_gesture_.reset(new GestureEventData(event));
sent_gestures_.push_back(event.type());
diff --git a/ui/events/gesture_detection/velocity_tracker.cc b/ui/events/gesture_detection/velocity_tracker.cc
index 16454e8..a3fd83e 100644
--- a/ui/events/gesture_detection/velocity_tracker.cc
+++ b/ui/events/gesture_detection/velocity_tracker.cc
@@ -121,13 +121,13 @@
Weighting weighting = WEIGHTING_NONE);
virtual ~LeastSquaresVelocityTrackerStrategy();
- virtual void Clear() OVERRIDE;
- virtual void ClearPointers(BitSet32 id_bits) OVERRIDE;
+ virtual void Clear() override;
+ virtual void ClearPointers(BitSet32 id_bits) override;
virtual void AddMovement(const TimeTicks& event_time,
BitSet32 id_bits,
- const Position* positions) OVERRIDE;
+ const Position* positions) override;
virtual bool GetEstimator(uint32_t id,
- Estimator* out_estimator) const OVERRIDE;
+ Estimator* out_estimator) const override;
private:
// Sample horizon.
@@ -160,13 +160,13 @@
explicit IntegratingVelocityTrackerStrategy(uint32_t degree);
virtual ~IntegratingVelocityTrackerStrategy();
- virtual void Clear() OVERRIDE;
- virtual void ClearPointers(BitSet32 id_bits) OVERRIDE;
+ virtual void Clear() override;
+ virtual void ClearPointers(BitSet32 id_bits) override;
virtual void AddMovement(const TimeTicks& event_time,
BitSet32 id_bits,
- const Position* positions) OVERRIDE;
+ const Position* positions) override;
virtual bool GetEstimator(uint32_t id,
- Estimator* out_estimator) const OVERRIDE;
+ Estimator* out_estimator) const override;
private:
// Current state estimate for a particular pointer.
diff --git a/ui/events/gestures/fling_curve.cc b/ui/events/gestures/fling_curve.cc
index 6f63019..00d29a4 100644
--- a/ui/events/gestures/fling_curve.cc
+++ b/ui/events/gestures/fling_curve.cc
@@ -38,8 +38,10 @@
base::TimeTicks start_timestamp)
: curve_duration_(GetTimeAtVelocity(0)),
start_timestamp_(start_timestamp),
+ previous_timestamp_(start_timestamp_),
time_offset_(0),
position_offset_(0) {
+ DCHECK(!velocity.IsZero());
float max_start_velocity = std::max(fabs(velocity.x()), fabs(velocity.y()));
if (max_start_velocity > GetVelocityAtTime(0))
max_start_velocity = GetVelocityAtTime(0);
@@ -49,32 +51,57 @@
velocity.y() / max_start_velocity);
time_offset_ = GetTimeAtVelocity(max_start_velocity);
position_offset_ = GetPositionAtTime(time_offset_);
- last_timestamp_ = start_timestamp_ + base::TimeDelta::FromSecondsD(
- curve_duration_ - time_offset_);
}
FlingCurve::~FlingCurve() {
}
-gfx::Vector2dF FlingCurve::GetScrollAmountAtTime(base::TimeTicks current) {
- if (current < start_timestamp_)
- return gfx::Vector2dF();
-
- float displacement = 0;
- if (current < last_timestamp_) {
- float time = time_offset_ + (current - start_timestamp_).InSecondsF();
- CHECK_LT(time, curve_duration_);
- displacement = GetPositionAtTime(time) - position_offset_;
- } else {
- displacement = GetPositionAtTime(curve_duration_) - position_offset_;
+bool FlingCurve::ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) {
+ DCHECK(offset);
+ DCHECK(velocity);
+ base::TimeDelta elapsed_time = time - start_timestamp_;
+ if (elapsed_time < base::TimeDelta()) {
+ *offset = gfx::Vector2dF();
+ *velocity = gfx::Vector2dF();
+ return true;
}
- gfx::Vector2dF scroll(displacement * displacement_ratio_.x(),
- displacement * displacement_ratio_.y());
- gfx::Vector2dF scroll_increment(scroll.x() - cumulative_scroll_.x(),
- scroll.y() - cumulative_scroll_.y());
- cumulative_scroll_ = scroll;
- return scroll_increment;
+ bool still_active = true;
+ float scalar_offset;
+ float scalar_velocity;
+ double offset_time = elapsed_time.InSecondsF() + time_offset_;
+ if (offset_time < curve_duration_) {
+ scalar_offset = GetPositionAtTime(offset_time) - position_offset_;
+ scalar_velocity = GetVelocityAtTime(offset_time);
+ } else {
+ scalar_offset = GetPositionAtTime(curve_duration_) - position_offset_;
+ scalar_velocity = 0;
+ still_active = false;
+ }
+
+ *offset = gfx::ScaleVector2d(displacement_ratio_, scalar_offset);
+ *velocity = gfx::ScaleVector2d(displacement_ratio_, scalar_velocity);
+ return still_active;
+}
+
+bool FlingCurve::ComputeScrollDeltaAtTime(base::TimeTicks current,
+ gfx::Vector2dF* delta) {
+ DCHECK(delta);
+ if (current <= previous_timestamp_) {
+ *delta = gfx::Vector2dF();
+ return true;
+ }
+
+ previous_timestamp_ = current;
+
+ gfx::Vector2dF offset, velocity;
+ bool still_active = ComputeScrollOffset(current, &offset, &velocity);
+
+ *delta = offset - cumulative_scroll_;
+ cumulative_scroll_ = offset;
+ return still_active;
}
} // namespace ui
diff --git a/ui/events/gestures/fling_curve.h b/ui/events/gestures/fling_curve.h
index 583e172..bebf6ab 100644
--- a/ui/events/gestures/fling_curve.h
+++ b/ui/events/gestures/fling_curve.h
@@ -7,6 +7,7 @@
#include "base/time/time.h"
#include "ui/events/events_base_export.h"
+#include "ui/events/gesture_curve.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/vector2d_f.h"
@@ -14,13 +15,21 @@
// FlingCurve can be used to scroll a UI element suitable for touch screen-based
// flings.
-class EVENTS_BASE_EXPORT FlingCurve {
+class EVENTS_BASE_EXPORT FlingCurve : public GestureCurve {
public:
FlingCurve(const gfx::Vector2dF& velocity, base::TimeTicks start_timestamp);
- ~FlingCurve();
+ virtual ~FlingCurve();
- gfx::Vector2dF GetScrollAmountAtTime(base::TimeTicks current_timestamp);
- base::TimeTicks start_timestamp() const { return start_timestamp_; }
+ // GestureCurve implementation.
+ virtual bool ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) override;
+
+ // In contrast to |ComputeScrollOffset()|, this method is stateful and
+ // returns the *change* in scroll offset between successive calls.
+ // Returns true as long as the curve is still active and requires additional
+ // animation ticks.
+ bool ComputeScrollDeltaAtTime(base::TimeTicks current, gfx::Vector2dF* delta);
private:
const float curve_duration_;
@@ -28,7 +37,7 @@
gfx::Vector2dF displacement_ratio_;
gfx::Vector2dF cumulative_scroll_;
- base::TimeTicks last_timestamp_;
+ base::TimeTicks previous_timestamp_;
float time_offset_;
float position_offset_;
diff --git a/ui/events/gestures/fling_curve_unittest.cc b/ui/events/gestures/fling_curve_unittest.cc
index 653a5ef..d6dffef 100644
--- a/ui/events/gestures/fling_curve_unittest.cc
+++ b/ui/events/gestures/fling_curve_unittest.cc
@@ -14,23 +14,25 @@
base::TimeTicks now = gfx::FrameTime::Now();
FlingCurve curve(velocity, now);
- gfx::Vector2dF scroll =
- curve.GetScrollAmountAtTime(now + base::TimeDelta::FromMilliseconds(20));
- EXPECT_EQ(0, scroll.x());
- EXPECT_NEAR(scroll.y(), 96, 1);
+ gfx::Vector2dF delta;
+ EXPECT_TRUE(curve.ComputeScrollDeltaAtTime(
+ now + base::TimeDelta::FromMilliseconds(20), &delta));
+ EXPECT_EQ(0, delta.x());
+ EXPECT_NEAR(delta.y(), 96, 1);
- scroll =
- curve.GetScrollAmountAtTime(now + base::TimeDelta::FromMilliseconds(250));
- EXPECT_EQ(0, scroll.x());
- EXPECT_NEAR(scroll.y(), 705, 1);
+ EXPECT_TRUE(curve.ComputeScrollDeltaAtTime(
+ now + base::TimeDelta::FromMilliseconds(250), &delta));
+ EXPECT_EQ(0, delta.x());
+ EXPECT_NEAR(delta.y(), 705, 1);
- scroll =
- curve.GetScrollAmountAtTime(now + base::TimeDelta::FromSeconds(10));
- EXPECT_EQ(0, scroll.x());
- EXPECT_NEAR(scroll.y(), 392, 1);
+ EXPECT_FALSE(curve.ComputeScrollDeltaAtTime(
+ now + base::TimeDelta::FromSeconds(10), &delta));
+ EXPECT_EQ(0, delta.x());
+ EXPECT_NEAR(delta.y(), 392, 1);
- EXPECT_TRUE(curve.GetScrollAmountAtTime(
- now + base::TimeDelta::FromSeconds(20)).IsZero());
+ EXPECT_FALSE(curve.ComputeScrollDeltaAtTime(
+ now + base::TimeDelta::FromSeconds(20), &delta));
+ EXPECT_TRUE(delta.IsZero());
}
} // namespace ui
diff --git a/ui/events/gestures/gesture_configuration.cc b/ui/events/gestures/gesture_configuration.cc
index 1ce13d7..78f6b57 100644
--- a/ui/events/gestures/gesture_configuration.cc
+++ b/ui/events/gestures/gesture_configuration.cc
@@ -6,30 +6,28 @@
namespace ui {
-int GestureConfiguration::default_radius_ = 25;
+float GestureConfiguration::default_radius_ = 25;
int GestureConfiguration::fling_max_cancel_to_down_time_in_ms_ = 400;
int GestureConfiguration::fling_max_tap_gap_time_in_ms_ = 200;
float GestureConfiguration::fling_velocity_cap_ = 17000.0f;
int GestureConfiguration::tab_scrub_activation_delay_in_ms_ = 200;
-double GestureConfiguration::long_press_time_in_seconds_ = 1.0;
-double GestureConfiguration::semi_long_press_time_in_seconds_ = 0.4;
-double GestureConfiguration::max_distance_for_two_finger_tap_in_pixels_ = 300;
-double GestureConfiguration::max_seconds_between_double_click_ = 0.7;
-double
- GestureConfiguration::max_separation_for_gesture_touches_in_pixels_ = 150;
+int GestureConfiguration::long_press_time_in_ms_ = 1000;
+int GestureConfiguration::semi_long_press_time_in_ms_ = 400;
+float GestureConfiguration::max_distance_for_two_finger_tap_in_pixels_ = 300;
+int GestureConfiguration::max_time_between_double_click_in_ms_ = 700;
+float GestureConfiguration::max_separation_for_gesture_touches_in_pixels_ = 150;
float GestureConfiguration::max_swipe_deviation_angle_ = 20;
-double
- GestureConfiguration::max_touch_down_duration_in_seconds_for_click_ = 0.8;
-double GestureConfiguration::max_touch_move_in_pixels_for_click_ = 15;
-double GestureConfiguration::max_distance_between_taps_for_double_tap_ = 20;
-double GestureConfiguration::min_distance_for_pinch_scroll_in_pixels_ = 20;
-double GestureConfiguration::min_pinch_update_distance_in_pixels_ = 5;
+int GestureConfiguration::max_touch_down_duration_for_click_in_ms_ = 800;
+float GestureConfiguration::max_touch_move_in_pixels_for_click_ = 15;
+float GestureConfiguration::max_distance_between_taps_for_double_tap_ = 20;
+float GestureConfiguration::min_distance_for_pinch_scroll_in_pixels_ = 20;
+float GestureConfiguration::min_pinch_update_distance_in_pixels_ = 5;
float GestureConfiguration::min_scroll_velocity_ = 30.0f;
-double GestureConfiguration::min_swipe_speed_ = 20;
+float GestureConfiguration::min_swipe_speed_ = 20;
// If this is too small, we currently can get single finger pinch zoom. See
// crbug.com/357237 for details.
-int GestureConfiguration::min_scaling_span_in_pixels_ = 125;
+float GestureConfiguration::min_scaling_span_in_pixels_ = 125;
int GestureConfiguration::show_press_delay_in_ms_ = 150;
// TODO(jdduke): Disable and remove entirely when issues with intermittent
diff --git a/ui/events/gestures/gesture_configuration.h b/ui/events/gestures/gesture_configuration.h
index 1537b8e..c72208e 100644
--- a/ui/events/gestures/gesture_configuration.h
+++ b/ui/events/gestures/gesture_configuration.h
@@ -18,10 +18,12 @@
public:
// Ordered alphabetically ignoring underscores, to align with the
// associated list of prefs in gesture_prefs_aura.cc.
- static int default_radius() {
+ static float default_radius() {
return default_radius_;
}
- static void set_default_radius(int radius) { default_radius_ = radius; }
+ static void set_default_radius(float radius) {
+ default_radius_ = radius;
+ }
static int fling_max_cancel_to_down_time_in_ms() {
return fling_max_cancel_to_down_time_in_ms_;
}
@@ -34,34 +36,34 @@
static void set_fling_max_tap_gap_time_in_ms(int val) {
fling_max_tap_gap_time_in_ms_ = val;
}
- static double long_press_time_in_seconds() {
- return long_press_time_in_seconds_;
+ static int long_press_time_in_ms() {
+ return long_press_time_in_ms_;
}
- static double semi_long_press_time_in_seconds() {
- return semi_long_press_time_in_seconds_;
+ static int semi_long_press_time_in_ms() {
+ return semi_long_press_time_in_ms_;
}
- static double max_distance_for_two_finger_tap_in_pixels() {
+ static float max_distance_for_two_finger_tap_in_pixels() {
return max_distance_for_two_finger_tap_in_pixels_;
}
- static void set_max_distance_for_two_finger_tap_in_pixels(double val) {
+ static void set_max_distance_for_two_finger_tap_in_pixels(float val) {
max_distance_for_two_finger_tap_in_pixels_ = val;
}
- static void set_long_press_time_in_seconds(double val) {
- long_press_time_in_seconds_ = val;
+ static void set_long_press_time_in_ms(int val) {
+ long_press_time_in_ms_ = val;
}
- static void set_semi_long_press_time_in_seconds(double val) {
- semi_long_press_time_in_seconds_ = val;
+ static void set_semi_long_press_time_in_ms(int val) {
+ semi_long_press_time_in_ms_ = val;
}
- static double max_seconds_between_double_click() {
- return max_seconds_between_double_click_;
+ static int max_time_between_double_click_in_ms() {
+ return max_time_between_double_click_in_ms_;
}
- static void set_max_seconds_between_double_click(double val) {
- max_seconds_between_double_click_ = val;
+ static void set_max_time_between_double_click_in_ms(int val) {
+ max_time_between_double_click_in_ms_ = val;
}
- static int max_separation_for_gesture_touches_in_pixels() {
+ static float max_separation_for_gesture_touches_in_pixels() {
return max_separation_for_gesture_touches_in_pixels_;
}
- static void set_max_separation_for_gesture_touches_in_pixels(int val) {
+ static void set_max_separation_for_gesture_touches_in_pixels(float val) {
max_separation_for_gesture_touches_in_pixels_ = val;
}
static float max_swipe_deviation_angle() {
@@ -70,34 +72,34 @@
static void set_max_swipe_deviation_angle(float val) {
max_swipe_deviation_angle_ = val;
}
- static double max_touch_down_duration_in_seconds_for_click() {
- return max_touch_down_duration_in_seconds_for_click_;
+ static int max_touch_down_duration_for_click_in_ms() {
+ return max_touch_down_duration_for_click_in_ms_;
}
- static void set_max_touch_down_duration_in_seconds_for_click(double val) {
- max_touch_down_duration_in_seconds_for_click_ = val;
+ static void set_max_touch_down_duration_for_click_in_ms(int val) {
+ max_touch_down_duration_for_click_in_ms_ = val;
}
- static double max_touch_move_in_pixels_for_click() {
+ static float max_touch_move_in_pixels_for_click() {
return max_touch_move_in_pixels_for_click_;
}
- static void set_max_touch_move_in_pixels_for_click(double val) {
+ static void set_max_touch_move_in_pixels_for_click(float val) {
max_touch_move_in_pixels_for_click_ = val;
}
- static double max_distance_between_taps_for_double_tap() {
+ static float max_distance_between_taps_for_double_tap() {
return max_distance_between_taps_for_double_tap_;
}
- static void set_max_distance_between_taps_for_double_tap(double val) {
+ static void set_max_distance_between_taps_for_double_tap(float val) {
max_distance_between_taps_for_double_tap_ = val;
}
- static double min_distance_for_pinch_scroll_in_pixels() {
+ static float min_distance_for_pinch_scroll_in_pixels() {
return min_distance_for_pinch_scroll_in_pixels_;
}
- static void set_min_distance_for_pinch_scroll_in_pixels(double val) {
+ static void set_min_distance_for_pinch_scroll_in_pixels(float val) {
min_distance_for_pinch_scroll_in_pixels_ = val;
}
- static double min_pinch_update_distance_in_pixels() {
+ static float min_pinch_update_distance_in_pixels() {
return min_pinch_update_distance_in_pixels_;
}
- static void set_min_pinch_update_distance_in_pixels(double val) {
+ static void set_min_pinch_update_distance_in_pixels(float val) {
min_pinch_update_distance_in_pixels_ = val;
}
static float min_scroll_velocity() {
@@ -106,16 +108,16 @@
static void set_min_scroll_velocity(float val) {
min_scroll_velocity_ = val;
}
- static double min_swipe_speed() {
+ static float min_swipe_speed() {
return min_swipe_speed_;
}
- static void set_min_swipe_speed(double val) {
+ static void set_min_swipe_speed(float val) {
min_swipe_speed_ = val;
}
- static int min_scaling_span_in_pixels() {
+ static float min_scaling_span_in_pixels() {
return min_scaling_span_in_pixels_;
};
- static void set_min_scaling_span_in_pixels(int val) {
+ static void set_min_scaling_span_in_pixels(float val) {
min_scaling_span_in_pixels_ = val;
}
static int show_press_delay_in_ms() {
@@ -151,12 +153,12 @@
// The default touch radius length used when the only information given
// by the device is the touch center.
- static int default_radius_;
+ static float default_radius_;
// The maximum allowed distance between two fingers for a two finger tap. If
// the distance between two fingers is greater than this value, we will not
// recognize a two finger tap.
- static double max_distance_for_two_finger_tap_in_pixels_;
+ static float max_distance_for_two_finger_tap_in_pixels_;
// Maximum time between a GestureFlingCancel and a mousedown such that the
// mousedown is considered associated with the cancel event.
@@ -166,20 +168,20 @@
// suppressable tap.
static int fling_max_tap_gap_time_in_ms_;
- static double long_press_time_in_seconds_;
- static double semi_long_press_time_in_seconds_;
- static double max_seconds_between_double_click_;
- static double max_separation_for_gesture_touches_in_pixels_;
+ static int long_press_time_in_ms_;
+ static int semi_long_press_time_in_ms_;
+ static int max_time_between_double_click_in_ms_;
+ static float max_separation_for_gesture_touches_in_pixels_;
static float max_swipe_deviation_angle_;
- static double max_touch_down_duration_in_seconds_for_click_;
- static double max_touch_move_in_pixels_for_click_;
- static double max_distance_between_taps_for_double_tap_;
- static double min_distance_for_pinch_scroll_in_pixels_;
+ static int max_touch_down_duration_for_click_in_ms_;
+ static float max_touch_move_in_pixels_for_click_;
+ static float max_distance_between_taps_for_double_tap_;
+ static float min_distance_for_pinch_scroll_in_pixels_;
// Only used with --compensate-for-unstable-pinch-zoom.
- static double min_pinch_update_distance_in_pixels_;
+ static float min_pinch_update_distance_in_pixels_;
static float min_scroll_velocity_;
- static double min_swipe_speed_;
- static int min_scaling_span_in_pixels_;
+ static float min_swipe_speed_;
+ static float min_scaling_span_in_pixels_;
static int show_press_delay_in_ms_;
static int scroll_debounce_interval_in_ms_;
static float fling_velocity_cap_;
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index a731357..d3ef218 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -122,12 +122,11 @@
const GestureEventData& current_tap) const {
if (current_tap.time - previous_tap.time >
base::TimeDelta::FromMilliseconds(
- ui::GestureConfiguration::max_seconds_between_double_click() *
- 1000)) {
+ ui::GestureConfiguration::max_time_between_double_click_in_ms())) {
return false;
}
- double double_tap_slop_square =
+ float double_tap_slop_square =
GestureConfiguration::max_distance_between_taps_for_double_tap();
double_tap_slop_square *= double_tap_slop_square;
const float delta_x = previous_tap.x - current_tap.x;
diff --git a/ui/events/gestures/gesture_provider_aura.h b/ui/events/gestures/gesture_provider_aura.h
index 712b84f..6b649dc 100644
--- a/ui/events/gestures/gesture_provider_aura.h
+++ b/ui/events/gestures/gesture_provider_aura.h
@@ -35,7 +35,7 @@
ScopedVector<GestureEvent>* GetAndResetPendingGestures();
// GestureProviderClient implementation
- virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE;
+ virtual void OnGestureEvent(const GestureEventData& gesture) override;
private:
bool IsConsideredDoubleTap(const GestureEventData& previous_tap,
diff --git a/ui/events/gestures/gesture_provider_aura_unittest.cc b/ui/events/gestures/gesture_provider_aura_unittest.cc
index e2b1523..11cc3ca 100644
--- a/ui/events/gestures/gesture_provider_aura_unittest.cc
+++ b/ui/events/gestures/gesture_provider_aura_unittest.cc
@@ -17,13 +17,13 @@
virtual ~GestureProviderAuraTest() {}
- virtual void OnGestureEvent(GestureEvent* event) OVERRIDE {}
+ virtual void OnGestureEvent(GestureEvent* event) override {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
provider_.reset(new GestureProviderAura(this));
}
- virtual void TearDown() OVERRIDE { provider_.reset(); }
+ virtual void TearDown() override { provider_.reset(); }
GestureProviderAura* provider() { return provider_.get(); }
diff --git a/ui/events/gestures/gesture_recognizer_impl.cc b/ui/events/gestures/gesture_recognizer_impl.cc
index 5f6cfda..9f6eb3e 100644
--- a/ui/events/gestures/gesture_recognizer_impl.cc
+++ b/ui/events/gestures/gesture_recognizer_impl.cc
@@ -91,12 +91,12 @@
GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
const gfx::PointF& location, int source_device_id) {
- const int max_distance =
+ const float max_distance =
GestureConfiguration::max_separation_for_gesture_touches_in_pixels();
gfx::PointF closest_point;
int closest_touch_id = 0;
- float closest_distance_squared = std::numeric_limits<float>::infinity();
+ double closest_distance_squared = std::numeric_limits<double>::infinity();
std::map<GestureConsumer*, GestureProviderAura*>::iterator i;
for (i = consumer_gesture_provider_.begin();
@@ -109,7 +109,7 @@
gfx::PointF point(pointer_state.GetX(j), pointer_state.GetY(j));
// Relative distance is all we need here, so LengthSquared() is
// appropriate, and cheaper than Length().
- float distance_squared = (point - location).LengthSquared();
+ double distance_squared = (point - location).LengthSquared();
if (distance_squared < closest_distance_squared) {
closest_point = point;
closest_touch_id = pointer_state.GetPointerId(j);
diff --git a/ui/events/gestures/gesture_recognizer_impl.h b/ui/events/gestures/gesture_recognizer_impl.h
index 7ba74f3..60edfba 100644
--- a/ui/events/gestures/gesture_recognizer_impl.h
+++ b/ui/events/gestures/gesture_recognizer_impl.h
@@ -37,16 +37,16 @@
// Overridden from GestureRecognizer
virtual GestureConsumer* GetTouchLockedTarget(
- const TouchEvent& event) OVERRIDE;
+ const TouchEvent& event) override;
virtual GestureConsumer* GetTargetForGestureEvent(
- const GestureEvent& event) OVERRIDE;
+ const GestureEvent& event) override;
virtual GestureConsumer* GetTargetForLocation(
- const gfx::PointF& location, int source_device_id) OVERRIDE;
+ const gfx::PointF& location, int source_device_id) override;
virtual void TransferEventsTo(GestureConsumer* current_consumer,
- GestureConsumer* new_consumer) OVERRIDE;
+ GestureConsumer* new_consumer) override;
virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
- gfx::PointF* point) OVERRIDE;
- virtual bool CancelActiveTouches(GestureConsumer* consumer) OVERRIDE;
+ gfx::PointF* point) override;
+ virtual bool CancelActiveTouches(GestureConsumer* consumer) override;
protected:
virtual GestureProviderAura* GetGestureProviderForConsumer(
@@ -60,25 +60,25 @@
// Overridden from GestureRecognizer
virtual bool ProcessTouchEventPreDispatch(const TouchEvent& event,
- GestureConsumer* consumer) OVERRIDE;
+ GestureConsumer* consumer) override;
virtual Gestures* ProcessTouchEventPostDispatch(
const TouchEvent& event,
ui::EventResult result,
- GestureConsumer* consumer) OVERRIDE;
+ GestureConsumer* consumer) override;
virtual Gestures* ProcessTouchEventOnAsyncAck(
const TouchEvent& event,
ui::EventResult result,
- GestureConsumer* consumer) OVERRIDE;
+ GestureConsumer* consumer) override;
virtual bool CleanupStateForConsumer(GestureConsumer* consumer)
- OVERRIDE;
- virtual void AddGestureEventHelper(GestureEventHelper* helper) OVERRIDE;
- virtual void RemoveGestureEventHelper(GestureEventHelper* helper) OVERRIDE;
+ override;
+ virtual void AddGestureEventHelper(GestureEventHelper* helper) override;
+ virtual void RemoveGestureEventHelper(GestureEventHelper* helper) override;
// Overridden from GestureProviderAuraClient
- virtual void OnGestureEvent(GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(GestureEvent* event) override;
// Convenience method to find the GestureEventHelper that can dispatch events
// to a specific |consumer|.
diff --git a/ui/events/gestures/gesture_recognizer_impl_mac.cc b/ui/events/gestures/gesture_recognizer_impl_mac.cc
index 4dfa311..b123593 100644
--- a/ui/events/gestures/gesture_recognizer_impl_mac.cc
+++ b/ui/events/gestures/gesture_recognizer_impl_mac.cc
@@ -19,48 +19,48 @@
private:
virtual bool ProcessTouchEventPreDispatch(
const TouchEvent& event,
- GestureConsumer* consumer) OVERRIDE {
+ GestureConsumer* consumer) override {
return false;
}
virtual Gestures* ProcessTouchEventPostDispatch(
const TouchEvent& event,
ui::EventResult result,
- GestureConsumer* consumer) OVERRIDE {
+ GestureConsumer* consumer) override {
return NULL;
}
virtual Gestures* ProcessTouchEventOnAsyncAck(
const TouchEvent& event,
ui::EventResult result,
- GestureConsumer* consumer) OVERRIDE {
+ GestureConsumer* consumer) override {
return NULL;
};
- virtual bool CleanupStateForConsumer(GestureConsumer* consumer) OVERRIDE {
+ virtual bool CleanupStateForConsumer(GestureConsumer* consumer) override {
return false;
}
virtual GestureConsumer* GetTouchLockedTarget(
- const TouchEvent& event) OVERRIDE {
+ const TouchEvent& event) override {
return NULL;
}
virtual GestureConsumer* GetTargetForGestureEvent(
- const GestureEvent& event) OVERRIDE {
+ const GestureEvent& event) override {
return NULL;
}
virtual GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
- int source_device_id) OVERRIDE {
+ int source_device_id) override {
return NULL;
}
virtual void TransferEventsTo(GestureConsumer* current_consumer,
- GestureConsumer* new_consumer) OVERRIDE {}
+ GestureConsumer* new_consumer) override {}
virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
- gfx::PointF* point) OVERRIDE {
+ gfx::PointF* point) override {
return false;
}
- virtual bool CancelActiveTouches(GestureConsumer* consumer) OVERRIDE {
+ virtual bool CancelActiveTouches(GestureConsumer* consumer) override {
return false;
}
- virtual void AddGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
- virtual void RemoveGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
+ virtual void AddGestureEventHelper(GestureEventHelper* helper) override {}
+ virtual void RemoveGestureEventHelper(GestureEventHelper* helper) override {}
DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac);
};
diff --git a/ui/events/gestures/motion_event_aura.h b/ui/events/gestures/motion_event_aura.h
index ec956fc..7ba2726 100644
--- a/ui/events/gestures/motion_event_aura.h
+++ b/ui/events/gestures/motion_event_aura.h
@@ -24,26 +24,26 @@
void OnTouch(const TouchEvent& touch);
// MotionEvent implementation.
- virtual int GetId() const OVERRIDE;
- virtual Action GetAction() const OVERRIDE;
- virtual int GetActionIndex() const OVERRIDE;
- virtual size_t GetPointerCount() const OVERRIDE;
- virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
- virtual float GetX(size_t pointer_index) const OVERRIDE;
- virtual float GetY(size_t pointer_index) const OVERRIDE;
- virtual float GetRawX(size_t pointer_index) const OVERRIDE;
- virtual float GetRawY(size_t pointer_index) const OVERRIDE;
- virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
- virtual float GetTouchMinor(size_t pointer_index) const OVERRIDE;
- virtual float GetOrientation(size_t pointer_index) const OVERRIDE;
- virtual float GetPressure(size_t pointer_index) const OVERRIDE;
- virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE;
- virtual int GetButtonState() const OVERRIDE;
- virtual int GetFlags() const OVERRIDE;
- virtual base::TimeTicks GetEventTime() const OVERRIDE;
+ virtual int GetId() const override;
+ virtual Action GetAction() const override;
+ virtual int GetActionIndex() const override;
+ virtual size_t GetPointerCount() const override;
+ virtual int GetPointerId(size_t pointer_index) const override;
+ virtual float GetX(size_t pointer_index) const override;
+ virtual float GetY(size_t pointer_index) const override;
+ virtual float GetRawX(size_t pointer_index) const override;
+ virtual float GetRawY(size_t pointer_index) const override;
+ virtual float GetTouchMajor(size_t pointer_index) const override;
+ virtual float GetTouchMinor(size_t pointer_index) const override;
+ virtual float GetOrientation(size_t pointer_index) const override;
+ virtual float GetPressure(size_t pointer_index) const override;
+ virtual ToolType GetToolType(size_t pointer_index) const override;
+ virtual int GetButtonState() const override;
+ virtual int GetFlags() const override;
+ virtual base::TimeTicks GetEventTime() const override;
- virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
- virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
+ virtual scoped_ptr<MotionEvent> Clone() const override;
+ virtual scoped_ptr<MotionEvent> Cancel() const override;
int GetSourceDeviceId(size_t pointer_index) const;
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc
index daba811..a4a810e 100644
--- a/ui/events/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/events/keycodes/keyboard_code_conversion_x.cc
@@ -485,11 +485,24 @@
} else {
xkeyevent.xkey = xev->xkey;
}
+ KeyboardCode keycode = VKEY_UNKNOWN;
XKeyEvent* xkey = &xkeyevent.xkey;
- xkey->state &= (~0xFF | Mod2Mask); // Clears the xkey's state except numlock.
// XLookupKeysym does not take into consideration the state of the lock/shift
// etc. keys. So it is necessary to use XLookupString instead.
XLookupString(xkey, NULL, 0, &keysym, NULL);
+ if (IsKeypadKey(keysym) || IsPrivateKeypadKey(keysym) ||
+ IsCursorKey(keysym) || IsPFKey(keysym) || IsFunctionKey(keysym) ||
+ IsModifierKey(keysym)) {
+ return KeyboardCodeFromXKeysym(keysym);
+ }
+
+ // If |xkey| has modifiers set, other than NumLock, then determine the
+ // un-modified KeySym and use that to map, so that e.g. Ctrl+D correctly
+ // generates VKEY_D.
+ if (xkey->state & 0xFF & ~Mod2Mask) {
+ xkey->state &= (~0xFF | Mod2Mask);
+ XLookupString(xkey, NULL, 0, &keysym, NULL);
+ }
// [a-z] cases.
if (keysym >= XK_a && keysym <= XK_z)
@@ -499,8 +512,6 @@
if (keysym >= XK_0 && keysym <= XK_9)
return static_cast<KeyboardCode>(VKEY_0 + keysym - XK_0);
- KeyboardCode keycode = VKEY_UNKNOWN;
-
if (!IsKeypadKey(keysym) && !IsPrivateKeypadKey(keysym) &&
!IsCursorKey(keysym) && !IsPFKey(keysym) && !IsFunctionKey(keysym) &&
!IsModifierKey(keysym)) {
@@ -535,7 +546,7 @@
// On Linux some keys has AltGr char but not on Windows.
// So if cannot find VKEY with (ch0+sc+ch1+ch2) in map3, tries to fallback
// to just find VKEY with (ch0+sc+ch1). This is the best we could do.
- MAP3 key4 = {keysym & 0xFFFF, xkey->keycode, keysym_shift & 0xFFFF, 0xFFFF,
+ MAP3 key4 = {keysym & 0xFFFF, xkey->keycode, keysym_shift & 0xFFFF, 0,
0};
const MAP3* p =
std::lower_bound(map3, map3 + arraysize(map3), key4, MAP3());
@@ -769,6 +780,8 @@
// https://bugs.freedesktop.org/show_bug.cgi?id=5783
// In Chrome, we map these X key symbols back to F13-18 since we don't have
// VKEYs for these XF86XK symbols.
+ case XF86XK_Tools:
+ return VKEY_F13;
case XF86XK_Launch5:
return VKEY_F14;
case XF86XK_Launch6:
@@ -816,13 +829,6 @@
case XF86XK_LaunchB: // F4 on an Apple keyboard.
case XF86XK_Calculator:
return VKEY_MEDIA_LAUNCH_APP2;
-
- // XF86XK_Tools is generated from HID Usage AL_CONSUMER_CONTROL_CONFIG
- // (Usage 0x0183, Page 0x0C) and most commonly launches the OS default
- // media player (see crbug.com/398345).
- case XF86XK_Tools:
- return VKEY_MEDIA_LAUNCH_MEDIA_SELECT;
-
case XF86XK_WLAN:
return VKEY_WLAN;
case XF86XK_PowerOff:
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 5cd1521..fe96055 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -29,6 +29,9 @@
CASE_TYPE(INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT);
CASE_TYPE(WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT);
CASE_TYPE(WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT);
+ CASE_TYPE(INPUT_EVENT_BROWSER_COMPOSITE_COMPONENT);
+ CASE_TYPE(INPUT_EVENT_BROWSER_SWAP_BUFFER_COMPONENT);
+ CASE_TYPE(INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT);
@@ -73,7 +76,7 @@
static scoped_refptr<ConvertableToTraceFormat> FromValue(
scoped_ptr<base::Value> value);
- virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE;
+ virtual void AppendAsTraceFormat(std::string* out) const override;
private:
explicit LatencyInfoTracedValue(base::Value* value);
diff --git a/ui/events/ozone/device/device_manager_manual.h b/ui/events/ozone/device/device_manager_manual.h
index 9d1cf61..9104774 100644
--- a/ui/events/ozone/device/device_manager_manual.h
+++ b/ui/events/ozone/device/device_manager_manual.h
@@ -17,9 +17,9 @@
private:
// DeviceManager overrides:
- virtual void ScanDevices(DeviceEventObserver* observer) OVERRIDE;
- virtual void AddObserver(DeviceEventObserver* observer) OVERRIDE;
- virtual void RemoveObserver(DeviceEventObserver* observer) OVERRIDE;
+ virtual void ScanDevices(DeviceEventObserver* observer) override;
+ virtual void AddObserver(DeviceEventObserver* observer) override;
+ virtual void RemoveObserver(DeviceEventObserver* observer) override;
DISALLOW_COPY_AND_ASSIGN(DeviceManagerManual);
};
diff --git a/ui/events/ozone/device/udev/device_manager_udev.h b/ui/events/ozone/device/udev/device_manager_udev.h
index 8a7537a..13c76b9 100644
--- a/ui/events/ozone/device/udev/device_manager_udev.h
+++ b/ui/events/ozone/device/udev/device_manager_udev.h
@@ -28,13 +28,13 @@
void CreateMonitor();
// DeviceManager overrides:
- virtual void ScanDevices(DeviceEventObserver* observer) OVERRIDE;
- virtual void AddObserver(DeviceEventObserver* observer) OVERRIDE;
- virtual void RemoveObserver(DeviceEventObserver* observer) OVERRIDE;
+ virtual void ScanDevices(DeviceEventObserver* observer) override;
+ virtual void AddObserver(DeviceEventObserver* observer) override;
+ virtual void RemoveObserver(DeviceEventObserver* observer) override;
// base::MessagePumpLibevent::Watcher overrides:
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
- virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanReadWithoutBlocking(int fd) override;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) override;
device::ScopedUdevPtr udev_;
device::ScopedUdevMonitorPtr monitor_;
diff --git a/ui/events/ozone/evdev/event_converter_evdev.h b/ui/events/ozone/evdev/event_converter_evdev.h
index b4b2463..fc12037 100644
--- a/ui/events/ozone/evdev/event_converter_evdev.h
+++ b/ui/events/ozone/evdev/event_converter_evdev.h
@@ -8,15 +8,12 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
+#include "ui/events/ozone/evdev/event_dispatch_callback.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
#include "ui/gfx/geometry/size.h"
namespace ui {
-class Event;
-
-typedef base::Callback<void(Event*)> EventDispatchCallback;
-
class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
: public base::MessagePumpLibevent::Watcher {
public:
@@ -25,6 +22,8 @@
int id() const { return id_; }
+ const base::FilePath& path() { return path_; }
+
// Start reading events.
void Start();
@@ -40,7 +39,7 @@
protected:
// base::MessagePumpLibevent::Watcher:
- virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) override;
// File descriptor to read.
int fd_;
diff --git a/ui/events/ozone/evdev/event_device_util.h b/ui/events/ozone/evdev/event_device_util.h
index ddb7b80..2b65b3b 100644
--- a/ui/events/ozone/evdev/event_device_util.h
+++ b/ui/events/ozone/evdev/event_device_util.h
@@ -12,7 +12,7 @@
#define EVDEV_LONG_BITS (CHAR_BIT * sizeof(long))
#define EVDEV_BITS_TO_LONGS(x) (((x) + EVDEV_LONG_BITS - 1) / EVDEV_LONG_BITS)
-static inline int EvdevBitIsSet(const unsigned long* data, int bit) {
+static inline bool EvdevBitIsSet(const unsigned long* data, int bit) {
return data[bit / EVDEV_LONG_BITS] & (1UL << (bit % EVDEV_LONG_BITS));
}
diff --git a/ui/events/ozone/evdev/event_dispatch_callback.h b/ui/events/ozone/evdev/event_dispatch_callback.h
new file mode 100644
index 0000000..1974d51
--- /dev/null
+++ b/ui/events/ozone/evdev/event_dispatch_callback.h
@@ -0,0 +1,18 @@
+// Copyright 2014 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 UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
+#define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
+
+#include "base/callback.h"
+
+namespace ui {
+
+class Event;
+
+typedef base::Callback<void(Event*)> EventDispatchCallback;
+
+} // namspace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
diff --git a/ui/events/ozone/evdev/event_factory_evdev.cc b/ui/events/ozone/evdev/event_factory_evdev.cc
index 88ec979..0895c0a 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -33,6 +33,24 @@
namespace {
+typedef base::Callback<void(scoped_ptr<EventConverterEvdev>)>
+ OpenInputDeviceReplyCallback;
+
+struct OpenInputDeviceParams {
+ // Unique identifier for the new device.
+ int id;
+
+ // Device path to open.
+ base::FilePath path;
+
+ // Callback for dispatching events. Call on UI thread only.
+ EventDispatchCallback dispatch_callback;
+
+ // State shared between devices. Must not be dereferenced on worker thread.
+ EventModifiersEvdev* modifiers;
+ CursorDelegateEvdev* cursor;
+};
+
#if defined(USE_EVDEV_GESTURES)
bool UseGesturesLibraryForDevice(const EventDeviceInfo& devinfo) {
if (devinfo.HasAbsXY() && !devinfo.IsMappedToScreen())
@@ -46,24 +64,21 @@
#endif
scoped_ptr<EventConverterEvdev> CreateConverter(
+ const OpenInputDeviceParams& params,
int fd,
- const base::FilePath& path,
- int id,
- const EventDeviceInfo& devinfo,
- const EventDispatchCallback& dispatch,
- EventModifiersEvdev* modifiers,
- CursorDelegateEvdev* cursor) {
+ const EventDeviceInfo& devinfo) {
#if defined(USE_EVDEV_GESTURES)
// Touchpad or mouse: use gestures library.
// EventReaderLibevdevCros -> GestureInterpreterLibevdevCros -> DispatchEvent
if (UseGesturesLibraryForDevice(devinfo)) {
- scoped_ptr<GestureInterpreterLibevdevCros> gesture_interp = make_scoped_ptr(
- new GestureInterpreterLibevdevCros(modifiers, cursor, dispatch));
+ scoped_ptr<GestureInterpreterLibevdevCros> gesture_interp =
+ make_scoped_ptr(new GestureInterpreterLibevdevCros(
+ params.modifiers, params.cursor, params.dispatch_callback));
scoped_ptr<EventReaderLibevdevCros> libevdev_reader =
make_scoped_ptr(new EventReaderLibevdevCros(
fd,
- path,
- id,
+ params.path,
+ params.id,
gesture_interp.PassAs<EventReaderLibevdevCros::Delegate>()));
return libevdev_reader.PassAs<EventConverterEvdev>();
}
@@ -72,12 +87,12 @@
// Touchscreen: use TouchEventConverterEvdev.
scoped_ptr<EventConverterEvdev> converter;
if (devinfo.HasAbsXY())
- return make_scoped_ptr<EventConverterEvdev>(
- new TouchEventConverterEvdev(fd, path, id, devinfo, dispatch));
+ return make_scoped_ptr<EventConverterEvdev>(new TouchEventConverterEvdev(
+ fd, params.path, params.id, devinfo, params.dispatch_callback));
// Everything else: use KeyEventConverterEvdev.
- return make_scoped_ptr<EventConverterEvdev>(
- new KeyEventConverterEvdev(fd, path, id, modifiers, dispatch));
+ return make_scoped_ptr<EventConverterEvdev>(new KeyEventConverterEvdev(
+ fd, params.path, params.id, params.modifiers, params.dispatch_callback));
}
// Open an input device. Opening may put the calling thread to sleep, and
@@ -86,14 +101,11 @@
//
// This takes a TaskRunner and runs the reply on that thread, so that we
// can hop threads if necessary (back to the UI thread).
-void OpenInputDevice(
- const base::FilePath& path,
- EventModifiersEvdev* modifiers,
- CursorDelegateEvdev* cursor,
- int device_id,
- scoped_refptr<base::TaskRunner> reply_runner,
- const EventDispatchCallback& dispatch,
- base::Callback<void(scoped_ptr<EventConverterEvdev>)> reply_callback) {
+void OpenInputDevice(scoped_ptr<OpenInputDeviceParams> params,
+ scoped_refptr<base::TaskRunner> reply_runner,
+ const OpenInputDeviceReplyCallback& reply_callback) {
+ const base::FilePath& path = params->path;
+
TRACE_EVENT1("ozone", "OpenInputDevice", "path", path.value());
int fd = open(path.value().c_str(), O_RDONLY | O_NONBLOCK);
@@ -116,8 +128,8 @@
return;
}
- scoped_ptr<EventConverterEvdev> converter = CreateConverter(
- fd, path, device_id, devinfo, dispatch, modifiers, cursor);
+ scoped_ptr<EventConverterEvdev> converter =
+ CreateConverter(*params, fd, devinfo);
// Reply with the constructed converter.
reply_runner->PostTask(FROM_HERE,
@@ -154,8 +166,9 @@
}
void EventFactoryEvdev::AttachInputDevice(
- const base::FilePath& path,
scoped_ptr<EventConverterEvdev> converter) {
+ const base::FilePath& path = converter->path();
+
TRACE_EVENT1("ozone", "AttachInputDevice", "path", path.value());
DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
@@ -180,20 +193,24 @@
case DeviceEvent::CHANGE: {
TRACE_EVENT1("ozone", "OnDeviceAdded", "path", event.path().value());
+ scoped_ptr<OpenInputDeviceParams> params(new OpenInputDeviceParams);
+ params->id = NextDeviceId();
+ params->path = event.path();
+ params->dispatch_callback = dispatch_callback_;
+ params->modifiers = &modifiers_;
+ params->cursor = cursor_;
+
+ OpenInputDeviceReplyCallback reply_callback =
+ base::Bind(&EventFactoryEvdev::AttachInputDevice,
+ weak_ptr_factory_.GetWeakPtr());
+
// Dispatch task to open from the worker pool, since open may block.
- base::WorkerPool::PostTask(
- FROM_HERE,
- base::Bind(&OpenInputDevice,
- event.path(),
- &modifiers_,
- cursor_,
- NextDeviceId(),
- ui_task_runner_,
- dispatch_callback_,
- base::Bind(&EventFactoryEvdev::AttachInputDevice,
- weak_ptr_factory_.GetWeakPtr(),
- event.path())),
- true);
+ base::WorkerPool::PostTask(FROM_HERE,
+ base::Bind(&OpenInputDevice,
+ base::Passed(¶ms),
+ ui_task_runner_,
+ reply_callback),
+ true /* task_is_slow */);
}
break;
case DeviceEvent::REMOVE: {
diff --git a/ui/events/ozone/evdev/event_factory_evdev.h b/ui/events/ozone/evdev/event_factory_evdev.h
index 15031e4..806ec29 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.h
+++ b/ui/events/ozone/evdev/event_factory_evdev.h
@@ -41,8 +41,7 @@
private:
// Open device at path & starting processing events (on UI thread).
- void AttachInputDevice(const base::FilePath& file_path,
- scoped_ptr<EventConverterEvdev> converter);
+ void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
// Close device at path (on UI thread).
void DetachInputDevice(const base::FilePath& file_path);
@@ -54,10 +53,10 @@
// DeviceEventObserver overrides:
//
// Callback for device add (on UI thread).
- virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE;
+ virtual void OnDeviceEvent(const DeviceEvent& event) override;
// PlatformEventSource:
- virtual void OnDispatcherListChanged() OVERRIDE;
+ virtual void OnDispatcherListChanged() override;
// Owned per-device event converters (by path).
std::map<base::FilePath, EventConverterEvdev*> converters_;
diff --git a/ui/events/ozone/evdev/key_event_converter_evdev.h b/ui/events/ozone/evdev/key_event_converter_evdev.h
index d1cab8c..9a2f771 100644
--- a/ui/events/ozone/evdev/key_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/key_event_converter_evdev.h
@@ -27,7 +27,7 @@
virtual ~KeyEventConverterEvdev();
// EventConverterEvdev:
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanReadWithoutBlocking(int fd) override;
void ProcessEvents(const struct input_event* inputs, int count);
diff --git a/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
index 575e86d..a144bce 100644
--- a/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
@@ -57,7 +57,7 @@
KeyEventConverterEvdevTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// Set up pipe to satisfy message pump (unused).
int evdev_io[2];
@@ -69,7 +69,7 @@
modifiers_ = new ui::EventModifiersEvdev();
device_ = new ui::MockKeyEventConverterEvdev(events_in_, modifiers_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
delete device_;
delete modifiers_;
close(events_in_);
diff --git a/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h b/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h
index a67d037..c056496 100644
--- a/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h
+++ b/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h
@@ -42,7 +42,7 @@
~EventReaderLibevdevCros();
// EventConverterEvdev:
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanReadWithoutBlocking(int fd) override;
private:
static void OnSynReport(void* data,
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
index 1044a11..f097fb4 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
@@ -11,18 +11,16 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
+#include "ui/events/ozone/evdev/event_dispatch_callback.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
#include "ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h"
namespace ui {
-class Event;
class EventDeviceInfo;
class EventModifiersEvdev;
class CursorDelegateEvdev;
-typedef base::Callback<void(Event*)> EventDispatchCallback;
-
// Convert libevdev-cros events to ui::Events using libgestures.
//
// This builds a GestureInterpreter for an input device (touchpad or
@@ -46,10 +44,10 @@
// Overriden from ui::EventReaderLibevdevCros::Delegate
virtual void OnLibEvdevCrosOpen(Evdev* evdev,
- EventStateRec* evstate) OVERRIDE;
+ EventStateRec* evstate) override;
virtual void OnLibEvdevCrosEvent(Evdev* evdev,
EventStateRec* evstate,
- const timeval& time) OVERRIDE;
+ const timeval& time) override;
// Handler for gesture events generated from libgestures.
void OnGestureReady(const Gesture* gesture);
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
index f85e0fe..83aa13a 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
@@ -33,8 +33,8 @@
virtual ~TouchEventConverterEvdev();
// EventConverterEvdev:
- virtual bool HasTouchscreen() const OVERRIDE;
- virtual gfx::Size GetTouchscreenSize() const OVERRIDE;
+ virtual bool HasTouchscreen() const override;
+ virtual gfx::Size GetTouchscreenSize() const override;
private:
friend class MockTouchEventConverterEvdev;
@@ -43,7 +43,7 @@
void Init(const EventDeviceInfo& info);
// Overidden from base::MessagePumpLibevent::Watcher.
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanReadWithoutBlocking(int fd) override;
virtual bool Reinitialize();
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
index 95dc5c4..3e76476 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
@@ -59,7 +59,7 @@
new TouchEvent(*static_cast<TouchEvent*>(event)));
}
- virtual bool Reinitialize() OVERRIDE { return true; }
+ virtual bool Reinitialize() override { return true; }
private:
int read_pipe_;
@@ -120,7 +120,7 @@
TouchEventConverterEvdevTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// Set up pipe to satisfy message pump (unused).
int evdev_io[2];
if (pipe(evdev_io))
@@ -133,7 +133,7 @@
events_in_, base::FilePath(kTestDevicePath));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
delete device_;
delete loop_;
}
diff --git a/ui/events/platform/platform_event_source_unittest.cc b/ui/events/platform/platform_event_source_unittest.cc
index cdbd0c4..cc34960 100644
--- a/ui/events/platform/platform_event_source_unittest.cc
+++ b/ui/events/platform/platform_event_source_unittest.cc
@@ -65,7 +65,7 @@
}
// PlatformEventSource:
- virtual void StopCurrentEventStream() OVERRIDE {
+ virtual void StopCurrentEventStream() override {
stop_stream_ = true;
}
@@ -93,11 +93,11 @@
protected:
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE {
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE {
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
list_->push_back(id_);
return post_dispatch_action_;
}
@@ -123,11 +123,11 @@
protected:
// PlatformEventObserver:
- virtual void WillProcessEvent(const PlatformEvent& event) OVERRIDE {
+ virtual void WillProcessEvent(const PlatformEvent& event) override {
list_->push_back(id_);
}
- virtual void DidProcessEvent(const PlatformEvent& event) OVERRIDE {}
+ virtual void DidProcessEvent(const PlatformEvent& event) override {}
private:
int id_;
@@ -145,7 +145,7 @@
protected:
// testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
source_.reset(new TestPlatformEventSource());
}
@@ -342,7 +342,7 @@
protected:
// PlatformEventDispatcher:
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE {
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
if (!callback_.is_null())
callback_.Run();
return TestPlatformEventDispatcher::DispatchEvent(event);
@@ -530,7 +530,7 @@
: public PlatformEventTestWithMessageLoop {
public:
// PlatformEventTestWithMessageLoop:
- virtual void RunTestImpl() OVERRIDE {
+ virtual void RunTestImpl() override {
std::vector<int> list;
TestPlatformEventDispatcher dispatcher(10, &list);
TestPlatformEventObserver observer(15, &list);
@@ -581,11 +581,11 @@
private:
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE {
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE {
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
handler_.reset();
uint32_t action = TestPlatformEventDispatcher::DispatchEvent(event);
if (!callback_.is_null()) {
@@ -640,7 +640,7 @@
}
// PlatformEventTestWithMessageLoop:
- virtual void RunTestImpl() OVERRIDE {
+ virtual void RunTestImpl() override {
std::vector<int> list;
TestPlatformEventDispatcher dispatcher(10, &list);
TestPlatformEventObserver observer(15, &list);
@@ -740,7 +740,7 @@
}
// PlatformEventTestWithMessageLoop:
- virtual void RunTestImpl() OVERRIDE {
+ virtual void RunTestImpl() override {
std::vector<int> list;
TestPlatformEventDispatcher dispatcher(10, &list);
TestPlatformEventObserver observer(15, &list);
diff --git a/ui/events/platform/x11/x11_event_source.h b/ui/events/platform/x11/x11_event_source.h
index 598afa8..206ca5a 100644
--- a/ui/events/platform/x11/x11_event_source.h
+++ b/ui/events/platform/x11/x11_event_source.h
@@ -48,8 +48,8 @@
private:
// PlatformEventSource:
- virtual uint32_t DispatchEvent(XEvent* xevent) OVERRIDE;
- virtual void StopCurrentEventStream() OVERRIDE;
+ virtual uint32_t DispatchEvent(XEvent* xevent) override;
+ virtual void StopCurrentEventStream() override;
// The connection to the X11 server used to receive the events.
XDisplay* display_;
diff --git a/ui/events/platform/x11/x11_event_source_libevent.cc b/ui/events/platform/x11/x11_event_source_libevent.cc
index d92e12a..8ad7931 100644
--- a/ui/events/platform/x11/x11_event_source_libevent.cc
+++ b/ui/events/platform/x11/x11_event_source_libevent.cc
@@ -39,16 +39,16 @@
}
// PlatformEventSource:
- virtual void OnDispatcherListChanged() OVERRIDE {
+ virtual void OnDispatcherListChanged() override {
AddEventWatcher();
}
// base::MessagePumpLibevent::Watcher:
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE {
+ virtual void OnFileCanReadWithoutBlocking(int fd) override {
DispatchXEvents();
}
- virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE {
+ virtual void OnFileCanWriteWithoutBlocking(int fd) override {
NOTREACHED();
}
diff --git a/ui/events/test/mock_motion_event.h b/ui/events/test/mock_motion_event.h
index 9ae9a71..5c34b71 100644
--- a/ui/events/test/mock_motion_event.h
+++ b/ui/events/test/mock_motion_event.h
@@ -40,8 +40,8 @@
virtual ~MockMotionEvent();
// MotionEvent methods.
- virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
- virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
+ virtual scoped_ptr<MotionEvent> Clone() const override;
+ virtual scoped_ptr<MotionEvent> Cancel() const override;
// Utility methods.
void PressPoint(float x, float y);
diff --git a/ui/events/test/platform_event_waiter.h b/ui/events/test/platform_event_waiter.h
index 259662c..647a011 100644
--- a/ui/events/test/platform_event_waiter.h
+++ b/ui/events/test/platform_event_waiter.h
@@ -23,8 +23,8 @@
virtual ~PlatformEventWaiter();
// PlatformEventObserver:
- virtual void WillProcessEvent(const PlatformEvent& event) OVERRIDE;
- virtual void DidProcessEvent(const PlatformEvent& event) OVERRIDE;
+ virtual void WillProcessEvent(const PlatformEvent& event) override;
+ virtual void DidProcessEvent(const PlatformEvent& event) override;
base::Closure success_callback_;
PlatformEventMatcher event_matcher_;
diff --git a/ui/events/test/test_event_handler.h b/ui/events/test/test_event_handler.h
index 8937b25..d501233 100644
--- a/ui/events/test/test_event_handler.h
+++ b/ui/events/test/test_event_handler.h
@@ -40,11 +40,11 @@
}
// EventHandler overrides:
- virtual void OnKeyEvent(KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(KeyEvent* event) override;
+ virtual void OnMouseEvent(MouseEvent* event) override;
+ virtual void OnScrollEvent(ScrollEvent* event) override;
+ virtual void OnTouchEvent(TouchEvent* event) override;
+ virtual void OnGestureEvent(GestureEvent* event) override;
private:
// How many events have been received of each type?
diff --git a/ui/events/test/test_event_processor.h b/ui/events/test/test_event_processor.h
index 5b9a99b..1e42aa1 100644
--- a/ui/events/test/test_event_processor.h
+++ b/ui/events/test/test_event_processor.h
@@ -32,11 +32,11 @@
void Reset();
// EventProcessor:
- virtual bool CanDispatchToTarget(EventTarget* target) OVERRIDE;
- virtual EventTarget* GetRootTarget() OVERRIDE;
- virtual EventDispatchDetails OnEventFromSource(Event* event) OVERRIDE;
- virtual void OnEventProcessingStarted(Event* event) OVERRIDE;
- virtual void OnEventProcessingFinished(Event* event) OVERRIDE;
+ virtual bool CanDispatchToTarget(EventTarget* target) override;
+ virtual EventTarget* GetRootTarget() override;
+ virtual EventDispatchDetails OnEventFromSource(Event* event) override;
+ virtual void OnEventProcessingStarted(Event* event) override;
+ virtual void OnEventProcessingFinished(Event* event) override;
private:
scoped_ptr<EventTarget> root_;
diff --git a/ui/events/test/test_event_target.h b/ui/events/test/test_event_target.h
index 368e295..cadcfa9 100644
--- a/ui/events/test/test_event_target.h
+++ b/ui/events/test/test_event_target.h
@@ -54,13 +54,13 @@
bool Contains(TestEventTarget* target) const;
// EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
- virtual EventTarget* GetParentTarget() OVERRIDE;
- virtual scoped_ptr<EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual EventTargeter* GetEventTargeter() OVERRIDE;
+ virtual bool CanAcceptEvent(const ui::Event& event) override;
+ virtual EventTarget* GetParentTarget() override;
+ virtual scoped_ptr<EventTargetIterator> GetChildIterator() const override;
+ virtual EventTargeter* GetEventTargeter() override;
// EventHandler:
- virtual void OnEvent(Event* event) OVERRIDE;
+ virtual void OnEvent(Event* event) override;
private:
void set_parent(TestEventTarget* parent) { parent_ = parent; }
diff --git a/ui/events/x/events_x_unittest.cc b/ui/events/x/events_x_unittest.cc
index d8e2c83..32b121c 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -85,7 +85,7 @@
EventsXTest() {}
virtual ~EventsXTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
DeviceDataManagerX11::CreateInstance();
ui::TouchFactory::GetInstance()->ResetForTest();
}
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/bottom_base_center.png b/ui/file_manager/audio_player/assets/100/bottom_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/bottom_base_center.png
rename to ui/file_manager/audio_player/assets/100/bottom_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/bottom_base_left.png b/ui/file_manager/audio_player/assets/100/bottom_base_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/bottom_base_left.png
rename to ui/file_manager/audio_player/assets/100/bottom_base_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/bottom_base_right.png b/ui/file_manager/audio_player/assets/100/bottom_base_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/bottom_base_right.png
rename to ui/file_manager/audio_player/assets/100/bottom_base_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_next.png b/ui/file_manager/audio_player/assets/100/player_button_next.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_next.png
rename to ui/file_manager/audio_player/assets/100/player_button_next.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_pause.png b/ui/file_manager/audio_player/assets/100/player_button_pause.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_pause.png
rename to ui/file_manager/audio_player/assets/100/player_button_pause.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_play.png b/ui/file_manager/audio_player/assets/100/player_button_play.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_play.png
rename to ui/file_manager/audio_player/assets/100/player_button_play.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_playlist.png b/ui/file_manager/audio_player/assets/100/player_button_playlist.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_playlist.png
rename to ui/file_manager/audio_player/assets/100/player_button_playlist.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_playlist_active.png b/ui/file_manager/audio_player/assets/100/player_button_playlist_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_playlist_active.png
rename to ui/file_manager/audio_player/assets/100/player_button_playlist_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_pressed.png b/ui/file_manager/audio_player/assets/100/player_button_pressed.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_pressed.png
rename to ui/file_manager/audio_player/assets/100/player_button_pressed.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_previous.png b/ui/file_manager/audio_player/assets/100/player_button_previous.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_previous.png
rename to ui/file_manager/audio_player/assets/100/player_button_previous.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_repeat.png b/ui/file_manager/audio_player/assets/100/player_button_repeat.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_repeat.png
rename to ui/file_manager/audio_player/assets/100/player_button_repeat.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_repeat_active.png b/ui/file_manager/audio_player/assets/100/player_button_repeat_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_repeat_active.png
rename to ui/file_manager/audio_player/assets/100/player_button_repeat_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_shuffle.png b/ui/file_manager/audio_player/assets/100/player_button_shuffle.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_shuffle.png
rename to ui/file_manager/audio_player/assets/100/player_button_shuffle.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_shuffle_active.png b/ui/file_manager/audio_player/assets/100/player_button_shuffle_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_shuffle_active.png
rename to ui/file_manager/audio_player/assets/100/player_button_shuffle_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_volume.png b/ui/file_manager/audio_player/assets/100/player_button_volume.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_volume.png
rename to ui/file_manager/audio_player/assets/100/player_button_volume.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_button_volume_active.png b/ui/file_manager/audio_player/assets/100/player_button_volume_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_button_volume_active.png
rename to ui/file_manager/audio_player/assets/100/player_button_volume_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_center.png b/ui/file_manager/audio_player/assets/100/player_timeline_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_center.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_left.png b/ui/file_manager/audio_player/assets/100/player_timeline_base_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_left.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_base_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_right.png b/ui/file_manager/audio_player/assets/100/player_timeline_base_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_base_right.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_base_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_handler.png b/ui/file_manager/audio_player/assets/100/player_timeline_handler.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_handler.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_handler.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_handler_pressed.png b/ui/file_manager/audio_player/assets/100/player_timeline_handler_pressed.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_handler_pressed.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_handler_pressed.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_center.png b/ui/file_manager/audio_player/assets/100/player_timeline_played_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_center.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_played_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_left.png b/ui/file_manager/audio_player/assets/100/player_timeline_played_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_left.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_played_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_right.png b/ui/file_manager/audio_player/assets/100/player_timeline_played_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_timeline_played_right.png
rename to ui/file_manager/audio_player/assets/100/player_timeline_played_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_bottom.png b/ui/file_manager/audio_player/assets/100/player_volume_base_bottom.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_bottom.png
rename to ui/file_manager/audio_player/assets/100/player_volume_base_bottom.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_center.png b/ui/file_manager/audio_player/assets/100/player_volume_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_center.png
rename to ui/file_manager/audio_player/assets/100/player_volume_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_top.png b/ui/file_manager/audio_player/assets/100/player_volume_base_top.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_base_top.png
rename to ui/file_manager/audio_player/assets/100/player_volume_base_top.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_bottom.png b/ui/file_manager/audio_player/assets/100/player_volume_level_bottom.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_bottom.png
rename to ui/file_manager/audio_player/assets/100/player_volume_level_bottom.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_center.png b/ui/file_manager/audio_player/assets/100/player_volume_level_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_center.png
rename to ui/file_manager/audio_player/assets/100/player_volume_level_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_top.png b/ui/file_manager/audio_player/assets/100/player_volume_level_top.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/100/player_volume_level_top.png
rename to ui/file_manager/audio_player/assets/100/player_volume_level_top.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/bottom_base_center.png b/ui/file_manager/audio_player/assets/200/bottom_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/bottom_base_center.png
rename to ui/file_manager/audio_player/assets/200/bottom_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/bottom_base_left.png b/ui/file_manager/audio_player/assets/200/bottom_base_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/bottom_base_left.png
rename to ui/file_manager/audio_player/assets/200/bottom_base_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/bottom_base_right.png b/ui/file_manager/audio_player/assets/200/bottom_base_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/bottom_base_right.png
rename to ui/file_manager/audio_player/assets/200/bottom_base_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_next.png b/ui/file_manager/audio_player/assets/200/player_button_next.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_next.png
rename to ui/file_manager/audio_player/assets/200/player_button_next.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_pause.png b/ui/file_manager/audio_player/assets/200/player_button_pause.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_pause.png
rename to ui/file_manager/audio_player/assets/200/player_button_pause.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_play.png b/ui/file_manager/audio_player/assets/200/player_button_play.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_play.png
rename to ui/file_manager/audio_player/assets/200/player_button_play.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_playlist.png b/ui/file_manager/audio_player/assets/200/player_button_playlist.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_playlist.png
rename to ui/file_manager/audio_player/assets/200/player_button_playlist.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_playlist_active.png b/ui/file_manager/audio_player/assets/200/player_button_playlist_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_playlist_active.png
rename to ui/file_manager/audio_player/assets/200/player_button_playlist_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_pressed.png b/ui/file_manager/audio_player/assets/200/player_button_pressed.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_pressed.png
rename to ui/file_manager/audio_player/assets/200/player_button_pressed.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_previous.png b/ui/file_manager/audio_player/assets/200/player_button_previous.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_previous.png
rename to ui/file_manager/audio_player/assets/200/player_button_previous.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_repeat.png b/ui/file_manager/audio_player/assets/200/player_button_repeat.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_repeat.png
rename to ui/file_manager/audio_player/assets/200/player_button_repeat.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_repeat_active.png b/ui/file_manager/audio_player/assets/200/player_button_repeat_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_repeat_active.png
rename to ui/file_manager/audio_player/assets/200/player_button_repeat_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_shuffle.png b/ui/file_manager/audio_player/assets/200/player_button_shuffle.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_shuffle.png
rename to ui/file_manager/audio_player/assets/200/player_button_shuffle.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_shuffle_active.png b/ui/file_manager/audio_player/assets/200/player_button_shuffle_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_shuffle_active.png
rename to ui/file_manager/audio_player/assets/200/player_button_shuffle_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_volume.png b/ui/file_manager/audio_player/assets/200/player_button_volume.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_volume.png
rename to ui/file_manager/audio_player/assets/200/player_button_volume.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_button_volume_active.png b/ui/file_manager/audio_player/assets/200/player_button_volume_active.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_button_volume_active.png
rename to ui/file_manager/audio_player/assets/200/player_button_volume_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_center.png b/ui/file_manager/audio_player/assets/200/player_timeline_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_center.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_left.png b/ui/file_manager/audio_player/assets/200/player_timeline_base_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_left.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_base_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_right.png b/ui/file_manager/audio_player/assets/200/player_timeline_base_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_base_right.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_base_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_handler.png b/ui/file_manager/audio_player/assets/200/player_timeline_handler.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_handler.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_handler.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_handler_pressed.png b/ui/file_manager/audio_player/assets/200/player_timeline_handler_pressed.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_handler_pressed.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_handler_pressed.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_center.png b/ui/file_manager/audio_player/assets/200/player_timeline_played_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_center.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_played_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_left.png b/ui/file_manager/audio_player/assets/200/player_timeline_played_left.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_left.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_played_left.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_right.png b/ui/file_manager/audio_player/assets/200/player_timeline_played_right.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_timeline_played_right.png
rename to ui/file_manager/audio_player/assets/200/player_timeline_played_right.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_bottom.png b/ui/file_manager/audio_player/assets/200/player_volume_base_bottom.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_bottom.png
rename to ui/file_manager/audio_player/assets/200/player_volume_base_bottom.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_center.png b/ui/file_manager/audio_player/assets/200/player_volume_base_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_center.png
rename to ui/file_manager/audio_player/assets/200/player_volume_base_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_top.png b/ui/file_manager/audio_player/assets/200/player_volume_base_top.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_base_top.png
rename to ui/file_manager/audio_player/assets/200/player_volume_base_top.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_bottom.png b/ui/file_manager/audio_player/assets/200/player_volume_level_bottom.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_bottom.png
rename to ui/file_manager/audio_player/assets/200/player_volume_level_bottom.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_center.png b/ui/file_manager/audio_player/assets/200/player_volume_level_center.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_center.png
rename to ui/file_manager/audio_player/assets/200/player_volume_level_center.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_top.png b/ui/file_manager/audio_player/assets/200/player_volume_level_top.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/assets/200/player_volume_level_top.png
rename to ui/file_manager/audio_player/assets/200/player_volume_level_top.png
Binary files differ
diff --git a/ui/file_manager/audio_player/audio_player.html b/ui/file_manager/audio_player/audio_player.html
new file mode 100644
index 0000000..974ab37
--- /dev/null
+++ b/ui/file_manager/audio_player/audio_player.html
@@ -0,0 +1,206 @@
+<!--
+ -- Copyright 2014 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.
+ -->
+<!DOCTYPE HTML>
+<html>
+<head>
+ <!-- We have to set some default title, or chrome will use the page name.
+ -- As soon as the i18n'd strings are loaded we replace it with the correct
+ -- string. Until then, use an invisible non-whitespace character.
+ -->
+ <title></title>
+ <link rel="stylesheet" type="text/css" href="css/audio_player.css">
+
+ <!-- Don't load mediaplayer_scripts.js when flattening is disabled -->
+ <if expr="False"><!-- </if>
+ <script src="js/audio_player_scripts.js"></script>
+ <if expr="False"> --></if>
+ <if expr="False">
+ <!-- This section is used when the file manager is loaded with
+ 'filemgr-ext-path' command-line flag. -->
+ <!-- Keep the list in sync with audio_player_scripts.js. -->
+ <script src="../../webui//resources/js/cr.js"></script>
+ <script src="../../webui/resources/js/cr/event_target.js"></script>
+ <script src="../../webui/resources/js/cr/ui/array_data_model.js">
+ </script>
+
+ <script src="../../../third_party/polymer/platform/platform.js"></script>
+ <script src="../../../third_party/polymer/polymer/polymer.js"></script>
+
+ <script src="../file_manager/common/js/async_util.js"></script>
+ <script src="../file_manager/common/js/util.js"></script>
+ <script src="../file_manager/common/js/volume_manager_common.js"></script>
+ <script src="../file_manager/foreground/js/file_type.js"></script>
+ <script src="../file_manager/foreground/js/volume_manager_wrapper.js"></script>
+ <script src="../file_manager/foreground/js/metadata/metadata_cache.js"></script>
+
+ <script src="js/audio_player.js"></script>
+
+ <script src="elements/track_list.js"></script>
+ <script src="elements/control_panel.js"></script>
+ <script src="elements/volume_controller.js"></script>
+ <script src="elements/audio_player.js"></script>
+ </if>
+ </head>
+<body>
+ <!-- Definition of <track-list> tag. -->
+ <polymer-element name="track-list" attributes="tracks">
+ <template>
+ <link rel="stylesheet" href="elements/track_list.css"></link>
+ <template id="tracks" repeat="{{track, index in tracks}}">
+ <div class="track" active?="{{track.active}}" index="{{index}}" on-click="{{trackClicked}}">
+ <div class="data">
+ <div class="data-title">{{track.title}}</div>
+ <div class="data-artist">{{track.artist}}</div>
+ </div>
+ </div>
+ </template>
+ </template>
+ </polymer-element>
+
+ <!-- Definition of <control-panel> tag. -->
+ <polymer-element name="control-panel">
+ <template>
+ <link rel="stylesheet" href="elements/control_panel.css"></link>
+
+ <div class="controls">
+ <div class="upper-controls time-controls">
+ <div class="time media-control">
+ <div class="current">{{timeString_}}</div>
+ </div>
+ <div class="progress media-control custom-slider">
+ <input name="timeInput"
+ type="range"
+ min="0" max="{{duration}}" value="{{time}}">
+ <div class="bar">
+ <div class="filled" style="width: {{time/duration*100}}%;"></div>
+ <div class="cap left"></div>
+ <div class="cap right"></div>
+ </div>
+ </div>
+ <div class="time media-control">
+ <div class="duration">{{durationString_}}</div>
+ </div>
+ </div>
+ <div class="lower-controls audio-controls">
+ <!-- Shuffle toggle button in the bottom line. -->
+ <button class="shuffle-mode media-button toggle" state="default">
+ <label>
+ <input id="shuffleCheckbox"
+ type="checkbox"
+ checked="{{model.shuffle}}"></input>
+ <span class="icon"></span>
+ </label>
+ </button>
+
+ <!-- Repeat toggle button in the bottom line. -->
+ <button class="repeat media-button toggle" state="default">
+ <label>
+ <input id="repeatCheckbox"
+ type="checkbox"
+ checked="{{model.repeat}}"></input>
+ <span class="icon"></span>
+ </label>
+ </button>
+
+ <!-- Prev button in the bottom line. -->
+ <button class="previous media-button"
+ state="default"
+ on-click="{{previousClick}}">
+ <div class="normal default"></div>
+ <div class="disabled"></div>
+ </button>
+
+ <!-- Play button in the bottom line. -->
+ <button class="play media-control media-button"
+ state='{{playing ? "playing" : "ended"}}'
+ on-click="{{playClick}}">
+ <div class="normal playing"></div>
+ <div class="normal ended"></div>
+ <div class="disabled"></div>
+ </button>
+
+ <!-- Next button in the bottom line. -->
+ <button class="next media-button"
+ state="default"
+ on-click="{{nextClick}}">
+ <div class="normal default"></div>
+ <div class="disabled"></div>
+ </button>
+
+ <div id="volumeContainer"
+ class="default-hidden"
+ anchor-point="bottom center">
+ <volume-controller id="volumeSlider"
+ width="32" height="85" value="50">
+ </volume-controller>
+
+ <polymer-anchor-point id="anchorHelper"></polymer-anchor-point>
+ </div>
+
+ <!-- Volume button in the bottom line. -->
+ <button id="volumeButton"
+ class="volume media-button toggle"
+ state="default"
+ on-click="{{volumeButtonClick}}"
+ anchor-point="bottom center">
+ <label>
+ <input type="checkbox" checked="{{volumeSliderShown}}"></input>
+ <span class="icon"></span>
+ </label>
+ </button>
+
+ <!-- Playlist button in the bottom line. -->
+ <button id="playlistButton"
+ class="playlist media-button toggle"
+ state="default">
+ <label>
+ <input type="checkbox" checked="{{model.expanded}}"></input>
+ <span class="icon"></span>
+ </label>
+ </button>
+ </div>
+ </div>
+ </template>
+ </polymer-element>
+
+ <!-- Definition of <volume-controller> tag. -->
+ <polymer-element name="volume-controller" attributes="width height value">
+ <template>
+ <link rel="stylesheet" href="elements/volume_controller.css"></link>
+
+ <div id="background"></div>
+ <input name="rawValueInput" id="rawValueInput"
+ type="range" min="0" max="100" value="{{rawValue}}">
+ <div id="bar">
+ <div class="filled" style="height: {{rawValue}}%;"></div>
+ <div class="cap left"></div>
+ <div class="cap right"></div>
+ </div>
+ </template>
+ </polymer-element>
+
+ <!-- Definition of <audio-player> tag. -->
+ <polymer-element name="audio-player"
+ attributes="playing currenttrackurl playcount">
+ <template>
+ <link rel="stylesheet" href="elements/audio_player.css"></link>
+
+ <track-list id="trackList" expanded?="{{model.expanded}}"
+ on-replay="{{onReplayCurrentTrack}}"></track-list>
+ <control-panel id="audioController"
+ on-next-clicked="{{onControllerNextClicked}}"
+ on-previous-clicked="{{onControllerPreviousClicked}}">
+ </control-panel>
+ <audio id="audio"></audio>
+ </template>
+ </polymer-element>
+
+ <div class="audio-player">
+ <!-- Place the audio player. -->
+ <audio-player></audio-player>
+ </div>
+</body>
+</html>
diff --git a/ui/file_manager/file_manager/audio_player/css/audio_player.css b/ui/file_manager/audio_player/css/audio_player.css
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/css/audio_player.css
rename to ui/file_manager/audio_player/css/audio_player.css
diff --git a/ui/file_manager/file_manager/audio_player/elements/audio_player.css b/ui/file_manager/audio_player/elements/audio_player.css
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/audio_player.css
rename to ui/file_manager/audio_player/elements/audio_player.css
diff --git a/ui/file_manager/file_manager/audio_player/elements/audio_player.js b/ui/file_manager/audio_player/elements/audio_player.js
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/audio_player.js
rename to ui/file_manager/audio_player/elements/audio_player.js
diff --git a/ui/file_manager/file_manager/audio_player/elements/control_panel.css b/ui/file_manager/audio_player/elements/control_panel.css
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/control_panel.css
rename to ui/file_manager/audio_player/elements/control_panel.css
diff --git a/ui/file_manager/file_manager/audio_player/elements/control_panel.js b/ui/file_manager/audio_player/elements/control_panel.js
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/control_panel.js
rename to ui/file_manager/audio_player/elements/control_panel.js
diff --git a/ui/file_manager/file_manager/audio_player/elements/track_list.css b/ui/file_manager/audio_player/elements/track_list.css
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/track_list.css
rename to ui/file_manager/audio_player/elements/track_list.css
diff --git a/ui/file_manager/file_manager/audio_player/elements/track_list.js b/ui/file_manager/audio_player/elements/track_list.js
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/track_list.js
rename to ui/file_manager/audio_player/elements/track_list.js
diff --git a/ui/file_manager/file_manager/audio_player/elements/volume_controller.css b/ui/file_manager/audio_player/elements/volume_controller.css
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/volume_controller.css
rename to ui/file_manager/audio_player/elements/volume_controller.css
diff --git a/ui/file_manager/file_manager/audio_player/elements/volume_controller.js b/ui/file_manager/audio_player/elements/volume_controller.js
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/elements/volume_controller.js
rename to ui/file_manager/audio_player/elements/volume_controller.js
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-128.png b/ui/file_manager/audio_player/icons/audio-player-128.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-128.png
rename to ui/file_manager/audio_player/icons/audio-player-128.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-256.png b/ui/file_manager/audio_player/icons/audio-player-256.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-256.png
rename to ui/file_manager/audio_player/icons/audio-player-256.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-32.png b/ui/file_manager/audio_player/icons/audio-player-32.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-32.png
rename to ui/file_manager/audio_player/icons/audio-player-32.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-48.png b/ui/file_manager/audio_player/icons/audio-player-48.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-48.png
rename to ui/file_manager/audio_player/icons/audio-player-48.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-64.png b/ui/file_manager/audio_player/icons/audio-player-64.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-64.png
rename to ui/file_manager/audio_player/icons/audio-player-64.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-96.png b/ui/file_manager/audio_player/icons/audio-player-96.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-96.png
rename to ui/file_manager/audio_player/icons/audio-player-96.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-favicon-16.png b/ui/file_manager/audio_player/icons/audio-player-favicon-16.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-favicon-16.png
rename to ui/file_manager/audio_player/icons/audio-player-favicon-16.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/icons/audio-player-favicon-32.png b/ui/file_manager/audio_player/icons/audio-player-favicon-32.png
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/icons/audio-player-favicon-32.png
rename to ui/file_manager/audio_player/icons/audio-player-favicon-32.png
Binary files differ
diff --git a/ui/file_manager/file_manager/audio_player/js/audio_player.js b/ui/file_manager/audio_player/js/audio_player.js
similarity index 98%
rename from ui/file_manager/file_manager/audio_player/js/audio_player.js
rename to ui/file_manager/audio_player/js/audio_player.js
index a9a053f..932dee3 100644
--- a/ui/file_manager/file_manager/audio_player/js/audio_player.js
+++ b/ui/file_manager/audio_player/js/audio_player.js
@@ -5,6 +5,13 @@
'use strict';
/**
+ * Overrided metadata worker's path.
+ * @type {string}
+ * @const
+ */
+ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
+
+/**
* @param {HTMLElement} container Container element.
* @constructor
*/
diff --git a/ui/file_manager/file_manager/audio_player/js/audio_player_model.js b/ui/file_manager/audio_player/js/audio_player_model.js
similarity index 100%
rename from ui/file_manager/file_manager/audio_player/js/audio_player_model.js
rename to ui/file_manager/audio_player/js/audio_player_model.js
diff --git a/ui/file_manager/audio_player/js/audio_player_scripts.js b/ui/file_manager/audio_player/js/audio_player_scripts.js
new file mode 100644
index 0000000..5d730cf
--- /dev/null
+++ b/ui/file_manager/audio_player/js/audio_player_scripts.js
@@ -0,0 +1,46 @@
+// Copyright 2014 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.
+
+<include src="../../../webui/resources/js/cr.js"/>
+<include src="../../../webui/resources/js/cr/event_target.js"/>
+<include src="../../../webui/resources/js/cr/ui/array_data_model.js"/>
+
+// Hack for polymer, notifying that CSP is enabled here.
+// TODO(yoshiki): Find a way to remove the hack.
+if (!('securityPolicy' in document))
+ document['securityPolicy'] = {};
+if (!('allowsEval' in document.securityPolicy))
+ document.securityPolicy['allowsEval'] = false;
+
+// Force Polymer into dirty-checking mode, see http://crbug.com/351967
+Object['observe'] = undefined;
+
+<include src="../../../../third_party/polymer/components/platform/platform.js">
+<include src="../../../../third_party/polymer/components/polymer/polymer.js">
+
+(function() {
+
+// 'strict mode' is invoked for this scope.
+'use strict';
+
+<include src="../../file_manager/common/js/async_util.js"/>
+<include src="../../file_manager/common/js/util.js"/>
+<include src="../../file_manager/common/js/volume_manager_common.js"/>
+<include src="../../file_manager/foreground/js/file_type.js"/>
+<include src="../../file_manager/foreground/js/volume_manager_wrapper.js">
+<include src="../../file_manager/foreground/js/metadata/metadata_cache.js"/>
+
+<include src="audio_player.js"/>
+<include src="audio_player_model.js"/>
+
+<include src="../elements/track_list.js"/>
+<include src="../elements/control_panel.js"/>
+<include src="../elements/volume_controller.js"/>
+<include src="../elements/audio_player.js"/>
+
+window.reload = reload;
+window.unload = unload;
+window.AudioPlayer = AudioPlayer;
+
+})();
diff --git a/ui/file_manager/audio_player/js/background.js b/ui/file_manager/audio_player/js/background.js
new file mode 100644
index 0000000..23cf74c
--- /dev/null
+++ b/ui/file_manager/audio_player/js/background.js
@@ -0,0 +1,166 @@
+// Copyright 2014 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.
+
+'use strict';
+
+/**
+ * Icon of the audio player.
+ * TODO(yoshiki): Consider providing an exact size icon, instead of relying
+ * on downsampling by ash.
+ *
+ * @type {string}
+ * @const
+ */
+var AUDIO_PLAYER_ICON = 'audio_player/icons/audio-player-64.png';
+
+/**
+ * Configuration of the audio player panel.
+ * @type {Object}
+ */
+var audioPlayerCreateOptions = {
+ id: 'audio-player',
+ type: 'panel',
+ minHeight: 44 + 73, // 44px: track, 73px: controller
+ minWidth: 292,
+ height: 44 + 73, // collapsed
+ width: 292
+};
+
+/**
+ * Backgound object. This is necessary for AppWindowWrapper.
+ * @type {BackgroundBase}
+ */
+var background = new BackgroundBase();
+
+/**
+ * Wrapper of audio player window.
+ * @type {SingletonAppWindowWrapper}
+ */
+var audioPlayer = new SingletonAppWindowWrapper('audio_player.html',
+ audioPlayerCreateOptions);
+
+/**
+ * Queue to serialize initialization.
+ * @type {AsyncUtil.Queue}
+ */
+var initializeQueue = new AsyncUtil.Queue();
+
+// Initializes the strings. This needs for the volume manager.
+initializeQueue.run(function(fulfill) {
+ chrome.fileManagerPrivate.getStrings(function(stringData) {
+ loadTimeData.data = stringData;
+ fulfill();
+ });
+});
+
+// Initializes the volume manager. This needs for isolated entries.
+initializeQueue.run(function(fulfill) {
+ VolumeManager.getInstance(fulfill);
+});
+
+// Registers the handlers.
+chrome.app.runtime.onLaunched.addListener(onLaunched);
+chrome.app.runtime.onRestarted.addListener(onRestarted);
+
+/**
+ * Called when an app is launched.
+ * @param {Object} launchData Launch data.
+ */
+function onLaunched(launchData) {
+ if (!launchData || !launchData.items || launchData.items.length == 0)
+ return;
+
+ var playlist = {};
+
+ initializeQueue.run(function(fulfill) {
+ var isolatedEntries = launchData.items.map(function(item) {
+ return item.entry;
+ });
+
+ chrome.fileManagerPrivate.resolveIsolatedEntries(isolatedEntries,
+ function(externalEntries) {
+ var urls = util.entriesToURLs(externalEntries);
+ playlist = {items: urls, position: 0};
+ fulfill();
+ });
+ });
+
+ initializeQueue.run(function(fulfill) {
+ open(playlist, false);
+ fulfill();
+ });
+}
+
+/**
+ * Called when an app is restarted.
+ */
+function onRestarted() {
+ audioPlayer.reopen(function() {
+ // If the audioPlayer is reopened, change its window's icon. Otherwise
+ // there is no reopened window so just skip the call of setIcon.
+ if (audioPlayer.rawAppWindow)
+ audioPlayer.setIcon(AUDIO_PLAYER_ICON);
+ });
+}
+
+/**
+ * Opens player window.
+ * @param {Object} playlist List of audios to play and index to start playing.
+ * @param {Promise} Promise to be fulfilled on success, or rejected on error.
+ */
+function open(playlist, reopen) {
+ var items = playlist.items;
+ var position = playlist.position;
+ var startUrl = (position < items.length) ? items[position] : '';
+
+ return new Promise(function(fulfill, reject) {
+ if (items.length === 0) {
+ reject('No file to open.');
+ return;
+ }
+
+ // Gets the current list of the children of the parent.
+ window.webkitResolveLocalFileSystemURL(items[0], function(fileEntry) {
+ fileEntry.getParent(function(parentEntry) {
+ var dirReader = parentEntry.createReader();
+ var entries = [];
+
+ // Call the reader.readEntries() until no more results are returned.
+ var readEntries = function() {
+ dirReader.readEntries(function(results) {
+ if (!results.length) {
+ fulfill(entries.sort(util.compareName));
+ } else {
+ entries = entries.concat(Array.prototype.slice.call(results, 0));
+ readEntries();
+ }
+ }, reject);
+ };
+
+ // Start reading.
+ readEntries();
+ }, reject);
+ }, reject);
+ }).then(function(entries) {
+ // Omits non-audio files.
+ var audioEntries = entries.filter(FileType.isAudio);
+
+ // Adjusts the position to start playing.
+ var maybePosition = util.entriesToURLs(audioEntries).indexOf(startUrl);
+ if (maybePosition !== -1)
+ position = maybePosition;
+
+ // Opens the audio player panel.
+ return new Promise(function(fulfill, reject) {
+ var urls = util.entriesToURLs(audioEntries);
+ audioPlayer.launch({items: urls, position: position}, reopen, fulfill);
+ });
+ }).then(function() {
+ audioPlayer.setIcon('icons/audio-player-64.png');
+ AppWindowWrapper.focusOnDesktop(audioPlayer.rawAppWindow);
+ }).catch(function(error) {
+ console.error('Launch failed' + error.stack || error);
+ return Promise.reject(error);
+ });
+}
diff --git a/ui/file_manager/audio_player/js/metadata_worker.js b/ui/file_manager/audio_player/js/metadata_worker.js
new file mode 100644
index 0000000..56ea36c
--- /dev/null
+++ b/ui/file_manager/audio_player/js/metadata_worker.js
@@ -0,0 +1,10 @@
+// Copyright 2014 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.
+
+'use strict';
+
+// Load the worker script of Files.app.
+importScripts(
+ 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'foreground/js/metadata/metadata_dispatcher.js');
diff --git a/ui/file_manager/audio_player/manifest.json b/ui/file_manager/audio_player/manifest.json
new file mode 100644
index 0000000..a5565c2
--- /dev/null
+++ b/ui/file_manager/audio_player/manifest.json
@@ -0,0 +1,68 @@
+{
+ // chrome-extension://cjbfomnbifhcdnihkgipgfcihmgjfhbf/
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsU2jLo1oiASjXO+/+qYfgojW4Y5TCIBNFzcAdxaF78BRteygWkJqbUVyGZxtSk/RDe3NdNyQCxsyU1YfYXZQvGRNDwKw5tzGyE4dcedveipaJW174VGd3GViS0WWist3HRxfYRZvRP5E8l/4NxXB0+crfq2WolO8La25js1QkCsggQ1lC8g24NRrPnTAWZxvSD6L64R0UoVoe68HdC4mRISe9/OqjyiAfb4Ajgooq8dyzkV8AJTKRjFTmYPlcc5Ba21rXzRt22TnDh2U38m/OEvTu69cyTIxAkBjUa/2gu7N588k9XzaMhTjiolSWxBDQuLZRp8fNjO0R27jouo3FwIDAQAB",
+ "manifest_version": 2,
+ "name": "Audio Player",
+ "version": "1.0",
+ "description": "Audio Player",
+ "display_in_launcher": false,
+ "incognito" : "split",
+ "icons": {
+ "16": "icons/audio-player-favicon-16.png",
+ "32": "icons/audio-player-32.png",
+ "48": "icons/audio-player-48.png",
+ "64": "icons/audio-player-64.png",
+ "96": "icons/audio-player-96.png",
+ "128": "icons/audio-player-128.png",
+ "256": "icons/audio-player-256.png"
+ },
+ "permissions": [
+ "commandLinePrivate",
+ "fileSystem",
+ "fileBrowserHandler",
+ "fileManagerPrivate",
+ "fullscreen",
+ "mediaPlayerPrivate",
+ "power",
+ "storage",
+ "chrome://resources/",
+ "chrome://theme/"
+ ],
+ "file_handlers": {
+ "audio": {
+ "types": [
+ "audio/*"
+ ],
+ "extensions": [
+ "amr",
+ "flac",
+ "m4a",
+ "mp3",
+ "oga",
+ "ogg",
+ "wav"
+ ]
+ }
+ },
+ "app": {
+ "background": {
+ "scripts": [
+ "chrome://resources/js/cr.js",
+ "chrome://resources/js/cr/event_target.js",
+ "chrome://resources/js/cr/ui/array_data_model.js",
+ "chrome://resources/js/load_time_data.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/common/js/util.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/common/js/async_util.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/common/js/volume_manager_common.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/background/js/app_window_wrapper.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/background/js/background_base.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/background/js/test_util.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/background/js/volume_manager.js",
+ "chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/foreground/js/file_type.js",
+ // The main background script must be at the end.
+ "js/background.js"
+ ]
+ },
+ "content_security_policy": "default-src 'none'; script-src 'self' chrome://resources chrome-extension://boadgeojelhgndaghljhdicfkmllpafd chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj chrome-extension://enhhojjnijigcajfphajepfemndkmdlo; style-src 'self' chrome://resources 'unsafe-inline'; img-src 'self' chrome://theme chrome://resources data: https://www.googledrive.com; media-src 'self'; object-src 'self'"
+ }
+}
diff --git a/ui/file_manager/file_manager/audio_player/js/audio_player_scripts.js b/ui/file_manager/file_manager/audio_player/js/audio_player_scripts.js
deleted file mode 100644
index 11844dd..0000000
--- a/ui/file_manager/file_manager/audio_player/js/audio_player_scripts.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2014 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.
-
-<include src="../../../../webui/resources/js/cr.js">
-<include src="../../../../webui/resources/js/cr/event_target.js">
-<include src="../../../../webui/resources/js/cr/ui/array_data_model.js">
-
-// Hack for polymer, notifying that CSP is enabled here.
-// TODO(yoshiki): Find a way to remove the hack.
-if (!('securityPolicy' in document))
- document['securityPolicy'] = {};
-if (!('allowsEval' in document.securityPolicy))
- document.securityPolicy['allowsEval'] = false;
-
-// Force Polymer into dirty-checking mode, see http://crbug.com/351967
-Object['observe'] = undefined;
-
-<include src="../../../../../third_party/polymer/components/platform/platform.js">
-<include src="../../../../../third_party/polymer/components/polymer/polymer.js">
-
-(function() {
-
-// 'strict mode' is invoked for this scope.
-'use strict';
-
-<include src="../../common/js/async_util.js">
-<include src="../../common/js/util.js">
-<include src="../../common/js/volume_manager_common.js">
-<include src="../../foreground/js/file_type.js">
-<include src="../../foreground/js/volume_manager_wrapper.js">
-<include src="../../foreground/js/metadata/metadata_cache.js">
-
-<include src="audio_player.js">
-<include src="audio_player_model.js">
-
-<include src="../elements/track_list.js">
-<include src="../elements/control_panel.js">
-<include src="../elements/volume_controller.js">
-<include src="../elements/audio_player.js">
-
-window.reload = reload;
-window.unload = unload;
-window.AudioPlayer = AudioPlayer;
-
-})();
diff --git a/ui/file_manager/file_manager/background/js/background.js b/ui/file_manager/file_manager/background/js/background.js
index 37a07ae..6990c2d 100644
--- a/ui/file_manager/file_manager/background/js/background.js
+++ b/ui/file_manager/file_manager/background/js/background.js
@@ -379,7 +379,7 @@
FILE_MANAGER_WINDOW_CREATE_OPTIONS);
appWindow.launch(opt_appState || {}, false, function() {
AppWindowWrapper.focusOnDesktop(
- appWindow.window_, (opt_appState || {}).displayedId);
+ appWindow.rawAppWindow, (opt_appState || {}).displayedId);
if (opt_callback)
opt_callback(appId);
onTaskCompleted();
@@ -408,87 +408,25 @@
* @private
*/
FileBrowserBackground.prototype.onExecute_ = function(action, details) {
- switch (action) {
- case 'play':
- var urls = util.entriesToURLs(details.entries);
- launchAudioPlayer({items: urls, position: 0});
- break;
+ var appState = {
+ params: {action: action},
+ // It is not allowed to call getParent() here, since there may be
+ // no permissions to access it at this stage. Therefore we are passing
+ // the selectionURL only, and the currentDirectory will be resolved
+ // later.
+ selectionURL: details.entries[0].toURL()
+ };
- default:
- var appState = {
- params: {action: action},
- // It is not allowed to call getParent() here, since there may be
- // no permissions to access it at this stage. Therefore we are passing
- // the selectionURL only, and the currentDirectory will be resolved
- // later.
- selectionURL: details.entries[0].toURL()
- };
-
- // Every other action opens a Files app window.
- // For mounted devices just focus any Files.app window. The mounted
- // volume will appear on the navigation list.
- launchFileManager(
- appState,
- /* App ID */ null,
- LaunchType.FOCUS_SAME_OR_CREATE);
- break;
- }
+ // Every other action opens a Files app window.
+ // For mounted devices just focus any Files.app window. The mounted
+ // volume will appear on the navigation list.
+ launchFileManager(
+ appState,
+ /* App ID */ null,
+ LaunchType.FOCUS_SAME_OR_CREATE);
};
/**
- * Icon of the audio player.
- * TODO(yoshiki): Consider providing an exact size icon, instead of relying
- * on downsampling by ash.
- *
- * @type {string}
- * @const
- */
-var AUDIO_PLAYER_ICON = 'audio_player/icons/audio-player-64.png';
-
-// The instance of audio player. Until it's ready, this is null.
-var audioPlayer = null;
-
-// Queue to serializes the initialization, launching and reloading of the audio
-// player, so races won't happen.
-var audioPlayerInitializationQueue = new AsyncUtil.Queue();
-
-audioPlayerInitializationQueue.run(function(callback) {
- /**
- * Audio player window create options.
- * @type {Object}
- */
- var audioPlayerCreateOptions = Object.freeze({
- type: 'panel',
- hidden: true,
- minHeight: 44 + 73, // 44px: track, 73px: controller
- minWidth: 292,
- height: 44 + 73, // collapsed
- width: 292
- });
-
- audioPlayer = new SingletonAppWindowWrapper('audio_player.html',
- audioPlayerCreateOptions);
- callback();
-});
-
-/**
- * Launches the audio player.
- * @param {Object} playlist Playlist.
- * @param {string=} opt_displayedId ProfileID of the desktop where the audio
- * player should show.
- */
-function launchAudioPlayer(playlist, opt_displayedId) {
- audioPlayerInitializationQueue.run(function(callback) {
- audioPlayer.launch(playlist, false, function(appWindow) {
- audioPlayer.setIcon(AUDIO_PLAYER_ICON);
- AppWindowWrapper.focusOnDesktop(audioPlayer.rawAppWindow,
- opt_displayedId);
- });
- callback();
- });
-}
-
-/**
* Launches the app.
* @private
*/
@@ -530,17 +468,6 @@
}
}
});
-
- // Reopen audio player.
- audioPlayerInitializationQueue.run(function(callback) {
- audioPlayer.reopen(function() {
- // If the audioPlayer is reopened, change its window's icon. Otherwise
- // there is no reopened window so just skip the call of setIcon.
- if (audioPlayer.rawAppWindow)
- audioPlayer.setIcon(AUDIO_PLAYER_ICON);
- });
- callback();
- });
};
/**
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index eb7828e..ec44c1e 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -173,6 +173,18 @@
DirectoryModel.prototype.onWatcherDirectoryChanged_ = function(event) {
var directoryEntry = this.getCurrentDirEntry();
+ // If the change is deletion of currentDir, move up to its parent directory.
+ directoryEntry.getDirectory(directoryEntry.fullPath, {create: false},
+ null,
+ function() {
+ var volumeInfo = this.volumeManager_.getVolumeInfo(directoryEntry);
+ if (volumeInfo) {
+ volumeInfo.resolveDisplayRoot().then(function(displayRoot) {
+ this.changeDirectoryEntry(displayRoot);
+ }.bind(this));
+ }
+ }.bind(this));
+
if (event.changedFiles) {
var addedOrUpdatedFileUrls = [];
var deletedFileUrls = [];
diff --git a/ui/file_manager/file_manager/foreground/js/file_tasks.js b/ui/file_manager/file_manager/foreground/js/file_tasks.js
index 1ed2818..2c578cc 100644
--- a/ui/file_manager/file_manager/foreground/js/file_tasks.js
+++ b/ui/file_manager/file_manager/foreground/js/file_tasks.js
@@ -536,25 +536,6 @@
FileTasks.prototype.executeInternalTask_ = function(id, entries) {
var fm = this.fileManager_;
- if (id === 'play') {
- var selectedEntry = entries[0];
- if (entries.length === 1) {
- // If just a single audio file is selected pass along every audio file
- // in the directory.
- entries = fm.getAllEntriesInCurrentDirectory().filter(FileType.isAudio);
- }
- // TODO(mtomasz): Move conversion from entry to url to custom bindings.
- // crbug.com/345527.
- var urls = util.entriesToURLs(entries);
- var position = urls.indexOf(selectedEntry.toURL());
- chrome.fileManagerPrivate.getProfiles(
- function(profiles, currentId, displayedId) {
- fm.backgroundPage.launchAudioPlayer(
- {items: urls, position: position}, displayedId);
- });
- return;
- }
-
if (id === 'mount-archive') {
this.mountArchivesInternal_(entries);
return;
diff --git a/ui/file_manager/file_manager/foreground/js/file_watcher.js b/ui/file_manager/file_manager/foreground/js/file_watcher.js
index d55af87..9db0971 100644
--- a/ui/file_manager/file_manager/foreground/js/file_watcher.js
+++ b/ui/file_manager/file_manager/foreground/js/file_watcher.js
@@ -47,11 +47,30 @@
* @private
*/
FileWatcher.prototype.onDirectoryChanged_ = function(event) {
- if (this.watchedDirectoryEntry_ &&
- event.entry.toURL() === this.watchedDirectoryEntry_.toURL()) {
+ var fireWatcherDirectoryChanged = function(changedFiles) {
var e = new Event('watcher-directory-changed');
- e.changedFiles = event.changedFiles;
+
+ if (changedFiles)
+ e.changedFiles = changedFiles;
+
this.dispatchEvent(e);
+ }.bind(this);
+
+ if (this.watchedDirectoryEntry_) {
+ var eventURL = event.entry.toURL();
+ var watchedDirURL = this.watchedDirectoryEntry_.toURL();
+
+ if (eventURL === watchedDirURL) {
+ fireWatcherDirectoryChanged(event.changedFiles);
+ } else if (watchedDirURL.match(new RegExp('^' + eventURL))) {
+ // When watched directory is deleted by the change in parent directory,
+ // notify it as watcher directory changed.
+ this.watchedDirectoryEntry_.getDirectory(
+ this.watchedDirectoryEntry_.fullPath,
+ {create: false},
+ null,
+ function() { fireWatcherDirectoryChanged(null); });
+ }
}
};
diff --git a/ui/file_manager/file_manager/manifest.json b/ui/file_manager/file_manager/manifest.json
index 56e2a84..818dce3 100644
--- a/ui/file_manager/file_manager/manifest.json
+++ b/ui/file_manager/file_manager/manifest.json
@@ -42,20 +42,6 @@
],
"file_browser_handlers": [
{
- "id": "play",
- "default_title": "__MSG_PLAY_MEDIA__",
- "default_icon": "common/images/file_types/200/audio.png",
- "file_filters": [
- "filesystem:*.amr",
- "filesystem:*.flac",
- "filesystem:*.m4a",
- "filesystem:*.mp3",
- "filesystem:*.oga",
- "filesystem:*.ogg",
- "filesystem:*.wav"
- ]
- },
- {
"id": "mount-archive",
"default_title": "__MSG_MOUNT_ARCHIVE__",
"default_icon": "common/images/file_types/200/archive.png",
diff --git a/ui/file_manager/file_manager_resources.grd b/ui/file_manager/file_manager_resources.grd
index 7896892..529c136 100644
--- a/ui/file_manager/file_manager_resources.grd
+++ b/ui/file_manager/file_manager_resources.grd
@@ -58,7 +58,6 @@
<include name="IDR_FILE_MANAGER_ICON_96" file="file_manager/common/images/icon96.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_ICON_128" file="file_manager/common/images/icon128.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_ICON_256" file="file_manager/common/images/icon256.png" type="BINDATA" />
- <include name="IDR_FILE_MANAGER_AUDIO_PLAYER_ICON_64" file="file_manager/audio_player/icons/audio-player-64.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_GALLERY_ICON_16" file="gallery/images/icon16.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_GALLERY_ICON_32" file="gallery/images/icon32.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_GALLERY_ICON_48" file="gallery/images/icon48.png" type="BINDATA" />
@@ -73,10 +72,6 @@
<include name="IDR_FILE_MANAGER_IMG_UI_DRIVE_WELCOME_LOGO" file="file_manager/foreground/images/files/ui/drive_logo.png" type="BINDATA" />
<include name="IDR_FILE_MANAGER_IMG_UI_2X_DRIVE_WELCOME_LOGO" file="file_manager/foreground/images/files/ui/2x/drive_logo.png" type="BINDATA" />
- <!-- Audio player pages and scripts. -->
- <include name="IDR_FILE_MANAGER_AUDIO_PLAYER" file="file_manager/audio_player.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" />
- <include name="IDR_FILE_MANAGER_AUDIO_PLAYER_SCRIPTS_JS" file="file_manager/audio_player/js/audio_player_scripts.js" flattenhtml="true" type="BINDATA" />
-
<!-- VideoPlayer.app pages and scripts. -->
<include name="IDR_VIDEO_PLAYER_MANIFEST" file="video_player/manifest.json" type="BINDATA" />
<include name="IDR_VIDEO_PLAYER" file="video_player/video_player.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" />
@@ -93,6 +88,20 @@
<include name="IDR_VIDEO_PLAYER_ICON_256" file="video_player/images/icon/video-player-256.png" type="BINDATA" />
<include name="IDR_VIDEO_PLAYER_ICON_FAVICON_32" file="video_player/images/icon/video-player-favicon-32.png" type="BINDATA" />
+ <!-- AudioPlayer.app pages and scripts. -->
+ <include name="IDR_AUDIO_PLAYER_MANIFEST" file="audio_player/manifest.json" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_BKGND_JS" file="audio_player/js/background.js" flattenhtml="true" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER" file="audio_player/audio_player.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_JS" file="audio_player/js/audio_player_scripts.js" flattenhtml="true" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_FAVICON_16" file="audio_player/icons/audio-player-favicon-16.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_FAVICON_32" file="audio_player/icons/audio-player-favicon-32.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_32" file="audio_player/icons/audio-player-32.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_48" file="audio_player/icons/audio-player-48.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_64" file="audio_player/icons/audio-player-64.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_96" file="audio_player/icons/audio-player-96.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_128" file="audio_player/icons/audio-player-128.png" type="BINDATA" />
+ <include name="IDR_AUDIO_PLAYER_ICON_256" file="audio_player/icons/audio-player-256.png" type="BINDATA" />
+
<!-- Gallery.app pages and scripts. -->
<include name="IDR_GALLERY_MANIFEST" file="gallery/manifest.json" type="BINDATA" />
<include name="IDR_GALLERY" file="gallery/gallery.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" />
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 0a7a067..04e539f 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -237,7 +237,7 @@
* @const
* @type {number}
*/
-Gallery.FADE_TIMEOUT = 3000;
+Gallery.FADE_TIMEOUT = 2000;
/**
* First time tools fade-out timeout in milliseconds.
@@ -401,8 +401,8 @@
cr.dispatchSimpleEvent(this, 'image-saved');
}.bind(this));
- var deleteButton = this.initToolbarButton_('delete', 'GALLERY_DELETE');
- deleteButton.addEventListener('click', this.delete_.bind(this));
+ this.deleteButton_ = this.initToolbarButton_('delete', 'GALLERY_DELETE');
+ this.deleteButton_.addEventListener('click', this.delete_.bind(this));
this.shareButton_ = this.initToolbarButton_('share', 'GALLERY_SHARE');
this.shareButton_.addEventListener(
@@ -851,6 +851,12 @@
// If it's selecting something, update the variable values.
if (numSelectedItems) {
+ // Delete button is available when all images are NOT readOnly.
+ this.deleteButton_.disabled = !this.selectionModel_.selectedIndexes
+ .every(function(i) {
+ return !this.dataModel_.item(i).getLocationInfo().isReadOnly;
+ }, this);
+
// Obtains selected item.
var selectedItem =
this.dataModel_.item(this.selectionModel_.selectedIndex);
@@ -885,6 +891,7 @@
} else {
document.title = '';
this.filenameEdit_.disabled = true;
+ this.deleteButton_.disabled = true;
this.filenameEdit_.value = '';
this.shareButton_.hidden = true;
}
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index 9de3d88..1f0edc2 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -197,12 +197,12 @@
this.editButton_ = this.toolbar_.querySelector('button.edit');
this.editButton_.title = this.displayStringFunction_('GALLERY_EDIT');
- this.editButton_.setAttribute('disabled', ''); // Disabled by default.
+ this.editButton_.disabled = true; // Disabled by default.
this.editButton_.addEventListener('click', this.toggleEditor.bind(this));
this.printButton_ = this.toolbar_.querySelector('button.print');
this.printButton_.title = this.displayStringFunction_('GALLERY_PRINT');
- this.printButton_.setAttribute('disabled', ''); // Disabled by default.
+ this.printButton_.disabled = true; // Disabled by default.
this.printButton_.addEventListener('click', this.print_.bind(this));
this.editBarSpacer_ = this.toolbar_.querySelector('.edit-bar-spacer');
@@ -354,8 +354,8 @@
}
// Disable the slide-mode only buttons when leaving.
- this.editButton_.setAttribute('disabled', '');
- this.printButton_.setAttribute('disabled', '');
+ this.editButton_.disabled = true;
+ this.printButton_.disabled = true;
// Disable touch operation.
this.touchHandlers_.enabled = false;
@@ -435,7 +435,7 @@
*/
SlideMode.prototype.onSelection_ = function() {
if (this.selectionModel_.selectedIndexes.length === 0)
- return; // Temporary empty selection.
+ return; // Ignore temporary empty selection.
// Forget the saved selection if the user changed the selection manually.
if (!this.isSlideshowOn_())
@@ -581,9 +581,12 @@
// Removed item is the rightmost, but there are more items.
this.select(event.index - 1); // Select the new last index.
} else {
- // No items left. Unload the image and show the banner.
+ // No items left. Unload the image, disable edit and print button, and
+ // show the banner.
this.commitItem_(function() {
this.unloadImage_();
+ this.printButton_.disabled = true;
+ this.editButton_.disabled = true;
this.errorBanner_.show('GALLERY_NO_IMAGES');
}.bind(this));
}
@@ -717,11 +720,11 @@
// Enable or disable buttons for editing and printing.
if (error) {
- this.editButton_.setAttribute('disabled', '');
- this.printButton_.setAttribute('disabled', '');
+ this.editButton_.disabled = true;
+ this.printButton_.disabled = true;
} else {
- this.editButton_.removeAttribute('disabled');
- this.printButton_.removeAttribute('disabled');
+ this.editButton_.disabled = false;
+ this.printButton_.disabled = false;
}
// For once edited image, disallow the 'overwrite' setting change.
@@ -856,12 +859,12 @@
switch (keyID) {
case 'Ctrl-U+0050': // Ctrl+'p' prints the current image.
- if (!this.printButton_.hasAttribute('disabled'))
+ if (!this.printButton_.disabled)
this.print_();
break;
case 'U+0045': // 'e' toggles the editor.
- if (!this.editButton_.hasAttribute('disabled'))
+ if (!this.editButton_.disabled)
this.toggleEditor(event);
break;
diff --git a/ui/file_manager/video_player/js/cast/caster.js b/ui/file_manager/video_player/js/cast/caster.js
index 75082f9..e7dfaff 100644
--- a/ui/file_manager/video_player/js/cast/caster.js
+++ b/ui/file_manager/video_player/js/cast/caster.js
@@ -10,9 +10,7 @@
// cast extension. This line prevents an exception on using localStorage.
window.__defineGetter__('localStorage', function() { return {}; });
-// THIS IS A TEST APP.
-// TODO(yoshiki): Fix this before launch.
-var APPLICATION_ID = '214CC863';
+var APPLICATION_ID = '4CCB98DA';
util.addPageLoadHandler(function() {
initialize();
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 291b2b6..ed3cc56 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -27,8 +27,6 @@
"android/gfx_jni_registrar.h",
"android/java_bitmap.cc",
"android/java_bitmap.h",
- "android/scroller.cc",
- "android/scroller.h",
"android/shared_device_display_info.cc",
"android/shared_device_display_info.h",
"android/view_configuration.cc",
@@ -206,6 +204,8 @@
"utf16_indexing.cc",
"utf16_indexing.h",
"vsync_provider.h",
+ "win/direct_write.cc",
+ "win/direct_write.h",
"win/dpi.cc",
"win/dpi.h",
"win/hwnd_util.cc",
@@ -434,6 +434,7 @@
"codec/jpeg_codec_unittest.cc",
"codec/png_codec_unittest.cc",
"color_analysis_unittest.cc",
+ "color_profile_mac_unittest.mm",
"color_utils_unittest.cc",
"display_change_notifier_unittest.cc",
"display_unittest.cc",
diff --git a/ui/gfx/android/scroller_unittest.cc b/ui/gfx/android/scroller_unittest.cc
deleted file mode 100644
index bb5eec2..0000000
--- a/ui/gfx/android/scroller_unittest.cc
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2014 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.
-
-#include "base/time/time.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/android/scroller.h"
-
-namespace gfx {
-
-namespace {
-
-const float kDefaultStartX = 7.f;
-const float kDefaultStartY = 25.f;
-const float kDefaultDeltaX = -20.f;
-const float kDefaultDeltaY = 73.f;
-const float kDefaultVelocityX = -350.f;
-const float kDefaultVelocityY = 220.f;
-const float kEpsilon = 1e-3f;
-
-Scroller::Config DefaultConfig() {
- return Scroller::Config();
-}
-
-} // namespace
-
-class ScrollerTest : public testing::Test {};
-
-TEST_F(ScrollerTest, Scroll) {
- Scroller scroller(DefaultConfig());
- base::TimeTicks start_time = base::TimeTicks::Now();
-
- // Start a scroll and verify initialized values.
- scroller.StartScroll(kDefaultStartX,
- kDefaultStartY,
- kDefaultDeltaX,
- kDefaultDeltaY,
- start_time);
-
- EXPECT_EQ(kDefaultStartX, scroller.GetStartX());
- EXPECT_EQ(kDefaultStartY, scroller.GetStartY());
- EXPECT_EQ(kDefaultStartX, scroller.GetCurrX());
- EXPECT_EQ(kDefaultStartY, scroller.GetCurrY());
- EXPECT_EQ(kDefaultStartX + kDefaultDeltaX, scroller.GetFinalX());
- EXPECT_EQ(kDefaultStartY + kDefaultDeltaY, scroller.GetFinalY());
- EXPECT_FALSE(scroller.IsFinished());
- EXPECT_EQ(base::TimeDelta(), scroller.GetTimePassed());
-
- // Advance halfway through the scroll.
- const base::TimeDelta scroll_duration = scroller.GetDuration();
- scroller.ComputeScrollOffset(start_time + scroll_duration / 2);
-
- // Ensure we've moved in the direction of the delta, but have yet to reach
- // the target.
- EXPECT_GT(kDefaultStartX, scroller.GetCurrX());
- EXPECT_LT(kDefaultStartY, scroller.GetCurrY());
- EXPECT_LT(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_GT(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_FALSE(scroller.IsFinished());
-
- // Ensure our velocity is non-zero and in the same direction as the delta.
- EXPECT_GT(0.f, scroller.GetCurrVelocityX() * kDefaultDeltaX);
- EXPECT_GT(0.f, scroller.GetCurrVelocityY() * kDefaultDeltaY);
- EXPECT_TRUE(scroller.IsScrollingInDirection(kDefaultDeltaX, kDefaultDeltaY));
-
- // Repeated offset computations at the same timestamp should yield identical
- // results.
- float curr_x = scroller.GetCurrX();
- float curr_y = scroller.GetCurrY();
- float curr_velocity_x = scroller.GetCurrVelocityX();
- float curr_velocity_y = scroller.GetCurrVelocityY();
- scroller.ComputeScrollOffset(start_time + scroll_duration / 2);
- EXPECT_EQ(curr_x, scroller.GetCurrX());
- EXPECT_EQ(curr_y, scroller.GetCurrY());
- EXPECT_EQ(curr_velocity_x, scroller.GetCurrVelocityX());
- EXPECT_EQ(curr_velocity_y, scroller.GetCurrVelocityY());
-
- // Advance to the end.
- scroller.ComputeScrollOffset(start_time + scroll_duration);
- EXPECT_EQ(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_EQ(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_TRUE(scroller.IsFinished());
- EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
- EXPECT_NEAR(0.f, scroller.GetCurrVelocityX(), kEpsilon);
- EXPECT_NEAR(0.f, scroller.GetCurrVelocityY(), kEpsilon);
-
- // Try to advance further; nothing should change.
- scroller.ComputeScrollOffset(start_time + scroll_duration * 2);
- EXPECT_EQ(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_EQ(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_TRUE(scroller.IsFinished());
- EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
-}
-
-TEST_F(ScrollerTest, Fling) {
- Scroller scroller(DefaultConfig());
- base::TimeTicks start_time = base::TimeTicks::Now();
-
- // Start a fling and verify initialized values.
- scroller.Fling(kDefaultStartX,
- kDefaultStartY,
- kDefaultVelocityX,
- kDefaultVelocityY,
- INT_MIN,
- INT_MAX,
- INT_MIN,
- INT_MAX,
- start_time);
-
- EXPECT_EQ(kDefaultStartX, scroller.GetStartX());
- EXPECT_EQ(kDefaultStartY, scroller.GetStartY());
- EXPECT_EQ(kDefaultStartX, scroller.GetCurrX());
- EXPECT_EQ(kDefaultStartY, scroller.GetCurrY());
- EXPECT_GT(kDefaultStartX, scroller.GetFinalX());
- EXPECT_LT(kDefaultStartY, scroller.GetFinalY());
- EXPECT_FALSE(scroller.IsFinished());
- EXPECT_EQ(base::TimeDelta(), scroller.GetTimePassed());
-
- // Advance halfway through the fling.
- const base::TimeDelta scroll_duration = scroller.GetDuration();
- scroller.ComputeScrollOffset(start_time + scroll_duration / 2);
-
- // Ensure we've moved in the direction of the velocity, but have yet to reach
- // the target.
- EXPECT_GT(kDefaultStartX, scroller.GetCurrX());
- EXPECT_LT(kDefaultStartY, scroller.GetCurrY());
- EXPECT_LT(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_GT(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_FALSE(scroller.IsFinished());
-
- // Ensure our velocity is non-zero and in the same direction as the original
- // velocity.
- EXPECT_LT(0.f, scroller.GetCurrVelocityX() * kDefaultVelocityX);
- EXPECT_LT(0.f, scroller.GetCurrVelocityY() * kDefaultVelocityY);
- EXPECT_TRUE(
- scroller.IsScrollingInDirection(kDefaultVelocityX, kDefaultVelocityY));
-
- // Repeated offset computations at the same timestamp should yield identical
- // results.
- float curr_x = scroller.GetCurrX();
- float curr_y = scroller.GetCurrY();
- float curr_velocity_x = scroller.GetCurrVelocityX();
- float curr_velocity_y = scroller.GetCurrVelocityY();
- scroller.ComputeScrollOffset(start_time + scroll_duration / 2);
- EXPECT_EQ(curr_x, scroller.GetCurrX());
- EXPECT_EQ(curr_y, scroller.GetCurrY());
- EXPECT_EQ(curr_velocity_x, scroller.GetCurrVelocityX());
- EXPECT_EQ(curr_velocity_y, scroller.GetCurrVelocityY());
-
- // Advance to the end.
- scroller.ComputeScrollOffset(start_time + scroll_duration);
- EXPECT_EQ(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_EQ(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_TRUE(scroller.IsFinished());
- EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
- EXPECT_NEAR(0.f, scroller.GetCurrVelocityX(), kEpsilon);
- EXPECT_NEAR(0.f, scroller.GetCurrVelocityY(), kEpsilon);
-
- // Try to advance further; nothing should change.
- scroller.ComputeScrollOffset(start_time + scroll_duration * 2);
- EXPECT_EQ(scroller.GetFinalX(), scroller.GetCurrX());
- EXPECT_EQ(scroller.GetFinalY(), scroller.GetCurrY());
- EXPECT_TRUE(scroller.IsFinished());
- EXPECT_EQ(scroll_duration, scroller.GetTimePassed());
-}
-
-} // namespace gfx
diff --git a/ui/gfx/animation/animation.h b/ui/gfx/animation/animation.h
index 32d297e..e98f506 100644
--- a/ui/gfx/animation/animation.h
+++ b/ui/gfx/animation/animation.h
@@ -81,9 +81,9 @@
AnimationDelegate* delegate() { return delegate_; }
// AnimationContainer::Element overrides
- virtual void SetStartTime(base::TimeTicks start_time) OVERRIDE;
+ virtual void SetStartTime(base::TimeTicks start_time) override;
virtual void Step(base::TimeTicks time_now) = 0;
- virtual base::TimeDelta GetTimerInterval() const OVERRIDE;
+ virtual base::TimeDelta GetTimerInterval() const override;
private:
// Interval for the animation.
diff --git a/ui/gfx/animation/animation_container_unittest.cc b/ui/gfx/animation/animation_container_unittest.cc
index 70d3b0e..ba8e2c9 100644
--- a/ui/gfx/animation/animation_container_unittest.cc
+++ b/ui/gfx/animation/animation_container_unittest.cc
@@ -26,12 +26,12 @@
private:
virtual void AnimationContainerProgressed(
- AnimationContainer* container) OVERRIDE {
+ AnimationContainer* container) override {
progressed_count_++;
}
// Invoked when no more animations are being managed by this container.
- virtual void AnimationContainerEmpty(AnimationContainer* container) OVERRIDE {
+ virtual void AnimationContainerEmpty(AnimationContainer* container) override {
empty_ = true;
}
@@ -47,7 +47,7 @@
: LinearAnimation(20, 20, delegate) {
}
- virtual void AnimateToState(double state) OVERRIDE {
+ virtual void AnimateToState(double state) override {
}
private:
diff --git a/ui/gfx/animation/animation_unittest.cc b/ui/gfx/animation/animation_unittest.cc
index 00f1e26..d86f87a 100644
--- a/ui/gfx/animation/animation_unittest.cc
+++ b/ui/gfx/animation/animation_unittest.cc
@@ -29,7 +29,7 @@
: LinearAnimation(frame_rate, delegate) {
}
- virtual void AnimateToState(double state) OVERRIDE {
+ virtual void AnimateToState(double state) override {
EXPECT_LE(0.0, state);
EXPECT_GE(1.0, state);
}
@@ -44,7 +44,7 @@
: LinearAnimation(duration, frame_rate, delegate) {
}
- virtual void AnimateToState(double state) OVERRIDE {
+ virtual void AnimateToState(double state) override {
if (state >= 0.5)
Stop();
}
@@ -59,7 +59,7 @@
: LinearAnimation(duration, frame_rate, delegate) {
}
- virtual void AnimateToState(double state) OVERRIDE {
+ virtual void AnimateToState(double state) override {
if (state >= 0.5)
End();
}
@@ -71,7 +71,7 @@
// AnimationDelegate implementation that deletes the animation in ended.
class DeletingAnimationDelegate : public AnimationDelegate {
public:
- virtual void AnimationEnded(const Animation* animation) OVERRIDE {
+ virtual void AnimationEnded(const Animation* animation) override {
delete animation;
base::MessageLoop::current()->Quit();
}
diff --git a/ui/gfx/animation/linear_animation.h b/ui/gfx/animation/linear_animation.h
index 401f1be..d74b847 100644
--- a/ui/gfx/animation/linear_animation.h
+++ b/ui/gfx/animation/linear_animation.h
@@ -30,7 +30,7 @@
// Gets the value for the current state, according to the animation curve in
// use. This class provides only for a linear relationship, however subclasses
// can override this to provide others.
- virtual double GetCurrentValue() const OVERRIDE;
+ virtual double GetCurrentValue() const override;
// Change the current state of the animation to |new_value|.
void SetCurrentValue(double new_value);
@@ -50,16 +50,16 @@
// Invoked by the AnimationContainer when the animation is running to advance
// the animation. Use |time_now| rather than Time::Now to avoid multiple
// animations running at the same time diverging.
- virtual void Step(base::TimeTicks time_now) OVERRIDE;
+ virtual void Step(base::TimeTicks time_now) override;
// Overriden to initialize state.
- virtual void AnimationStarted() OVERRIDE;
+ virtual void AnimationStarted() override;
// Overriden to advance to the end (if End was invoked).
- virtual void AnimationStopped() OVERRIDE;
+ virtual void AnimationStopped() override;
// Overriden to return true if state is not 1.
- virtual bool ShouldSendCanceledFromStop() OVERRIDE;
+ virtual bool ShouldSendCanceledFromStop() override;
private:
base::TimeDelta duration_;
diff --git a/ui/gfx/animation/multi_animation.h b/ui/gfx/animation/multi_animation.h
index f048098..bbcbae4 100644
--- a/ui/gfx/animation/multi_animation.h
+++ b/ui/gfx/animation/multi_animation.h
@@ -57,15 +57,15 @@
// Returns the current value. The current value for a MultiAnimation is
// determined from the tween type of the current part.
- virtual double GetCurrentValue() const OVERRIDE;
+ virtual double GetCurrentValue() const override;
// Returns the index of the current part.
size_t current_part_index() const { return current_part_index_; }
protected:
// Animation overrides.
- virtual void Step(base::TimeTicks time_now) OVERRIDE;
- virtual void SetStartTime(base::TimeTicks start_time) OVERRIDE;
+ virtual void Step(base::TimeTicks time_now) override;
+ virtual void SetStartTime(base::TimeTicks start_time) override;
private:
// Returns the part containing the specified time. |time_ms| is reset to be
diff --git a/ui/gfx/animation/slide_animation.h b/ui/gfx/animation/slide_animation.h
index 8fdf8f8..3795e36 100644
--- a/ui/gfx/animation/slide_animation.h
+++ b/ui/gfx/animation/slide_animation.h
@@ -66,7 +66,7 @@
int GetSlideDuration() const { return slide_duration_; }
void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; }
- virtual double GetCurrentValue() const OVERRIDE;
+ virtual double GetCurrentValue() const override;
bool IsShowing() const { return showing_; }
bool IsClosing() const { return !showing_ && value_end_ < value_current_; }
@@ -74,7 +74,7 @@
private:
// Overridden from Animation.
- virtual void AnimateToState(double state) OVERRIDE;
+ virtual void AnimateToState(double state) override;
AnimationDelegate* target_;
diff --git a/ui/gfx/animation/throb_animation.h b/ui/gfx/animation/throb_animation.h
index 8bea7f8..27da800 100644
--- a/ui/gfx/animation/throb_animation.h
+++ b/ui/gfx/animation/throb_animation.h
@@ -29,13 +29,13 @@
void SetThrobDuration(int duration) { throb_duration_ = duration; }
// Overridden to reset to the slide duration.
- virtual void Reset() OVERRIDE;
- virtual void Reset(double value) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
+ virtual void Reset() override;
+ virtual void Reset(double value) override;
+ virtual void Show() override;
+ virtual void Hide() override;
// Overridden to maintain the slide duration.
- virtual void SetSlideDuration(int duration) OVERRIDE;
+ virtual void SetSlideDuration(int duration) override;
// The number of cycles remaining until the animation stops.
void set_cycles_remaining(int value) { cycles_remaining_ = value; }
@@ -43,7 +43,7 @@
protected:
// Overriden to continually throb (assuming we're throbbing).
- virtual void Step(base::TimeTicks time_now) OVERRIDE;
+ virtual void Step(base::TimeTicks time_now) override;
private:
// Resets state such that we behave like SlideAnimation.
diff --git a/ui/gfx/color_analysis.h b/ui/gfx/color_analysis.h
index dd273bc..b3bd4d2 100644
--- a/ui/gfx/color_analysis.h
+++ b/ui/gfx/color_analysis.h
@@ -42,7 +42,7 @@
GridSampler();
virtual ~GridSampler();
- virtual int GetSample(int width, int height) OVERRIDE;
+ virtual int GetSample(int width, int height) override;
private:
// The number of times GetSample has been called.
diff --git a/ui/gfx/color_analysis_unittest.cc b/ui/gfx/color_analysis_unittest.cc
index 601089f..128209a 100644
--- a/ui/gfx/color_analysis_unittest.cc
+++ b/ui/gfx/color_analysis_unittest.cc
@@ -120,7 +120,7 @@
prebaked_sample_results_.push_back(sample);
}
- virtual int GetSample(int width, int height) OVERRIDE {
+ virtual int GetSample(int width, int height) override {
if (current_result_index_ >= prebaked_sample_results_.size()) {
current_result_index_ = 0;
}
diff --git a/ui/gfx/color_profile.h b/ui/gfx/color_profile.h
index 790bfe5..37a5634 100644
--- a/ui/gfx/color_profile.h
+++ b/ui/gfx/color_profile.h
@@ -17,7 +17,7 @@
class GFX_EXPORT ColorProfile {
public:
- // On Windows, this reads a file from disk so it shouldn't be run on the UI
+ // On Windows, this reads a file from disk so it should not be run on the UI
// or IO thread.
ColorProfile();
~ColorProfile();
@@ -35,9 +35,11 @@
}
// Return the color profile of the display nearest the screen bounds. On Win32,
-// this may read a file from disk, so it shouldn't be run on the UI/IO threads.
+// this may read a file from disk so it should not be run on the UI/IO threads.
// If the given bounds are empty, or are off-screen, return false meaning there
-// is no color profile associated with the bounds.
+// is no color profile associated with the bounds. Otherwise return true after
+// storing the display's color profile in |profile|, which will be empty if the
+// standard sRGB color profile should be assumed.
GFX_EXPORT bool GetDisplayColorProfile(const gfx::Rect& bounds,
std::vector<char>* profile);
} // namespace gfx
diff --git a/ui/gfx/color_profile_mac.mm b/ui/gfx/color_profile_mac.mm
index c36072d..ac877c0 100644
--- a/ui/gfx/color_profile_mac.mm
+++ b/ui/gfx/color_profile_mac.mm
@@ -4,16 +4,53 @@
#include "ui/gfx/color_profile.h"
+#import <Cocoa/Cocoa.h>
+
#include "base/mac/mac_util.h"
+#include "ui/gfx/mac/coordinate_conversion.h"
+
+namespace {
+
+NSScreen* GetNSScreenFromBounds(const gfx::Rect& bounds) {
+ NSScreen* screen = nil;
+ int overlap = 0;
+
+ for (NSScreen* monitor in [NSScreen screens]) {
+ gfx::Rect monitor_rect = gfx::ScreenRectFromNSRect([monitor frame]);
+ gfx::Rect overlap_rect = gfx::IntersectRects(monitor_rect, bounds);
+ int overlap_size = overlap_rect.width() * overlap_rect.height();
+ if (overlap_size > overlap) {
+ overlap = overlap_size;
+ screen = monitor;
+ }
+ }
+
+ return screen;
+}
+
+} // namespace
namespace gfx {
bool GetDisplayColorProfile(const gfx::Rect& bounds,
std::vector<char>* profile) {
- if (bounds.IsEmpty())
+ DCHECK(profile->empty());
+
+ NSScreen* screen = GetNSScreenFromBounds(bounds);
+ if (!screen || bounds.IsEmpty())
return false;
- // TODO(noel): implement.
- return false;
+ NSColorSpace* color_space = [screen colorSpace];
+ if (!color_space)
+ return false;
+
+ if ([color_space isEqual:[NSColorSpace sRGBColorSpace]])
+ return true;
+ NSData* profile_data = [color_space ICCProfileData];
+ const char* data = static_cast<const char*>([profile_data bytes]);
+ size_t length = [profile_data length];
+ if (data && !gfx::InvalidColorProfileLength(length))
+ profile->assign(data, data + length);
+ return true;
}
void ReadColorProfile(std::vector<char>* profile) {
diff --git a/ui/gfx/color_profile_mac_unittest.mm b/ui/gfx/color_profile_mac_unittest.mm
new file mode 100644
index 0000000..59efb61
--- /dev/null
+++ b/ui/gfx/color_profile_mac_unittest.mm
@@ -0,0 +1,96 @@
+// Copyright 2014 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.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/mac/scoped_nsobject.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/color_profile.h"
+#include "ui/gfx/mac/coordinate_conversion.h"
+#import "ui/gfx/test/ui_cocoa_test_helper.h"
+
+namespace {
+
+class ColorProfileTest : public ui::CocoaTest {
+ public:
+ virtual void SetUp() override {
+ ui::CocoaTest::SetUp();
+
+ // Verify the primary screen origin.
+ NSRect primary_screen_frame = PrimaryScreenFrame();
+ EXPECT_EQ(0, primary_screen_frame.origin.x);
+ EXPECT_EQ(0, primary_screen_frame.origin.y);
+
+ // Move the test window onto the screen.
+ MoveTestWindowTo(gfx::Rect(0, 0, 200, 200));
+
+ // Verify it is contained by the screen.
+ BOOL screen_contains_test_window = NSContainsRect(
+ primary_screen_frame, [test_window() frame]);
+ EXPECT_TRUE(screen_contains_test_window);
+ }
+
+ void MoveTestWindowTo(gfx::Rect bounds) {
+ [test_window() setFrame:gfx::ScreenRectToNSRect(bounds) display:NO];
+ EXPECT_EQ(bounds.ToString(), TestWindowBounds().ToString());
+ }
+
+ gfx::Rect TestWindowBounds() {
+ return gfx::ScreenRectFromNSRect([test_window() frame]);
+ }
+
+ BOOL TestWindowOnScreen() {
+ return NSIntersectsRect(PrimaryScreenFrame(), [test_window() frame]);
+ }
+
+ BOOL TestWindowContainedOnScreen() {
+ return NSContainsRect(PrimaryScreenFrame(), [test_window() frame]);
+ }
+
+ NSRect PrimaryScreenFrame() {
+ return [[[NSScreen screens] objectAtIndex:0] frame];
+ }
+};
+
+bool TestColorProfileForBounds(const gfx::Rect& bounds) {
+ std::vector<char> color_profile;
+ return gfx::GetDisplayColorProfile(bounds, &color_profile);
+}
+
+TEST_F(ColorProfileTest, GetDisplayColorProfileForOnScreenBounds) {
+ MoveTestWindowTo(gfx::Rect(10, 10, 100, 100));
+ EXPECT_FALSE(TestWindowBounds().IsEmpty());
+ EXPECT_TRUE(TestWindowContainedOnScreen());
+ EXPECT_TRUE(TestColorProfileForBounds(TestWindowBounds()));
+}
+
+TEST_F(ColorProfileTest, GetDisplayColorProfileForPartiallyOnScreenBounds) {
+ MoveTestWindowTo(gfx::Rect(-50, -50, 80, 80));
+ EXPECT_FALSE(TestWindowBounds().IsEmpty());
+ EXPECT_TRUE(TestWindowOnScreen());
+ EXPECT_TRUE(TestColorProfileForBounds(TestWindowBounds()));
+}
+
+TEST_F(ColorProfileTest, GetDisplayColorProfileForOffScreenBounds) {
+ MoveTestWindowTo(gfx::Rect(-100, -100, 10, 10));
+ EXPECT_FALSE(TestWindowBounds().IsEmpty());
+ EXPECT_FALSE(TestWindowOnScreen());
+ EXPECT_FALSE(TestColorProfileForBounds(TestWindowBounds()));
+}
+
+TEST_F(ColorProfileTest, GetDisplayColorProfileForEmptyOnScreenBounds) {
+ MoveTestWindowTo(gfx::Rect(10, 10, 0, 0));
+ EXPECT_TRUE(TestWindowBounds().IsEmpty());
+ EXPECT_FALSE(TestWindowOnScreen());
+ EXPECT_FALSE(TestColorProfileForBounds(TestWindowBounds()));
+}
+
+TEST_F(ColorProfileTest, GetDisplayColorProfileForEmptyOffScreenBounds) {
+ MoveTestWindowTo(gfx::Rect(-100, -100, 0, 0));
+ EXPECT_TRUE(TestWindowBounds().IsEmpty());
+ EXPECT_FALSE(TestWindowOnScreen());
+ EXPECT_FALSE(TestColorProfileForBounds(TestWindowBounds()));
+}
+
+} // namespace
diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc
index ffdbec5..37cfe30 100644
--- a/ui/gfx/color_utils.cc
+++ b/ui/gfx/color_utils.cc
@@ -151,6 +151,21 @@
calcHue(temp1, temp2, hue - 1.0 / 3.0));
}
+void ClampHSL(HSL* hsl) {
+ if (hsl->h < 0)
+ hsl->h = 0;
+ if (hsl->h > 1)
+ hsl->h = 1;
+ if (hsl->s < 0)
+ hsl->s = 0;
+ if (hsl->s > 1)
+ hsl->s = 1;
+ if (hsl->l < 0)
+ hsl->l = 0;
+ if (hsl->l > 1)
+ hsl->l = 1;
+}
+
bool IsWithinHSLRange(const HSL& hsl,
const HSL& lower_bound,
const HSL& upper_bound) {
diff --git a/ui/gfx/color_utils.h b/ui/gfx/color_utils.h
index 9446654..0f4f9c4 100644
--- a/ui/gfx/color_utils.h
+++ b/ui/gfx/color_utils.h
@@ -29,6 +29,13 @@
GFX_EXPORT void SkColorToHSL(SkColor c, HSL* hsl);
GFX_EXPORT SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
+// Validates an |hsl| value passed in from an untrusted source.
+//
+// If we were starting from scratch, we'd throw some sort of exception to the
+// user here, but there's already code out there that acts as if -1 == 0 and
+// 1 == 2, so just Clamp the values to [0, 1] instead.
+GFX_EXPORT void ClampHSL(HSL* hsl);
+
// Determines whether the given |hsl| falls within the given range for each
// component. All components of |hsl| are expected to be in the range [0, 1].
//
diff --git a/ui/gfx/display_change_notifier_unittest.cc b/ui/gfx/display_change_notifier_unittest.cc
index 769c770..700793a 100644
--- a/ui/gfx/display_change_notifier_unittest.cc
+++ b/ui/gfx/display_change_notifier_unittest.cc
@@ -21,16 +21,16 @@
virtual ~MockDisplayObserver() { }
- virtual void OnDisplayAdded(const Display& display) OVERRIDE {
+ virtual void OnDisplayAdded(const Display& display) override {
display_added_++;
}
- virtual void OnDisplayRemoved(const Display& display) OVERRIDE {
+ virtual void OnDisplayRemoved(const Display& display) override {
display_removed_++;
}
virtual void OnDisplayMetricsChanged(const Display& display,
- uint32_t metrics) OVERRIDE {
+ uint32_t metrics) override {
display_changed_++;
latest_metrics_change_ = metrics;
}
diff --git a/ui/gfx/font_fallback_win_unittest.cc b/ui/gfx/font_fallback_win_unittest.cc
index ff807cc..e378db8 100644
--- a/ui/gfx/font_fallback_win_unittest.cc
+++ b/ui/gfx/font_fallback_win_unittest.cc
@@ -24,7 +24,7 @@
test_linked_fonts.push_back(font);
}
- virtual const std::vector<Font>* GetLinkedFonts() const OVERRIDE {
+ virtual const std::vector<Font>* GetLinkedFonts() const override {
return &test_linked_fonts;
}
diff --git a/ui/gfx/font_render_params_linux_unittest.cc b/ui/gfx/font_render_params_linux_unittest.cc
index 46c82b4..a9b230f 100644
--- a/ui/gfx/font_render_params_linux_unittest.cc
+++ b/ui/gfx/font_render_params_linux_unittest.cc
@@ -27,15 +27,15 @@
void set_params(const FontRenderParams& params) { params_ = params; }
- virtual FontRenderParams GetDefaultFontRenderParams() const OVERRIDE {
+ virtual FontRenderParams GetDefaultFontRenderParams() const override {
return params_;
}
virtual scoped_ptr<ScopedPangoFontDescription>
- GetDefaultPangoFontDescription() const OVERRIDE {
+ GetDefaultPangoFontDescription() const override {
NOTIMPLEMENTED();
return scoped_ptr<ScopedPangoFontDescription>();
}
- virtual double GetFontDPI() const OVERRIDE {
+ virtual double GetFontDPI() const override {
NOTIMPLEMENTED();
return 96.0;
}
diff --git a/ui/gfx/font_render_params_win.cc b/ui/gfx/font_render_params_win.cc
index a6fc618..372435d 100644
--- a/ui/gfx/font_render_params_win.cc
+++ b/ui/gfx/font_render_params_win.cc
@@ -59,7 +59,7 @@
virtual void OnWndProc(HWND hwnd,
UINT message,
WPARAM wparam,
- LPARAM lparam) OVERRIDE {
+ LPARAM lparam) override {
if (message == WM_SETTINGCHANGE) {
params_.reset();
gfx::SingletonHwnd::GetInstance()->RemoveObserver(this);
diff --git a/ui/gfx/gdi_util.cc b/ui/gfx/gdi_util.cc
index dc7d83f..996d01e 100644
--- a/ui/gfx/gdi_util.cc
+++ b/ui/gfx/gdi_util.cc
@@ -7,13 +7,11 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-namespace gfx {
+namespace {
-void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr) {
- CreateBitmapHeaderWithColorDepth(width, height, 32, hdr);
-}
-
-void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth,
+void CreateBitmapHeaderWithColorDepth(LONG width,
+ LONG height,
+ WORD color_depth,
BITMAPINFOHEADER* hdr) {
// These values are shared with gfx::PlatformDevice
hdr->biSize = sizeof(BITMAPINFOHEADER);
@@ -29,6 +27,14 @@
hdr->biClrImportant = 0;
}
+} // namespace
+
+namespace gfx {
+
+void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr) {
+ CreateBitmapHeaderWithColorDepth(width, height, 32, hdr);
+}
+
void CreateBitmapV4Header(int width, int height, BITMAPV4HEADER* hdr) {
// Because bmp v4 header is just an extension, we just create a v3 header and
// copy the bits over to the v4 header.
@@ -49,17 +55,7 @@
void CreateMonochromeBitmapHeader(int width,
int height,
BITMAPINFOHEADER* hdr) {
- hdr->biSize = sizeof(BITMAPINFOHEADER);
- hdr->biWidth = width;
- hdr->biHeight = -height;
- hdr->biPlanes = 1;
- hdr->biBitCount = 1;
- hdr->biCompression = BI_RGB;
- hdr->biSizeImage = 0;
- hdr->biXPelsPerMeter = 1;
- hdr->biYPelsPerMeter = 1;
- hdr->biClrUsed = 0;
- hdr->biClrImportant = 0;
+ CreateBitmapHeaderWithColorDepth(width, height, 1, hdr);
}
void SubtractRectanglesFromRegion(HRGN hrgn,
@@ -96,7 +92,7 @@
}
-double CalculatePageScale(HDC dc, int page_width, int page_height) {
+float CalculatePageScale(HDC dc, int page_width, int page_height) {
int dc_width = GetDeviceCaps(dc, HORZRES);
int dc_height = GetDeviceCaps(dc, VERTRES);
@@ -104,15 +100,15 @@
if (dc_width >= page_width && dc_height >= page_height)
return 1.0;
- double x_factor =
- static_cast<double>(dc_width) / static_cast<double>(page_width);
- double y_factor =
- static_cast<double>(dc_height) / static_cast<double>(page_height);
+ float x_factor =
+ static_cast<float>(dc_width) / static_cast<float>(page_width);
+ float y_factor =
+ static_cast<float>(dc_height) / static_cast<float>(page_height);
return std::min(x_factor, y_factor);
}
// Apply scaling to the DC.
-bool ScaleDC(HDC dc, double scale_factor) {
+bool ScaleDC(HDC dc, float scale_factor) {
SetGraphicsMode(dc, GM_ADVANCED);
XFORM xform = {0};
xform.eM11 = xform.eM22 = scale_factor;
diff --git a/ui/gfx/gdi_util.h b/ui/gfx/gdi_util.h
index d8563b6..f1c0f50 100644
--- a/ui/gfx/gdi_util.h
+++ b/ui/gfx/gdi_util.h
@@ -18,11 +18,6 @@
GFX_EXPORT void CreateBitmapHeader(int width, int height,
BITMAPINFOHEADER* hdr);
-// Creates a BITMAPINFOHEADER structure given the bitmap's size and
-// color depth in bits per pixel.
-void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth,
- BITMAPINFOHEADER* hdr);
-
// Creates a BITMAPV4HEADER structure given the bitmap's size. You probably
// only need to use BMP V4 if you need transparency (alpha channel). This
// function sets the AlphaMask to 0xff000000.
@@ -40,10 +35,10 @@
GFX_EXPORT HRGN ConvertPathToHRGN(const gfx::Path& path);
// Calculate scale to fit an entire page on DC.
-GFX_EXPORT double CalculatePageScale(HDC dc, int page_width, int page_height);
+GFX_EXPORT float CalculatePageScale(HDC dc, int page_width, int page_height);
// Apply scaling to the DC.
-GFX_EXPORT bool ScaleDC(HDC dc, double scale_factor);
+GFX_EXPORT bool ScaleDC(HDC dc, float scale_factor);
GFX_EXPORT void StretchDIBits(HDC hdc,
int dest_x, int dest_y, int dest_w, int dest_h,
diff --git a/ui/gfx/geometry/r_tree_base.h b/ui/gfx/geometry/r_tree_base.h
index 21dc86b..b83aeef 100644
--- a/ui/gfx/geometry/r_tree_base.h
+++ b/ui/gfx/geometry/r_tree_base.h
@@ -96,10 +96,10 @@
virtual ~RecordBase();
virtual void AppendIntersectingRecords(const Rect& query_rect,
- Records* records_out) const OVERRIDE;
- virtual void AppendAllRecords(Records* records_out) const OVERRIDE;
- virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() OVERRIDE;
- virtual int Level() const OVERRIDE;
+ Records* records_out) const override;
+ virtual void AppendAllRecords(Records* records_out) const override;
+ virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
+ virtual int Level() const override;
private:
friend class RTreeTest;
@@ -115,10 +115,10 @@
virtual ~Node();
virtual void AppendIntersectingRecords(const Rect& query_rect,
- Records* records_out) const OVERRIDE;
- virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() OVERRIDE;
- virtual int Level() const OVERRIDE;
- virtual void AppendAllRecords(Records* matches_out) const OVERRIDE;
+ Records* records_out) const override;
+ virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
+ virtual int Level() const override;
+ virtual void AppendAllRecords(Records* matches_out) const override;
// Constructs a new Node that is the parent of this Node and already has
// this Node as its sole child. Valid to call only on root Nodes, meaning
@@ -219,7 +219,7 @@
Rects* vertical_bounds,
Rects* horizontal_bounds);
- virtual void RecomputeLocalBounds() OVERRIDE;
+ virtual void RecomputeLocalBounds() override;
// Returns the increase in overlap value, as defined in Beckmann et al. as
// the sum of the areas of the intersection of all child rectangles
diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp
index 10f2bfa..edd4394 100644
--- a/ui/gfx/gfx.gyp
+++ b/ui/gfx/gfx.gyp
@@ -109,8 +109,6 @@
'android/gfx_jni_registrar.h',
'android/java_bitmap.cc',
'android/java_bitmap.h',
- 'android/scroller.cc',
- 'android/scroller.h',
'android/shared_device_display_info.cc',
'android/shared_device_display_info.h',
'android/view_configuration.cc',
@@ -303,6 +301,8 @@
'utf16_indexing.cc',
'utf16_indexing.h',
'vsync_provider.h',
+ 'win/direct_write.cc',
+ 'win/direct_write.h',
'win/dpi.cc',
'win/dpi.h',
'win/hwnd_util.cc',
diff --git a/ui/gfx/gfx_tests.gyp b/ui/gfx/gfx_tests.gyp
index a6a68e0..c61701e 100644
--- a/ui/gfx/gfx_tests.gyp
+++ b/ui/gfx/gfx_tests.gyp
@@ -25,7 +25,6 @@
],
'all_sources': [
'<@(_common_sources)',
- 'android/scroller_unittest.cc',
'animation/animation_container_unittest.cc',
'animation/animation_unittest.cc',
'animation/multi_animation_unittest.cc',
@@ -38,6 +37,7 @@
'codec/jpeg_codec_unittest.cc',
'codec/png_codec_unittest.cc',
'color_analysis_unittest.cc',
+ 'color_profile_mac_unittest.mm',
'color_utils_unittest.cc',
'display_change_notifier_unittest.cc',
'display_unittest.cc',
diff --git a/ui/gfx/gpu_memory_buffer.cc b/ui/gfx/gpu_memory_buffer.cc
index 3e36cd1..18de4f0 100644
--- a/ui/gfx/gpu_memory_buffer.cc
+++ b/ui/gfx/gpu_memory_buffer.cc
@@ -13,10 +13,6 @@
,
io_surface_id(0u)
#endif
-#if defined(OS_ANDROID)
- ,
- buffer_id(0)
-#endif
#if defined(USE_X11)
,
pixmap(0)
@@ -24,8 +20,4 @@
{
}
-GpuMemoryBuffer::GpuMemoryBuffer() {}
-
-GpuMemoryBuffer::~GpuMemoryBuffer() {}
-
} // namespace gfx
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index 932c8d6..e33a189 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -13,6 +13,8 @@
#include "ui/gfx/x/x11_types.h"
#endif
+extern "C" typedef struct _ClientBuffer* ClientBuffer;
+
namespace gfx {
enum GpuMemoryBufferType {
@@ -26,18 +28,6 @@
GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_BUFFER
};
-// TODO(alexst): Merge this with GpuMemoryBufferId as part of switchover to
-// the new API for GpuMemoryBuffer allocation when it's done.
-#if defined(OS_ANDROID)
-struct SurfaceTextureId {
- SurfaceTextureId() : primary_id(0), secondary_id(0) {}
- SurfaceTextureId(int32 primary_id, int32 secondary_id)
- : primary_id(primary_id), secondary_id(secondary_id) {}
- int32 primary_id;
- int32 secondary_id;
-};
-#endif
-
struct GpuMemoryBufferId {
GpuMemoryBufferId() : primary_id(0), secondary_id(0) {}
GpuMemoryBufferId(int32 primary_id, int32 secondary_id)
@@ -55,10 +45,6 @@
#if defined(OS_MACOSX)
uint32 io_surface_id;
#endif
-#if defined(OS_ANDROID)
- long buffer_id;
- SurfaceTextureId surface_texture_id;
-#endif
#if defined(USE_X11)
XID pixmap;
#endif
@@ -69,8 +55,15 @@
// regular CPU code, but can also be read by the GPU.
class GFX_EXPORT GpuMemoryBuffer {
public:
- GpuMemoryBuffer();
- virtual ~GpuMemoryBuffer();
+ // The format needs to be taken into account when mapping a buffer into the
+ // client's address space.
+ enum Format { RGBA_8888, RGBX_8888, BGRA_8888, FORMAT_LAST = BGRA_8888 };
+
+ // The usage mode affects how a buffer can be used. Only buffers created with
+ // MAP can be mapped into the client's address space and accessed by the CPU.
+ enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT };
+
+ virtual ~GpuMemoryBuffer() {}
// Maps the buffer into the client's address space so it can be written to by
// the CPU. This call may block, for instance if the GPU needs to finish
@@ -85,11 +78,17 @@
// Returns true iff the buffer is mapped.
virtual bool IsMapped() const = 0;
+ // Returns the format for the buffer.
+ virtual Format GetFormat() const = 0;
+
// Returns the stride in bytes for the buffer.
virtual uint32 GetStride() const = 0;
// Returns a platform specific handle for this buffer.
virtual GpuMemoryBufferHandle GetHandle() const = 0;
+
+ // Type-checking downcast routine.
+ virtual ClientBuffer AsClientBuffer() = 0;
};
} // namespace gfx
diff --git a/ui/gfx/icon_util_unittest.cc b/ui/gfx/icon_util_unittest.cc
index f0f2cde..280c25f 100644
--- a/ui/gfx/icon_util_unittest.cc
+++ b/ui/gfx/icon_util_unittest.cc
@@ -26,7 +26,7 @@
class IconUtilTest : public testing::Test {
public:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
gfx::RegisterPathProvider();
ASSERT_TRUE(PathService::Get(gfx::DIR_TEST_DATA, &test_data_directory_));
temp_directory_.CreateUniqueTempDir();
diff --git a/ui/gfx/image/canvas_image_source.h b/ui/gfx/image/canvas_image_source.h
index 0ce170d..33d97cb 100644
--- a/ui/gfx/image/canvas_image_source.h
+++ b/ui/gfx/image/canvas_image_source.h
@@ -30,7 +30,7 @@
const gfx::Size& size() const { return size_; };
// Overridden from gfx::ImageSkiaSource.
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE;
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) override;
protected:
virtual ~CanvasImageSource() {}
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index 70ab5ed..bd8cb20 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -68,7 +68,7 @@
PNGImageSource() {}
virtual ~PNGImageSource() {}
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
if (image_skia_reps_.empty())
return ImageSkiaRep();
@@ -224,15 +224,15 @@
virtual ~ImageRepPNG() {
}
- virtual int Width() const OVERRIDE {
+ virtual int Width() const override {
return Size().width();
}
- virtual int Height() const OVERRIDE {
+ virtual int Height() const override {
return Size().height();
}
- virtual gfx::Size Size() const OVERRIDE {
+ virtual gfx::Size Size() const override {
// Read the PNG data to get the image size, caching it.
if (!size_cache_) {
for (std::vector<ImagePNGRep>::const_iterator it = image_reps().begin();
@@ -270,15 +270,15 @@
virtual ~ImageRepSkia() {
}
- virtual int Width() const OVERRIDE {
+ virtual int Width() const override {
return image_->width();
}
- virtual int Height() const OVERRIDE {
+ virtual int Height() const override {
return image_->height();
}
- virtual gfx::Size Size() const OVERRIDE {
+ virtual gfx::Size Size() const override {
return image_->size();
}
@@ -304,15 +304,15 @@
image_ = nil;
}
- virtual int Width() const OVERRIDE {
+ virtual int Width() const override {
return Size().width();
}
- virtual int Height() const OVERRIDE {
+ virtual int Height() const override {
return Size().height();
}
- virtual gfx::Size Size() const OVERRIDE {
+ virtual gfx::Size Size() const override {
return internal::UIImageSize(image_);
}
@@ -337,15 +337,15 @@
image_ = nil;
}
- virtual int Width() const OVERRIDE {
+ virtual int Width() const override {
return Size().width();
}
- virtual int Height() const OVERRIDE {
+ virtual int Height() const override {
return Size().height();
}
- virtual gfx::Size Size() const OVERRIDE {
+ virtual gfx::Size Size() const override {
return internal::NSImageSize(image_);
}
diff --git a/ui/gfx/image/image_family_unittest.cc b/ui/gfx/image/image_family_unittest.cc
index 2e80ccf..f9dd401 100644
--- a/ui/gfx/image/image_family_unittest.cc
+++ b/ui/gfx/image/image_family_unittest.cc
@@ -26,7 +26,7 @@
class ImageFamilyTest : public testing::Test {
public:
// Construct an ImageFamily. Implicitly tests Add and Empty.
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
EXPECT_TRUE(image_family_.empty());
// Aspect ratio 1:1.
diff --git a/ui/gfx/image/image_ios_unittest.mm b/ui/gfx/image/image_ios_unittest.mm
index 81bd82e..789fe72 100644
--- a/ui/gfx/image/image_ios_unittest.mm
+++ b/ui/gfx/image/image_ios_unittest.mm
@@ -48,11 +48,11 @@
ImageIOSTest() {}
virtual ~ImageIOSTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
original_scale_factors_ = gfx::ImageSkia::GetSupportedScales();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
gfx::ImageSkia::SetSupportedScales(original_scale_factors_);
}
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index c7e0eec..d172d54 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -58,7 +58,7 @@
}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep first_rep = first_.GetRepresentation(scale);
ImageSkiaRep second_rep = second_.GetRepresentation(scale);
if (first_rep.pixel_size() != second_rep.pixel_size()) {
@@ -112,7 +112,7 @@
// BinaryImageSource overrides:
virtual ImageSkiaRep CreateImageSkiaRep(
const ImageSkiaRep& first_rep,
- const ImageSkiaRep& second_rep) const OVERRIDE {
+ const ImageSkiaRep& second_rep) const override {
SkBitmap blended = SkBitmapOperations::CreateBlendedBitmap(
first_rep.sk_bitmap(), second_rep.sk_bitmap(), alpha_);
return ImageSkiaRep(blended, first_rep.scale());
@@ -136,7 +136,7 @@
virtual ~SuperimposedImageSource() {}
// gfx::CanvasImageSource override.
- virtual void Draw(Canvas* canvas) OVERRIDE {
+ virtual void Draw(Canvas* canvas) override {
canvas->DrawImageInt(first_, 0, 0);
canvas->DrawImageInt(second_,
(first_.width() - second_.width()) / 2,
@@ -161,7 +161,7 @@
private:
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
SkBitmap alpha;
alpha.allocN32Pixels(image_rep.pixel_width(),
@@ -190,7 +190,7 @@
// BinaryImageSource overrides:
virtual ImageSkiaRep CreateImageSkiaRep(
const ImageSkiaRep& first_rep,
- const ImageSkiaRep& second_rep) const OVERRIDE {
+ const ImageSkiaRep& second_rep) const override {
return ImageSkiaRep(SkBitmapOperations::CreateMaskedBitmap(
first_rep.sk_bitmap(), second_rep.sk_bitmap()),
first_rep.scale());
@@ -216,7 +216,7 @@
}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep source_rep = source_.GetRepresentation(scale);
gfx::Rect bounds = DIPToPixelBounds(gfx::Rect(src_x_, src_y_, dst_w_,
dst_h_), source_rep.scale());
@@ -249,7 +249,7 @@
}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
return gfx::ImageSkiaRep(
SkBitmapOperations::CreateHSLShiftedBitmap(image_rep.sk_bitmap(),
@@ -279,7 +279,7 @@
}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
ImageSkiaRep mask_rep = mask_.GetRepresentation(scale);
if (image_rep.scale() != mask_rep.scale()) {
@@ -314,7 +314,7 @@
}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
SkIRect subset_bounds_in_pixel = RectToSkIRect(
DIPToPixelBounds(subset_bounds_, image_rep.scale()));
@@ -346,7 +346,7 @@
virtual ~ResizeSource() {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
if (image_rep.GetWidth() == target_dip_size_.width() &&
image_rep.GetHeight() == target_dip_size_.height())
@@ -381,7 +381,7 @@
virtual ~DropShadowSource() {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
ShadowValues shadows_in_pixel;
@@ -413,7 +413,7 @@
virtual ~RotatedSource() {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
const SkBitmap rotated_bitmap =
SkBitmapOperations::Rotate(image_rep.sk_bitmap(), rotation_);
diff --git a/ui/gfx/interpolated_transform.cc b/ui/gfx/interpolated_transform.cc
index 4c807f1..693b656 100644
--- a/ui/gfx/interpolated_transform.cc
+++ b/ui/gfx/interpolated_transform.cc
@@ -230,8 +230,8 @@
gfx::Transform result;
float scale_x = ValueBetween(t, start_scale_.x(), end_scale_.x());
float scale_y = ValueBetween(t, start_scale_.y(), end_scale_.y());
- // TODO(vollick) 3d xforms.
- result.Scale(scale_x, scale_y);
+ float scale_z = ValueBetween(t, start_scale_.z(), end_scale_.z());
+ result.Scale3d(scale_x, scale_y, scale_z);
return result;
}
@@ -255,14 +255,28 @@
end_pos_(end_pos) {
}
+InterpolatedTranslation::InterpolatedTranslation(const gfx::Point3F& start_pos,
+ const gfx::Point3F& end_pos)
+ : InterpolatedTransform(), start_pos_(start_pos), end_pos_(end_pos) {
+}
+
+InterpolatedTranslation::InterpolatedTranslation(const gfx::Point3F& start_pos,
+ const gfx::Point3F& end_pos,
+ float start_time,
+ float end_time)
+ : InterpolatedTransform(start_time, end_time),
+ start_pos_(start_pos),
+ end_pos_(end_pos) {
+}
+
InterpolatedTranslation::~InterpolatedTranslation() {}
gfx::Transform
InterpolatedTranslation::InterpolateButDoNotCompose(float t) const {
gfx::Transform result;
- // TODO(vollick) 3d xforms.
- result.Translate(ValueBetween(t, start_pos_.x(), end_pos_.x()),
- ValueBetween(t, start_pos_.y(), end_pos_.y()));
+ result.Translate3d(ValueBetween(t, start_pos_.x(), end_pos_.x()),
+ ValueBetween(t, start_pos_.y(), end_pos_.y()),
+ ValueBetween(t, start_pos_.z(), end_pos_.z()));
return result;
}
diff --git a/ui/gfx/interpolated_transform.h b/ui/gfx/interpolated_transform.h
index dea9ce9..441af38 100644
--- a/ui/gfx/interpolated_transform.h
+++ b/ui/gfx/interpolated_transform.h
@@ -94,7 +94,7 @@
virtual ~InterpolatedRotation();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const float start_degrees_;
@@ -122,7 +122,7 @@
virtual ~InterpolatedAxisAngleRotation();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
gfx::Vector3dF axis_;
@@ -152,7 +152,7 @@
virtual ~InterpolatedScale();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const gfx::Point3F start_scale_;
@@ -169,14 +169,20 @@
const gfx::Point& end_pos,
float start_time,
float end_time);
+ InterpolatedTranslation(const gfx::Point3F& start_pos,
+ const gfx::Point3F& end_pos);
+ InterpolatedTranslation(const gfx::Point3F& start_pos,
+ const gfx::Point3F& end_pos,
+ float start_time,
+ float end_time);
virtual ~InterpolatedTranslation();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
- const gfx::Point start_pos_;
- const gfx::Point end_pos_;
+ const gfx::Point3F start_pos_;
+ const gfx::Point3F end_pos_;
DISALLOW_COPY_AND_ASSIGN(InterpolatedTranslation);
};
@@ -196,7 +202,7 @@
virtual ~InterpolatedConstantTransform();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const gfx::Transform transform_;
@@ -227,7 +233,7 @@
virtual ~InterpolatedTransformAboutPivot();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
void Init(const gfx::Point& pivot, InterpolatedTransform* transform);
@@ -250,7 +256,7 @@
virtual ~InterpolatedMatrixTransform();
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
+ virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
void Init(const gfx::Transform& start_transform,
diff --git a/ui/gfx/interpolated_transform_unittest.cc b/ui/gfx/interpolated_transform_unittest.cc
index 5215a8b..af6be9d 100644
--- a/ui/gfx/interpolated_transform_unittest.cc
+++ b/ui/gfx/interpolated_transform_unittest.cc
@@ -44,7 +44,7 @@
for (int i = 0; i <= 100; ++i) {
gfx::Transform scale;
- scale.Scale(i, i);
+ scale.Scale3d(i, i, i);
gfx::Transform interpolated = interpolated_scale.Interpolate(i / 100.0f);
CheckApproximatelyEqual(scale, interpolated);
interpolated = interpolated_scale_diff_start_end.Interpolate(i + 100);
@@ -69,6 +69,23 @@
}
}
+TEST(InterpolatedTransformTest, InterpolatedTranslate3d) {
+ ui::InterpolatedTranslation interpolated_xform(gfx::Point3F(0, 0, 0),
+ gfx::Point3F(100, 100, 100));
+
+ ui::InterpolatedTranslation interpolated_xform_diff_start_end(
+ gfx::Point3F(0, 0, 0), gfx::Point3F(100, 100, 100), 100, 200);
+
+ for (int i = 0; i <= 100; ++i) {
+ gfx::Transform xform;
+ xform.Translate3d(i, i, i);
+ gfx::Transform interpolated = interpolated_xform.Interpolate(i / 100.0f);
+ CheckApproximatelyEqual(xform, interpolated);
+ interpolated = interpolated_xform_diff_start_end.Interpolate(i + 100);
+ CheckApproximatelyEqual(xform, interpolated);
+ }
+}
+
TEST(InterpolatedTransformTest, InterpolatedRotationAboutPivot) {
gfx::Point pivot(100, 100);
gfx::Point above_pivot(100, 200);
diff --git a/ui/gfx/mac/coordinate_conversion_unittest.mm b/ui/gfx/mac/coordinate_conversion_unittest.mm
index a96bb04..ea0898d 100644
--- a/ui/gfx/mac/coordinate_conversion_unittest.mm
+++ b/ui/gfx/mac/coordinate_conversion_unittest.mm
@@ -35,8 +35,8 @@
MacCoordinateConversionTest() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
private:
scoped_ptr<base::mac::ScopedObjCClassSwizzler> swizzle_frame_;
diff --git a/ui/gfx/platform_font_ios.h b/ui/gfx/platform_font_ios.h
index 1d287c3..bb0aeaa 100644
--- a/ui/gfx/platform_font_ios.h
+++ b/ui/gfx/platform_font_ios.h
@@ -17,17 +17,17 @@
int font_size);
// Overridden from PlatformFont:
- virtual Font DeriveFont(int size_delta, int style) const OVERRIDE;
- virtual int GetHeight() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual int GetCapHeight() const OVERRIDE;
- virtual int GetExpectedTextWidth(int length) const OVERRIDE;
- virtual int GetStyle() const OVERRIDE;
- virtual std::string GetFontName() const OVERRIDE;
- virtual std::string GetActualFontNameForTesting() const OVERRIDE;
- virtual int GetFontSize() const OVERRIDE;
- virtual const FontRenderParams& GetFontRenderParams() const OVERRIDE;
- virtual NativeFont GetNativeFont() const OVERRIDE;
+ virtual Font DeriveFont(int size_delta, int style) const override;
+ virtual int GetHeight() const override;
+ virtual int GetBaseline() const override;
+ virtual int GetCapHeight() const override;
+ virtual int GetExpectedTextWidth(int length) const override;
+ virtual int GetStyle() const override;
+ virtual std::string GetFontName() const override;
+ virtual std::string GetActualFontNameForTesting() const override;
+ virtual int GetFontSize() const override;
+ virtual const FontRenderParams& GetFontRenderParams() const override;
+ virtual NativeFont GetNativeFont() const override;
private:
PlatformFontIOS(const std::string& font_name, int font_size, int style);
diff --git a/ui/gfx/platform_font_mac.h b/ui/gfx/platform_font_mac.h
index 6def51a..05c1249 100644
--- a/ui/gfx/platform_font_mac.h
+++ b/ui/gfx/platform_font_mac.h
@@ -19,17 +19,17 @@
int font_size);
// Overridden from PlatformFont:
- virtual Font DeriveFont(int size_delta, int style) const OVERRIDE;
- virtual int GetHeight() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual int GetCapHeight() const OVERRIDE;
- virtual int GetExpectedTextWidth(int length) const OVERRIDE;
- virtual int GetStyle() const OVERRIDE;
- virtual std::string GetFontName() const OVERRIDE;
- virtual std::string GetActualFontNameForTesting() const OVERRIDE;
- virtual int GetFontSize() const OVERRIDE;
- virtual const FontRenderParams& GetFontRenderParams() const OVERRIDE;
- virtual NativeFont GetNativeFont() const OVERRIDE;
+ virtual Font DeriveFont(int size_delta, int style) const override;
+ virtual int GetHeight() const override;
+ virtual int GetBaseline() const override;
+ virtual int GetCapHeight() const override;
+ virtual int GetExpectedTextWidth(int length) const override;
+ virtual int GetStyle() const override;
+ virtual std::string GetFontName() const override;
+ virtual std::string GetActualFontNameForTesting() const override;
+ virtual int GetFontSize() const override;
+ virtual const FontRenderParams& GetFontRenderParams() const override;
+ virtual NativeFont GetNativeFont() const override;
private:
PlatformFontMac(const std::string& font_name, int font_size, int font_style);
diff --git a/ui/gfx/platform_font_pango.h b/ui/gfx/platform_font_pango.h
index a636db2..5041bbb 100644
--- a/ui/gfx/platform_font_pango.h
+++ b/ui/gfx/platform_font_pango.h
@@ -41,17 +41,17 @@
#endif
// Overridden from PlatformFont:
- virtual Font DeriveFont(int size_delta, int style) const OVERRIDE;
- virtual int GetHeight() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual int GetCapHeight() const OVERRIDE;
- virtual int GetExpectedTextWidth(int length) const OVERRIDE;
- virtual int GetStyle() const OVERRIDE;
- virtual std::string GetFontName() const OVERRIDE;
- virtual std::string GetActualFontNameForTesting() const OVERRIDE;
- virtual int GetFontSize() const OVERRIDE;
- virtual const FontRenderParams& GetFontRenderParams() const OVERRIDE;
- virtual NativeFont GetNativeFont() const OVERRIDE;
+ virtual Font DeriveFont(int size_delta, int style) const override;
+ virtual int GetHeight() const override;
+ virtual int GetBaseline() const override;
+ virtual int GetCapHeight() const override;
+ virtual int GetExpectedTextWidth(int length) const override;
+ virtual int GetStyle() const override;
+ virtual std::string GetFontName() const override;
+ virtual std::string GetActualFontNameForTesting() const override;
+ virtual int GetFontSize() const override;
+ virtual const FontRenderParams& GetFontRenderParams() const override;
+ virtual NativeFont GetNativeFont() const override;
private:
// Create a new instance of this object with the specified properties. Called
diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h
index 1434fe6..90160aa 100644
--- a/ui/gfx/platform_font_win.h
+++ b/ui/gfx/platform_font_win.h
@@ -54,17 +54,17 @@
Font DeriveFontWithHeight(int height, int style);
// Overridden from PlatformFont:
- virtual Font DeriveFont(int size_delta, int style) const OVERRIDE;
- virtual int GetHeight() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual int GetCapHeight() const OVERRIDE;
- virtual int GetExpectedTextWidth(int length) const OVERRIDE;
- virtual int GetStyle() const OVERRIDE;
- virtual std::string GetFontName() const OVERRIDE;
- virtual std::string GetActualFontNameForTesting() const OVERRIDE;
- virtual int GetFontSize() const OVERRIDE;
- virtual const FontRenderParams& GetFontRenderParams() const OVERRIDE;
- virtual NativeFont GetNativeFont() const OVERRIDE;
+ virtual Font DeriveFont(int size_delta, int style) const override;
+ virtual int GetHeight() const override;
+ virtual int GetBaseline() const override;
+ virtual int GetCapHeight() const override;
+ virtual int GetExpectedTextWidth(int length) const override;
+ virtual int GetStyle() const override;
+ virtual std::string GetFontName() const override;
+ virtual std::string GetActualFontNameForTesting() const override;
+ virtual int GetFontSize() const override;
+ virtual const FontRenderParams& GetFontRenderParams() const override;
+ virtual NativeFont GetNativeFont() const override;
private:
virtual ~PlatformFontWin() {}
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 8936e53..329be9f 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -80,28 +80,28 @@
virtual ~RenderTextHarfBuzz();
// Overridden from RenderText.
- virtual Size GetStringSize() OVERRIDE;
- virtual SizeF GetStringSizeF() OVERRIDE;
- virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
- virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE;
- virtual Range GetGlyphBounds(size_t index) OVERRIDE;
+ virtual Size GetStringSize() override;
+ virtual SizeF GetStringSizeF() override;
+ virtual SelectionModel FindCursorPosition(const Point& point) override;
+ virtual std::vector<FontSpan> GetFontSpansForTesting() override;
+ virtual Range GetGlyphBounds(size_t index) override;
protected:
// Overridden from RenderText.
- virtual int GetLayoutTextBaseline() OVERRIDE;
+ virtual int GetLayoutTextBaseline() override;
virtual SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
+ VisualCursorDirection direction) override;
virtual SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE;
- virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
- virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
- virtual bool IsValidCursorIndex(size_t index) OVERRIDE;
- virtual void ResetLayout() OVERRIDE;
- virtual void EnsureLayout() OVERRIDE;
- virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
+ VisualCursorDirection direction) override;
+ virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ virtual size_t TextIndexToLayoutIndex(size_t index) const override;
+ virtual size_t LayoutIndexToTextIndex(size_t index) const override;
+ virtual bool IsValidCursorIndex(size_t index) override;
+ virtual void ResetLayout() override;
+ virtual void EnsureLayout() override;
+ virtual void DrawVisualText(Canvas* canvas) override;
private:
friend class RenderTextTest;
diff --git a/ui/gfx/render_text_mac.h b/ui/gfx/render_text_mac.h
index ad03b84..f69bedb 100644
--- a/ui/gfx/render_text_mac.h
+++ b/ui/gfx/render_text_mac.h
@@ -26,28 +26,28 @@
virtual ~RenderTextMac();
// Overridden from RenderText:
- virtual Size GetStringSize() OVERRIDE;
- virtual SizeF GetStringSizeF() OVERRIDE;
- virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
- virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE;
+ virtual Size GetStringSize() override;
+ virtual SizeF GetStringSizeF() override;
+ virtual SelectionModel FindCursorPosition(const Point& point) override;
+ virtual std::vector<FontSpan> GetFontSpansForTesting() override;
protected:
// Overridden from RenderText:
- virtual int GetLayoutTextBaseline() OVERRIDE;
+ virtual int GetLayoutTextBaseline() override;
virtual SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
+ VisualCursorDirection direction) override;
virtual SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
- virtual Range GetGlyphBounds(size_t index) OVERRIDE;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE;
- virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
- virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
- virtual bool IsValidCursorIndex(size_t index) OVERRIDE;
- virtual void ResetLayout() OVERRIDE;
- virtual void EnsureLayout() OVERRIDE;
- virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
+ VisualCursorDirection direction) override;
+ virtual Range GetGlyphBounds(size_t index) override;
+ virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ virtual size_t TextIndexToLayoutIndex(size_t index) const override;
+ virtual size_t LayoutIndexToTextIndex(size_t index) const override;
+ virtual bool IsValidCursorIndex(size_t index) override;
+ virtual void ResetLayout() override;
+ virtual void EnsureLayout() override;
+ virtual void DrawVisualText(Canvas* canvas) override;
private:
struct TextRun {
diff --git a/ui/gfx/render_text_pango.h b/ui/gfx/render_text_pango.h
index 4c62e0a..9e4c55c 100644
--- a/ui/gfx/render_text_pango.h
+++ b/ui/gfx/render_text_pango.h
@@ -19,27 +19,27 @@
virtual ~RenderTextPango();
// Overridden from RenderText:
- virtual Size GetStringSize() OVERRIDE;
- virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
- virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE;
+ virtual Size GetStringSize() override;
+ virtual SelectionModel FindCursorPosition(const Point& point) override;
+ virtual std::vector<FontSpan> GetFontSpansForTesting() override;
protected:
// Overridden from RenderText:
- virtual int GetLayoutTextBaseline() OVERRIDE;
+ virtual int GetLayoutTextBaseline() override;
virtual SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
+ VisualCursorDirection direction) override;
virtual SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
- virtual Range GetGlyphBounds(size_t index) OVERRIDE;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE;
- virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
- virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
- virtual bool IsValidCursorIndex(size_t index) OVERRIDE;
- virtual void ResetLayout() OVERRIDE;
- virtual void EnsureLayout() OVERRIDE;
- virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
+ VisualCursorDirection direction) override;
+ virtual Range GetGlyphBounds(size_t index) override;
+ virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ virtual size_t TextIndexToLayoutIndex(size_t index) const override;
+ virtual size_t LayoutIndexToTextIndex(size_t index) const override;
+ virtual bool IsValidCursorIndex(size_t index) override;
+ virtual void ResetLayout() override;
+ virtual void EnsureLayout() override;
+ virtual void DrawVisualText(Canvas* canvas) override;
private:
friend class RenderTextTest;
diff --git a/ui/gfx/render_text_win.h b/ui/gfx/render_text_win.h
index bfe3793..aaf3a1e 100644
--- a/ui/gfx/render_text_win.h
+++ b/ui/gfx/render_text_win.h
@@ -63,27 +63,27 @@
virtual ~RenderTextWin();
// Overridden from RenderText:
- virtual Size GetStringSize() OVERRIDE;
- virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
- virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE;
+ virtual Size GetStringSize() override;
+ virtual SelectionModel FindCursorPosition(const Point& point) override;
+ virtual std::vector<FontSpan> GetFontSpansForTesting() override;
protected:
// Overridden from RenderText:
- virtual int GetLayoutTextBaseline() OVERRIDE;
+ virtual int GetLayoutTextBaseline() override;
virtual SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
+ VisualCursorDirection direction) override;
virtual SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
- VisualCursorDirection direction) OVERRIDE;
- virtual Range GetGlyphBounds(size_t index) OVERRIDE;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE;
- virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
- virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
- virtual bool IsValidCursorIndex(size_t index) OVERRIDE;
- virtual void ResetLayout() OVERRIDE;
- virtual void EnsureLayout() OVERRIDE;
- virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
+ VisualCursorDirection direction) override;
+ virtual Range GetGlyphBounds(size_t index) override;
+ virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ virtual size_t TextIndexToLayoutIndex(size_t index) const override;
+ virtual size_t LayoutIndexToTextIndex(size_t index) const override;
+ virtual bool IsValidCursorIndex(size_t index) override;
+ virtual void ResetLayout() override;
+ virtual void EnsureLayout() override;
+ virtual void DrawVisualText(Canvas* canvas) override;
private:
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_BreakRunsByUnicodeBlocks);
diff --git a/ui/gfx/screen_android.cc b/ui/gfx/screen_android.cc
index 31e3baa..4f04353 100644
--- a/ui/gfx/screen_android.cc
+++ b/ui/gfx/screen_android.cc
@@ -15,22 +15,22 @@
public:
ScreenAndroid() {}
- virtual bool IsDIPEnabled() OVERRIDE { return true; }
+ virtual bool IsDIPEnabled() override { return true; }
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE { return gfx::Point(); }
+ virtual gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE {
+ virtual gfx::NativeWindow GetWindowUnderCursor() override {
NOTIMPLEMENTED();
return NULL;
}
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE {
+ override {
NOTIMPLEMENTED();
return NULL;
}
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
+ virtual gfx::Display GetPrimaryDisplay() const override {
gfx::DeviceDisplayInfo device_info;
const float device_scale_factor = device_info.GetDIPScale();
// Note: GetPhysicalDisplayWidth/Height() does not subtract window
@@ -54,31 +54,31 @@
}
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const OVERRIDE {
+ gfx::NativeView view) const override {
return GetPrimaryDisplay();
}
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE {
+ const gfx::Point& point) const override {
return GetPrimaryDisplay();
}
- virtual int GetNumDisplays() const OVERRIDE { return 1; }
+ virtual int GetNumDisplays() const override { return 1; }
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE {
+ virtual std::vector<gfx::Display> GetAllDisplays() const override {
return std::vector<gfx::Display>(1, GetPrimaryDisplay());
}
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE {
+ const gfx::Rect& match_rect) const override {
return GetPrimaryDisplay();
}
- virtual void AddObserver(DisplayObserver* observer) OVERRIDE {
+ virtual void AddObserver(DisplayObserver* observer) override {
// no display change on Android.
}
- virtual void RemoveObserver(DisplayObserver* observer) OVERRIDE {
+ virtual void RemoveObserver(DisplayObserver* observer) override {
// no display change on Android.
}
diff --git a/ui/gfx/screen_ios.mm b/ui/gfx/screen_ios.mm
index f630f00..ac5ccc4 100644
--- a/ui/gfx/screen_ios.mm
+++ b/ui/gfx/screen_ios.mm
@@ -12,27 +12,27 @@
namespace {
class ScreenIos : public gfx::Screen {
- virtual bool IsDIPEnabled() OVERRIDE {
+ virtual bool IsDIPEnabled() override {
return true;
}
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE {
+ virtual gfx::Point GetCursorScreenPoint() override {
NOTIMPLEMENTED();
return gfx::Point(0, 0);
}
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE {
+ virtual gfx::NativeWindow GetWindowUnderCursor() override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE {
+ override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
- virtual int GetNumDisplays() const OVERRIDE {
+ virtual int GetNumDisplays() const override {
#if TARGET_IPHONE_SIMULATOR
// UIScreen does not reliably return correct results on the simulator.
return 1;
@@ -41,34 +41,34 @@
#endif
}
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE {
+ virtual std::vector<gfx::Display> GetAllDisplays() const override {
NOTIMPLEMENTED();
return std::vector<gfx::Display>(1, GetPrimaryDisplay());
}
// Returns the display nearest the specified window.
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const OVERRIDE {
+ gfx::NativeView view) const override {
NOTIMPLEMENTED();
return gfx::Display();
}
// Returns the the display nearest the specified point.
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE {
+ const gfx::Point& point) const override {
NOTIMPLEMENTED();
return gfx::Display();
}
// Returns the display that most closely intersects the provided bounds.
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE {
+ const gfx::Rect& match_rect) const override {
NOTIMPLEMENTED();
return gfx::Display();
}
// Returns the primary display.
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
+ virtual gfx::Display GetPrimaryDisplay() const override {
UIScreen* mainScreen = [UIScreen mainScreen];
CHECK(mainScreen);
gfx::Display display(0, gfx::Rect(mainScreen.bounds));
@@ -76,11 +76,11 @@
return display;
}
- virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE {
+ virtual void AddObserver(gfx::DisplayObserver* observer) override {
// no display change on iOS.
}
- virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE {
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) override {
// no display change on iOS.
}
};
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index 0b1f41f..c07dd80 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -91,11 +91,11 @@
ScreenMac::DisplayReconfigurationCallBack, this);
}
- virtual bool IsDIPEnabled() OVERRIDE {
+ virtual bool IsDIPEnabled() override {
return true;
}
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE {
+ virtual gfx::Point GetCursorScreenPoint() override {
NSPoint mouseLocation = [NSEvent mouseLocation];
// Flip coordinates to gfx (0,0 in top-left corner) using primary screen.
NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
@@ -103,28 +103,28 @@
return gfx::Point(mouseLocation.x, mouseLocation.y);
}
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE {
+ virtual gfx::NativeWindow GetWindowUnderCursor() override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE {
+ override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
- virtual int GetNumDisplays() const OVERRIDE {
+ virtual int GetNumDisplays() const override {
return GetAllDisplays().size();
}
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE {
+ virtual std::vector<gfx::Display> GetAllDisplays() const override {
return displays_;
}
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const OVERRIDE {
+ gfx::NativeView view) const override {
NSWindow* window = nil;
#if !defined(USE_AURA)
if (view)
@@ -139,7 +139,7 @@
}
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE {
+ const gfx::Point& point) const override {
NSPoint ns_point = NSPointFromCGPoint(point.ToCGPoint());
NSArray* screens = [NSScreen screens];
@@ -154,13 +154,13 @@
// Returns the display that most closely intersects the provided bounds.
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE {
+ const gfx::Rect& match_rect) const override {
NSScreen* match_screen = GetMatchingScreen(match_rect);
return GetDisplayForScreen(match_screen);
}
// Returns the primary display.
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
+ virtual gfx::Display GetPrimaryDisplay() const override {
// Primary display is defined as the display with the menubar,
// which is always at index 0.
NSScreen* primary = [[NSScreen screens] objectAtIndex:0];
@@ -168,11 +168,11 @@
return display;
}
- virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE {
+ virtual void AddObserver(gfx::DisplayObserver* observer) override {
change_notifier_.AddObserver(observer);
}
- virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE {
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) override {
change_notifier_.RemoveObserver(observer);
}
diff --git a/ui/gfx/screen_win.h b/ui/gfx/screen_win.h
index 6ca5601..7d7d2b0 100644
--- a/ui/gfx/screen_win.h
+++ b/ui/gfx/screen_win.h
@@ -21,28 +21,28 @@
protected:
// Overridden from gfx::Screen:
- virtual bool IsDIPEnabled() OVERRIDE;
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE;
+ virtual bool IsDIPEnabled() override;
+ virtual gfx::Point GetCursorScreenPoint() override;
+ virtual gfx::NativeWindow GetWindowUnderCursor() override;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE;
- virtual int GetNumDisplays() const OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE;
+ override;
+ virtual int GetNumDisplays() const override;
+ virtual std::vector<gfx::Display> GetAllDisplays() const override;
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView window) const OVERRIDE;
+ gfx::NativeView window) const override;
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE;
+ const gfx::Point& point) const override;
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
- virtual void AddObserver(DisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(DisplayObserver* observer) OVERRIDE;
+ const gfx::Rect& match_rect) const override;
+ virtual gfx::Display GetPrimaryDisplay() const override;
+ virtual void AddObserver(DisplayObserver* observer) override;
+ virtual void RemoveObserver(DisplayObserver* observer) override;
// Overriden from gfx::SingletonHwnd::Observer.
virtual void OnWndProc(HWND hwnd,
UINT message,
WPARAM wparam,
- LPARAM lparam) OVERRIDE;
+ LPARAM lparam) override;
// Returns the HWND associated with the NativeView.
virtual HWND GetHWNDFromNativeView(NativeView window) const;
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
index ad7c9b9..90813d0 100644
--- a/ui/gfx/switches.cc
+++ b/ui/gfx/switches.cc
@@ -20,4 +20,12 @@
// Overrides the device scale factor for the browser UI and the contents.
const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
+#if defined(OS_WIN)
+// Disables the DirectWrite font rendering system on windows.
+const char kDisableDirectWrite[] = "disable-direct-write";
+
+// Enables DirectWrite font rendering for general UI elements.
+const char kEnableDirectWriteForUI[] = "enable-directwrite-for-ui";
+#endif
+
} // namespace switches
diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
index 1fb28a1..e85dabf 100644
--- a/ui/gfx/switches.h
+++ b/ui/gfx/switches.h
@@ -5,6 +5,7 @@
#ifndef UI_GFX_SWITCHES_H_
#define UI_GFX_SWITCHES_H_
+#include "build/build_config.h"
#include "ui/gfx/gfx_export.h"
namespace switches {
@@ -15,6 +16,11 @@
GFX_EXPORT extern const char kEnableWebkitTextSubpixelPositioning[];
GFX_EXPORT extern const char kForceDeviceScaleFactor[];
+#if defined(OS_WIN)
+GFX_EXPORT extern const char kDisableDirectWrite[];
+GFX_EXPORT extern const char kEnableDirectWriteForUI[];
+#endif
+
} // namespace switches
#endif // UI_GFX_SWITCHES_H_
diff --git a/ui/gfx/sys_color_change_listener.cc b/ui/gfx/sys_color_change_listener.cc
index 4a394ae..7f52f89 100644
--- a/ui/gfx/sys_color_change_listener.cc
+++ b/ui/gfx/sys_color_change_listener.cc
@@ -65,7 +65,7 @@
virtual void OnWndProc(HWND hwnd,
UINT message,
WPARAM wparam,
- LPARAM lparam) OVERRIDE;
+ LPARAM lparam) override;
ObserverList<SysColorChangeListener> listeners_;
};
diff --git a/ui/gfx/test/run_all_unittests.cc b/ui/gfx/test/run_all_unittests.cc
index 14ceef9..5282da1 100644
--- a/ui/gfx/test/run_all_unittests.cc
+++ b/ui/gfx/test/run_all_unittests.cc
@@ -24,7 +24,7 @@
GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
base::TestSuite::Initialize();
#if defined(OS_ANDROID)
@@ -38,7 +38,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/gfx/test/ui_cocoa_test_helper.h b/ui/gfx/test/ui_cocoa_test_helper.h
index c75c7bd..faf66dd 100644
--- a/ui/gfx/test/ui_cocoa_test_helper.h
+++ b/ui/gfx/test/ui_cocoa_test_helper.h
@@ -59,7 +59,7 @@
// to close them before CocoaTest::TearDown is called. A standard way of doing
// this would be to create them in SetUp (after calling CocoaTest::Setup) and
// then close them in TearDown before calling CocoaTest::TearDown.
- virtual void TearDown() OVERRIDE;
+ virtual void TearDown() override;
// Retuns a test window that can be used by views and other UI objects
// as part of their tests. Is created lazily, and will be closed correctly
diff --git a/ui/gfx/win/direct_write.cc b/ui/gfx/win/direct_write.cc
new file mode 100644
index 0000000..fcc185c
--- /dev/null
+++ b/ui/gfx/win/direct_write.cc
@@ -0,0 +1,48 @@
+// Copyright 2014 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.
+
+#include "ui/gfx/win/direct_write.h"
+
+#include "base/basictypes.h"
+#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
+#include "base/win/windows_version.h"
+#include "ui/gfx/switches.h"
+#include "ui/gfx/win/dpi.h"
+
+namespace gfx {
+namespace win {
+
+bool ShouldUseDirectWrite() {
+ // If the flag is currently on, and we're on Win7 or above, we enable
+ // DirectWrite. Skia does not require the additions to DirectWrite in QFE
+ // 2670838, but a simple 'better than XP' check is not enough.
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
+ return false;
+
+ base::win::OSInfo::VersionNumber os_version =
+ base::win::OSInfo::GetInstance()->version_number();
+ if ((os_version.major == 6) && (os_version.minor == 1)) {
+ // We can't use DirectWrite for pre-release versions of Windows 7.
+ if (os_version.build < 7600)
+ return false;
+ }
+ // If forced off, don't use it.
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kDisableDirectWrite))
+ return false;
+
+ // Can't use GDI on HiDPI.
+ if (gfx::GetDPIScale() > 1.0f)
+ return true;
+
+ // Otherwise, check the field trial.
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("DirectWrite");
+ return group_name != "Disabled";
+}
+
+} // namespace win
+} // namespace gfx
diff --git a/ui/gfx/win/direct_write.h b/ui/gfx/win/direct_write.h
new file mode 100644
index 0000000..b621bf8
--- /dev/null
+++ b/ui/gfx/win/direct_write.h
@@ -0,0 +1,19 @@
+// Copyright 2014 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 UI_GFX_WIN_DIRECT_WRITE_H_
+#define UI_GFX_WIN_DIRECT_WRITE_H_
+
+#include "ui/gfx/gfx_export.h"
+
+namespace gfx {
+namespace win {
+
+// Returns whether DirectWrite font rendering should be used.
+GFX_EXPORT bool ShouldUseDirectWrite();
+
+} // namespace win
+} // namespace gfx
+
+#endif // UI_GFX_WIN_DIRECT_WRITE_H_
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index 88766ce..2777f7c 100644
--- a/ui/gfx/win/dpi.cc
+++ b/ui/gfx/win/dpi.cc
@@ -5,12 +5,10 @@
#include "ui/gfx/win/dpi.h"
#include <windows.h>
-#include "base/command_line.h"
#include "base/win/scoped_hdc.h"
#include "base/win/windows_version.h"
#include "base/win/registry.h"
#include "ui/gfx/display.h"
-#include "ui/gfx/switches.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/size_conversions.h"
diff --git a/ui/gfx/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc
index 050aa9b..41eead4 100644
--- a/ui/gfx/win/hwnd_util.cc
+++ b/ui/gfx/win/hwnd_util.cc
@@ -112,7 +112,7 @@
void* GetWindowUserData(HWND hwnd) {
DWORD process_id = 0;
- DWORD thread_id = GetWindowThreadProcessId(hwnd, &process_id);
+ GetWindowThreadProcessId(hwnd, &process_id);
// A window outside the current process needs to be ignored.
if (process_id != ::GetCurrentProcessId())
return NULL;
diff --git a/ui/gfx/win/singleton_hwnd.h b/ui/gfx/win/singleton_hwnd.h
index 50fb9fd..631da25 100644
--- a/ui/gfx/win/singleton_hwnd.h
+++ b/ui/gfx/win/singleton_hwnd.h
@@ -42,7 +42,7 @@
WPARAM wparam,
LPARAM lparam,
LRESULT& result,
- DWORD msg_map_id) OVERRIDE;
+ DWORD msg_map_id) override;
private:
friend struct DefaultSingletonTraits<SingletonHwnd>;
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index e3ceac3..fddbde7 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -32,8 +32,6 @@
"android/surface_texture.h",
"android/surface_texture_listener.cc",
"android/surface_texture_listener.h",
- "android/surface_texture_tracker.cc",
- "android/surface_texture_tracker.h",
"gl_bindings.h",
"gl_bindings_skia_in_process.cc",
"gl_bindings_skia_in_process.h",
@@ -153,6 +151,10 @@
}
if (is_linux) {
deps += [ "//third_party/libevent" ]
+ sources += [
+ "gl_image_linux_dma_buffer.cc",
+ "gl_image_linux_dma_buffer.h",
+ ]
}
if (use_x11) {
sources += [
diff --git a/ui/gl/android/surface_texture_tracker.cc b/ui/gl/android/surface_texture_tracker.cc
deleted file mode 100644
index d0ff16a..0000000
--- a/ui/gl/android/surface_texture_tracker.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 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.
-
-#include "ui/gl/android/surface_texture_tracker.h"
-
-#include "base/logging.h"
-
-namespace gfx {
-namespace {
-SurfaceTextureTracker* g_instance = NULL;
-} // namespace
-
-// static
-SurfaceTextureTracker* SurfaceTextureTracker::GetInstance() {
- DCHECK(g_instance);
- return g_instance;
-}
-
-// static
-void SurfaceTextureTracker::InitInstance(SurfaceTextureTracker* tracker) {
- DCHECK(!g_instance);
- g_instance = tracker;
-}
-
-} // namespace gfx
diff --git a/ui/gl/android/surface_texture_tracker.h b/ui/gl/android/surface_texture_tracker.h
deleted file mode 100644
index a86f144..0000000
--- a/ui/gl/android/surface_texture_tracker.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 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 UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_
-#define UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_
-
-#include "base/memory/ref_counted.h"
-#include "ui/gl/gl_export.h"
-
-namespace gfx {
-
-class SurfaceTexture;
-
-// This interface is used to take ownership of preallocated surface textures
-// with specific ids.
-class GL_EXPORT SurfaceTextureTracker {
- public:
- static SurfaceTextureTracker* GetInstance();
- static void InitInstance(SurfaceTextureTracker* tracker);
-
- virtual scoped_refptr<SurfaceTexture> AcquireSurfaceTexture(
- int primary_id,
- int secondary_id) = 0;
-
- protected:
- virtual ~SurfaceTextureTracker() {}
-};
-
-} // namespace gfx
-
-#endif // UI_GL_ANDROID_SURFACE_TEXTURE_TRACKER_H_
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
index 75f55c7..303c01e 100755
--- a/ui/gl/generate_bindings.py
+++ b/ui/gl/generate_bindings.py
@@ -216,7 +216,7 @@
'names': ['glDrawBuffer'],
'arguments': 'GLenum mode', },
{ 'return_type': 'void',
- 'names': ['glDrawBuffersARB', 'glDrawBuffersEXT'],
+ 'names': ['glDrawBuffersARB', 'glDrawBuffersEXT', 'glDrawBuffers'],
'arguments': 'GLsizei n, const GLenum* bufs', },
{ 'return_type': 'void',
'names': ['glDrawElements'],
@@ -1415,7 +1415,7 @@
# Write API declaration.
for func in functions:
- file.write(' virtual %s %sFn(%s) OVERRIDE;\n' %
+ file.write(' virtual %s %sFn(%s) override;\n' %
(func['return_type'], func['known_as'], func['arguments']))
file.write('\n')
diff --git a/ui/gl/gl.gyp b/ui/gl/gl.gyp
index 13f7daa..f3be5b2 100644
--- a/ui/gl/gl.gyp
+++ b/ui/gl/gl.gyp
@@ -49,8 +49,6 @@
'android/surface_texture.h',
'android/surface_texture_listener.cc',
'android/surface_texture_listener.h',
- 'android/surface_texture_tracker.cc',
- 'android/surface_texture_tracker.h',
'gl_bindings.h',
'gl_bindings_skia_in_process.cc',
'gl_bindings_skia_in_process.h',
@@ -199,6 +197,12 @@
'gl_implementation_osmesa.h',
],
}],
+ ['OS=="linux"', {
+ 'sources': [
+ 'gl_image_linux_dma_buffer.cc',
+ 'gl_image_linux_dma_buffer.h',
+ ],
+ }],
['use_x11 == 1', {
'sources': [
'gl_context_glx.cc',
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
index 18dc6e6..22774f5 100644
--- a/ui/gl/gl_bindings.h
+++ b/ui/gl/gl_bindings.h
@@ -131,11 +131,6 @@
// GL_CHROMIUM_sync_query
#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7
-// GL_CHROMIUM_image
-#define GL_IMAGE_ROWBYTES_CHROMIUM 0x78F0
-#define GL_IMAGE_MAP_CHROMIUM 0x78F1
-#define GL_IMAGE_SCANOUT_CHROMIUM 0x78F2
-
// GL_CHROMIUM_gpu_memory_buffer_image
#define GL_MAP_CHROMIUM 0x78F1
#define GL_SCANOUT_CHROMIUM 0x78F2
@@ -196,6 +191,9 @@
#define GL_STENCIL_EXT 0x1802
#endif
+// GL_EXT_sRGB
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+
// GL_ARB_get_program_binary
#define PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
// GL_OES_get_program_binary
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index 323b373..8e5ecd8 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -188,7 +188,7 @@
protected:
virtual ~GLContextReal();
- virtual void SetCurrent(GLSurface* surface) OVERRIDE;
+ virtual void SetCurrent(GLSurface* surface) override;
private:
DISALLOW_COPY_AND_ASSIGN(GLContextReal);
diff --git a/ui/gl/gl_context_android.cc b/ui/gl/gl_context_android.cc
index 51377a3..2d91a65 100644
--- a/ui/gl/gl_context_android.cc
+++ b/ui/gl/gl_context_android.cc
@@ -27,14 +27,14 @@
// Implement GLContext.
virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE {}
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE {}
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE { return true; }
- virtual void* GetHandle() OVERRIDE { return NULL; }
- virtual void SetSwapInterval(int interval) OVERRIDE {}
- virtual std::string GetExtensions() OVERRIDE;
+ GpuPreference gpu_preference) override;
+ virtual void Destroy() override {}
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override {}
+ virtual bool IsCurrent(GLSurface* surface) override { return true; }
+ virtual void* GetHandle() override { return NULL; }
+ virtual void SetSwapInterval(int interval) override {}
+ virtual std::string GetExtensions() override;
protected:
virtual ~GLNonOwnedContext() {}
diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc
index 999c921..10f854a 100644
--- a/ui/gl/gl_context_cgl.cc
+++ b/ui/gl/gl_context_cgl.cc
@@ -232,10 +232,8 @@
void GLContextCGL::SetSwapInterval(int interval) {
DCHECK(IsCurrent(NULL));
- LOG(WARNING) << "GLContex: GLContextCGL::SetSwapInterval is ignored.";
}
-
bool GLContextCGL::GetTotalGpuMemory(size_t* bytes) {
DCHECK(bytes);
*bytes = 0;
diff --git a/ui/gl/gl_context_cgl.h b/ui/gl/gl_context_cgl.h
index a83eaaf..5bcb335 100644
--- a/ui/gl/gl_context_cgl.h
+++ b/ui/gl/gl_context_cgl.h
@@ -20,15 +20,15 @@
// Implement GLContext.
virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void SetSwapInterval(int interval) OVERRIDE;
- virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
- virtual void SetSafeToForceGpuSwitch() OVERRIDE;
+ GpuPreference gpu_preference) override;
+ virtual void Destroy() override;
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override;
+ virtual bool IsCurrent(GLSurface* surface) override;
+ virtual void* GetHandle() override;
+ virtual void SetSwapInterval(int interval) override;
+ virtual bool GetTotalGpuMemory(size_t* bytes) override;
+ virtual void SetSafeToForceGpuSwitch() override;
protected:
virtual ~GLContextCGL();
diff --git a/ui/gl/gl_context_egl.h b/ui/gl/gl_context_egl.h
index 9dd9a72..82d15a6 100644
--- a/ui/gl/gl_context_egl.h
+++ b/ui/gl/gl_context_egl.h
@@ -25,17 +25,17 @@
// Implement GLContext.
virtual bool Initialize(
- GLSurface* compatible_surface, GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void SetSwapInterval(int interval) OVERRIDE;
- virtual std::string GetExtensions() OVERRIDE;
- virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE;
- virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
- virtual void SetUnbindFboOnMakeCurrent() OVERRIDE;
+ GLSurface* compatible_surface, GpuPreference gpu_preference) override;
+ virtual void Destroy() override;
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override;
+ virtual bool IsCurrent(GLSurface* surface) override;
+ virtual void* GetHandle() override;
+ virtual void SetSwapInterval(int interval) override;
+ virtual std::string GetExtensions() override;
+ virtual bool WasAllocatedUsingRobustnessExtension() override;
+ virtual bool GetTotalGpuMemory(size_t* bytes) override;
+ virtual void SetUnbindFboOnMakeCurrent() override;
protected:
virtual ~GLContextEGL();
diff --git a/ui/gl/gl_context_glx.h b/ui/gl/gl_context_glx.h
index 987a8d8..ca53403 100644
--- a/ui/gl/gl_context_glx.h
+++ b/ui/gl/gl_context_glx.h
@@ -25,16 +25,16 @@
// Implement GLContext.
virtual bool Initialize(
- GLSurface* compatible_surface, GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void SetSwapInterval(int interval) OVERRIDE;
- virtual std::string GetExtensions() OVERRIDE;
- virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
- virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE;
+ GLSurface* compatible_surface, GpuPreference gpu_preference) override;
+ virtual void Destroy() override;
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override;
+ virtual bool IsCurrent(GLSurface* surface) override;
+ virtual void* GetHandle() override;
+ virtual void SetSwapInterval(int interval) override;
+ virtual std::string GetExtensions() override;
+ virtual bool GetTotalGpuMemory(size_t* bytes) override;
+ virtual bool WasAllocatedUsingRobustnessExtension() override;
protected:
virtual ~GLContextGLX();
diff --git a/ui/gl/gl_context_osmesa.h b/ui/gl/gl_context_osmesa.h
index f78b525..5cac4de 100644
--- a/ui/gl/gl_context_osmesa.h
+++ b/ui/gl/gl_context_osmesa.h
@@ -23,13 +23,13 @@
// Implement GLContext.
virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void SetSwapInterval(int interval) OVERRIDE;
+ GpuPreference gpu_preference) override;
+ virtual void Destroy() override;
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override;
+ virtual bool IsCurrent(GLSurface* surface) override;
+ virtual void* GetHandle() override;
+ virtual void SetSwapInterval(int interval) override;
protected:
virtual ~GLContextOSMesa();
diff --git a/ui/gl/gl_context_stub.h b/ui/gl/gl_context_stub.h
index d57e02e..c95be1d 100644
--- a/ui/gl/gl_context_stub.h
+++ b/ui/gl/gl_context_stub.h
@@ -16,15 +16,15 @@
// Implement GLContext.
virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
- virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
- virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void SetSwapInterval(int interval) OVERRIDE;
- virtual std::string GetExtensions() OVERRIDE;
- virtual std::string GetGLRenderer() OVERRIDE;
+ GpuPreference gpu_preference) override;
+ virtual void Destroy() override;
+ virtual bool MakeCurrent(GLSurface* surface) override;
+ virtual void ReleaseCurrent(GLSurface* surface) override;
+ virtual bool IsCurrent(GLSurface* surface) override;
+ virtual void* GetHandle() override;
+ virtual void SetSwapInterval(int interval) override;
+ virtual std::string GetExtensions() override;
+ virtual std::string GetGLRenderer() override;
protected:
virtual ~GLContextStub();
diff --git a/ui/gl/gl_context_stub_with_extensions.h b/ui/gl/gl_context_stub_with_extensions.h
index e048990..e701e0d 100644
--- a/ui/gl/gl_context_stub_with_extensions.h
+++ b/ui/gl/gl_context_stub_with_extensions.h
@@ -15,13 +15,13 @@
class GL_EXPORT GLContextStubWithExtensions : public gfx::GLContextStub {
public:
GLContextStubWithExtensions() {}
- virtual std::string GetExtensions() OVERRIDE;
+ virtual std::string GetExtensions() override;
void AddExtensionsString(const char* extensions);
void SetGLVersionString(const char* version_str);
protected:
- virtual std::string GetGLVersion() OVERRIDE;
+ virtual std::string GetGLVersion() override;
virtual ~GLContextStubWithExtensions() {}
diff --git a/ui/gl/gl_fence_arb.h b/ui/gl/gl_fence_arb.h
index db29675..614bfcb 100644
--- a/ui/gl/gl_fence_arb.h
+++ b/ui/gl/gl_fence_arb.h
@@ -18,9 +18,9 @@
virtual ~GLFenceARB();
// GLFence implementation:
- virtual bool HasCompleted() OVERRIDE;
- virtual void ClientWait() OVERRIDE;
- virtual void ServerWait() OVERRIDE;
+ virtual bool HasCompleted() override;
+ virtual void ClientWait() override;
+ virtual void ServerWait() override;
private:
GLsync sync_;
diff --git a/ui/gl/gl_fence_egl.h b/ui/gl/gl_fence_egl.h
index 531b3dc..fce6291 100644
--- a/ui/gl/gl_fence_egl.h
+++ b/ui/gl/gl_fence_egl.h
@@ -18,9 +18,9 @@
virtual ~GLFenceEGL();
// GLFence implementation:
- virtual bool HasCompleted() OVERRIDE;
- virtual void ClientWait() OVERRIDE;
- virtual void ServerWait() OVERRIDE;
+ virtual bool HasCompleted() override;
+ virtual void ClientWait() override;
+ virtual void ServerWait() override;
private:
EGLSyncKHR sync_;
diff --git a/ui/gl/gl_fence_nv.h b/ui/gl/gl_fence_nv.h
index fee9eff..c89cc42 100644
--- a/ui/gl/gl_fence_nv.h
+++ b/ui/gl/gl_fence_nv.h
@@ -18,9 +18,9 @@
virtual ~GLFenceNV();
// GLFence implementation:
- virtual bool HasCompleted() OVERRIDE;
- virtual void ClientWait() OVERRIDE;
- virtual void ServerWait() OVERRIDE;
+ virtual bool HasCompleted() override;
+ virtual void ClientWait() override;
+ virtual void ServerWait() override;
private:
GLuint fence_;
diff --git a/ui/gl/gl_gl_api_implementation.h b/ui/gl/gl_gl_api_implementation.h
index 22faccd..39f9558 100644
--- a/ui/gl/gl_gl_api_implementation.h
+++ b/ui/gl/gl_gl_api_implementation.h
@@ -57,8 +57,8 @@
void Initialize(DriverGL* driver);
private:
- virtual void glFinishFn() OVERRIDE;
- virtual void glFlushFn() OVERRIDE;
+ virtual void glFinishFn() override;
+ virtual void glFlushFn() override;
};
// Inserts a TRACE for every GL call.
@@ -104,9 +104,9 @@
private:
// Overridden functions from GLApiBase
- virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE;
- virtual void glFinishFn() OVERRIDE;
- virtual void glFlushFn() OVERRIDE;
+ virtual const GLubyte* glGetStringFn(GLenum name) override;
+ virtual void glFinishFn() override;
+ virtual void glFlushFn() override;
// The real context we're running on.
GLContext* real_context_;
diff --git a/ui/gl/gl_image_egl.h b/ui/gl/gl_image_egl.h
index bade6eb..c1ec1fc 100644
--- a/ui/gl/gl_image_egl.h
+++ b/ui/gl/gl_image_egl.h
@@ -17,20 +17,20 @@
bool Initialize(EGLenum target, EGLClientBuffer buffer, const EGLint* attrs);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override;
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override {}
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override {}
+ virtual void DidUseTexImage() override {}
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageEGL();
diff --git a/ui/gl/gl_image_glx.cc b/ui/gl/gl_image_glx.cc
index 2152cfe..395636b 100644
--- a/ui/gl/gl_image_glx.cc
+++ b/ui/gl/gl_image_glx.cc
@@ -26,7 +26,7 @@
bool ValidFormat(unsigned internalformat) {
switch (internalformat) {
- case GL_BGRA8_EXT:
+ case GL_RGBA:
return true;
default:
return false;
@@ -35,7 +35,7 @@
int TextureFormat(unsigned internalformat) {
switch (internalformat) {
- case GL_BGRA8_EXT:
+ case GL_RGBA:
return GLX_TEXTURE_FORMAT_RGBA_EXT;
default:
NOTREACHED();
@@ -45,7 +45,7 @@
int BindToTextureFormat(unsigned internalformat) {
switch (internalformat) {
- case GL_BGRA8_EXT:
+ case GL_RGBA:
return GLX_BIND_TO_TEXTURE_RGBA_EXT;
default:
NOTREACHED();
@@ -55,7 +55,7 @@
unsigned PixmapDepth(unsigned internalformat) {
switch (internalformat) {
- case GL_BGRA8_EXT:
+ case GL_RGBA:
return 32u;
default:
NOTREACHED();
diff --git a/ui/gl/gl_image_glx.h b/ui/gl/gl_image_glx.h
index 82cee7d..57c55c5 100644
--- a/ui/gl/gl_image_glx.h
+++ b/ui/gl/gl_image_glx.h
@@ -19,20 +19,20 @@
bool Initialize(XID pixmap);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE;
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override;
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override;
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override {}
+ virtual void DidUseTexImage() override {}
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageGLX();
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index 262582f..07f3a0c 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -20,20 +20,20 @@
bool Initialize(IOSurfaceRef io_surface);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override;
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override {}
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override {}
+ virtual void DidUseTexImage() override {}
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageIOSurface();
diff --git a/ui/gl/gl_image_linux_dma_buffer.cc b/ui/gl/gl_image_linux_dma_buffer.cc
new file mode 100644
index 0000000..1dec942
--- /dev/null
+++ b/ui/gl/gl_image_linux_dma_buffer.cc
@@ -0,0 +1,107 @@
+// Copyright 2014 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.
+
+#include "ui/gl/gl_image_linux_dma_buffer.h"
+
+#include <unistd.h>
+
+#define FOURCC(a, b, c, d) \
+ ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \
+ (static_cast<uint32>(c) << 16) | (static_cast<uint32>(d) << 24))
+
+#define DRM_FORMAT_ARGB8888 FOURCC('A', 'R', '2', '4')
+#define DRM_FORMAT_XRGB8888 FOURCC('X', 'R', '2', '4')
+
+namespace gfx {
+namespace {
+
+bool ValidFormat(unsigned internalformat, gfx::GpuMemoryBuffer::Format format) {
+ switch (internalformat) {
+ case GL_RGB:
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBX_8888:
+ return true;
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+ case GL_RGBA:
+ switch (format) {
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return true;
+ case gfx::GpuMemoryBuffer::RGBX_8888:
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+ default:
+ return false;
+ }
+}
+
+EGLint FourCC(gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return DRM_FORMAT_ARGB8888;
+ case gfx::GpuMemoryBuffer::RGBX_8888:
+ return DRM_FORMAT_XRGB8888;
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ NOTREACHED();
+ return 0;
+ }
+
+ NOTREACHED();
+ return 0;
+}
+
+bool IsHandleValid(const base::FileDescriptor& handle) {
+ return handle.fd >= 0;
+}
+
+} // namespace
+
+GLImageLinuxDMABuffer::GLImageLinuxDMABuffer(const gfx::Size& size,
+ unsigned internalformat)
+ : GLImageEGL(size), internalformat_(internalformat) {
+}
+
+GLImageLinuxDMABuffer::~GLImageLinuxDMABuffer() {
+}
+
+bool GLImageLinuxDMABuffer::Initialize(const base::FileDescriptor& handle,
+ gfx::GpuMemoryBuffer::Format format,
+ int pitch) {
+ if (!ValidFormat(internalformat_, format)) {
+ LOG(ERROR) << "Invalid format: " << internalformat_;
+ return false;
+ }
+
+ if (!IsHandleValid(handle)) {
+ LOG(ERROR) << "Invalid file descriptor: " << handle.fd;
+ return false;
+ }
+
+ // Note: If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT
+ // target, the EGL will take a reference to the dma_buf.
+ EGLint attrs[] = {EGL_WIDTH,
+ size_.width(),
+ EGL_HEIGHT,
+ size_.height(),
+ EGL_LINUX_DRM_FOURCC_EXT,
+ FourCC(format),
+ EGL_DMA_BUF_PLANE0_FD_EXT,
+ handle.fd,
+ EGL_DMA_BUF_PLANE0_OFFSET_EXT,
+ 0,
+ EGL_DMA_BUF_PLANE0_PITCH_EXT,
+ pitch,
+ EGL_NONE};
+ return GLImageEGL::Initialize(
+ EGL_LINUX_DMA_BUF_EXT, static_cast<EGLClientBuffer>(NULL), attrs);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_image_linux_dma_buffer.h b/ui/gl/gl_image_linux_dma_buffer.h
new file mode 100644
index 0000000..3523915
--- /dev/null
+++ b/ui/gl/gl_image_linux_dma_buffer.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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 UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
+#define UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
+
+#include "ui/gfx/gpu_memory_buffer.h"
+#include "ui/gl/gl_image_egl.h"
+
+namespace gfx {
+
+class GL_EXPORT GLImageLinuxDMABuffer : public GLImageEGL {
+ public:
+ GLImageLinuxDMABuffer(const gfx::Size& size, unsigned internalformat);
+
+ // Returns true on success and the file descriptor can be closed as the
+ // implementation will take a reference to the dma_buf.
+ bool Initialize(const base::FileDescriptor& handle,
+ gfx::GpuMemoryBuffer::Format format,
+ int pitch);
+
+ protected:
+ virtual ~GLImageLinuxDMABuffer();
+
+ private:
+ unsigned internalformat_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLImageLinuxDMABuffer);
+};
+
+} // namespace gfx
+
+#endif // UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
index d79a753..a752940 100644
--- a/ui/gl/gl_image_memory.cc
+++ b/ui/gl/gl_image_memory.cc
@@ -17,60 +17,68 @@
namespace gfx {
namespace {
-bool ValidFormat(unsigned internalformat) {
+bool ValidInternalFormat(unsigned internalformat) {
switch (internalformat) {
- case GL_BGRA8_EXT:
- case GL_RGBA8_OES:
+ case GL_RGBA:
return true;
default:
return false;
}
}
-GLenum TextureFormat(unsigned internalformat) {
- switch (internalformat) {
- case GL_BGRA8_EXT:
- return GL_BGRA_EXT;
- case GL_RGBA8_OES:
+bool ValidFormat(gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return true;
+ case gfx::GpuMemoryBuffer::RGBX_8888:
+ return false;
+ }
+
+ NOTREACHED();
+ return false;
+}
+
+GLenum TextureFormat(gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBA_8888:
return GL_RGBA;
- default:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return GL_BGRA_EXT;
+ case gfx::GpuMemoryBuffer::RGBX_8888:
NOTREACHED();
return 0;
}
+
+ NOTREACHED();
+ return 0;
}
-GLenum DataFormat(unsigned internalformat) {
- return TextureFormat(internalformat);
+GLenum DataFormat(gfx::GpuMemoryBuffer::Format format) {
+ return TextureFormat(format);
}
-GLenum DataType(unsigned internalformat) {
- switch (internalformat) {
- case GL_BGRA8_EXT:
- case GL_RGBA8_OES:
+GLenum DataType(gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
return GL_UNSIGNED_BYTE;
- default:
+ case gfx::GpuMemoryBuffer::RGBX_8888:
NOTREACHED();
return 0;
}
-}
-int BytesPerPixel(unsigned internalformat) {
- switch (internalformat) {
- case GL_BGRA8_EXT:
- case GL_RGBA8_OES:
- return 4;
- default:
- NOTREACHED();
- return 0;
- }
+ NOTREACHED();
+ return 0;
}
} // namespace
GLImageMemory::GLImageMemory(const gfx::Size& size, unsigned internalformat)
- : memory_(NULL),
- size_(size),
+ : size_(size),
internalformat_(internalformat),
+ memory_(NULL),
+ format_(gfx::GpuMemoryBuffer::RGBA_8888),
in_use_(false),
target_(0),
need_do_bind_tex_image_(false)
@@ -91,15 +99,37 @@
#endif
}
-bool GLImageMemory::Initialize(const unsigned char* memory) {
- if (!ValidFormat(internalformat_)) {
- DVLOG(0) << "Invalid format: " << internalformat_;
+// static
+size_t GLImageMemory::BytesPerPixel(gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBA_8888:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
+ return 4;
+ case gfx::GpuMemoryBuffer::RGBX_8888:
+ NOTREACHED();
+ return 0;
+ }
+
+ NOTREACHED();
+ return 0;
+}
+
+bool GLImageMemory::Initialize(const unsigned char* memory,
+ gfx::GpuMemoryBuffer::Format format) {
+ if (!ValidInternalFormat(internalformat_)) {
+ LOG(ERROR) << "Invalid internalformat: " << internalformat_;
+ return false;
+ }
+
+ if (!ValidFormat(format)) {
+ LOG(ERROR) << "Invalid format: " << format;
return false;
}
DCHECK(memory);
DCHECK(!memory_);
memory_ = memory;
+ format_ = format;
return true;
}
@@ -151,12 +181,12 @@
DCHECK(memory_);
glTexImage2D(target,
0, // mip level
- TextureFormat(internalformat_),
+ TextureFormat(format_),
size_.width(),
size_.height(),
0, // border
- DataFormat(internalformat_),
- DataType(internalformat_),
+ DataFormat(format_),
+ DataType(format_),
memory_);
return true;
@@ -186,14 +216,6 @@
return false;
}
-bool GLImageMemory::HasValidFormat() const {
- return ValidFormat(internalformat_);
-}
-
-size_t GLImageMemory::Bytes() const {
- return size_.GetArea() * BytesPerPixel(internalformat_);
-}
-
void GLImageMemory::DoBindTexImage(unsigned target) {
TRACE_EVENT0("gpu", "GLImageMemory::DoBindTexImage");
@@ -216,12 +238,12 @@
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D,
0, // mip level
- TextureFormat(internalformat_),
+ TextureFormat(format_),
size_.width(),
size_.height(),
0, // border
- DataFormat(internalformat_),
- DataType(internalformat_),
+ DataFormat(format_),
+ DataType(format_),
memory_);
}
@@ -245,8 +267,8 @@
0, // y-offset
size_.width(),
size_.height(),
- DataFormat(internalformat_),
- DataType(internalformat_),
+ DataFormat(format_),
+ DataType(format_),
memory_);
}
@@ -259,12 +281,12 @@
DCHECK_NE(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), target);
glTexImage2D(target,
0, // mip level
- TextureFormat(internalformat_),
+ TextureFormat(format_),
size_.width(),
size_.height(),
0, // border
- DataFormat(internalformat_),
- DataType(internalformat_),
+ DataFormat(format_),
+ DataType(format_),
memory_);
}
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 6dbec46..2d6b93e 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -13,42 +13,45 @@
#include <EGL/eglext.h>
#endif
+#include "ui/gfx/gpu_memory_buffer.h"
+
namespace gfx {
class GL_EXPORT GLImageMemory : public GLImage {
public:
GLImageMemory(const gfx::Size& size, unsigned internalformat);
- bool Initialize(const unsigned char* memory);
+ static size_t BytesPerPixel(gfx::GpuMemoryBuffer::Format format);
+
+ bool Initialize(const unsigned char* memory,
+ gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE;
- virtual void DidUseTexImage() OVERRIDE;
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override;
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override {}
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override;
+ virtual void DidUseTexImage() override;
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageMemory();
- bool HasValidFormat() const;
- size_t Bytes() const;
-
private:
void DoBindTexImage(unsigned target);
- const unsigned char* memory_;
const gfx::Size size_;
const unsigned internalformat_;
+ const unsigned char* memory_;
+ gfx::GpuMemoryBuffer::Format format_;
bool in_use_;
unsigned target_;
bool need_do_bind_tex_image_;
diff --git a/ui/gl/gl_image_ref_counted_memory.cc b/ui/gl/gl_image_ref_counted_memory.cc
index ed4e03f..653d70a 100644
--- a/ui/gl/gl_image_ref_counted_memory.cc
+++ b/ui/gl/gl_image_ref_counted_memory.cc
@@ -19,13 +19,13 @@
}
bool GLImageRefCountedMemory::Initialize(
- base::RefCountedMemory* ref_counted_memory) {
- if (!HasValidFormat())
+ base::RefCountedMemory* ref_counted_memory,
+ gfx::GpuMemoryBuffer::Format format) {
+ if (!GLImageMemory::Initialize(ref_counted_memory->front(), format))
return false;
DCHECK(!ref_counted_memory_.get());
ref_counted_memory_ = ref_counted_memory;
- GLImageMemory::Initialize(ref_counted_memory_->front());
return true;
}
diff --git a/ui/gl/gl_image_ref_counted_memory.h b/ui/gl/gl_image_ref_counted_memory.h
index f721f4b..bb7160e 100644
--- a/ui/gl/gl_image_ref_counted_memory.h
+++ b/ui/gl/gl_image_ref_counted_memory.h
@@ -18,10 +18,11 @@
public:
GLImageRefCountedMemory(const gfx::Size& size, unsigned internalformat);
- bool Initialize(base::RefCountedMemory* ref_counted_memory);
+ bool Initialize(base::RefCountedMemory* ref_counted_memory,
+ gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
+ virtual void Destroy(bool have_context) override;
protected:
virtual ~GLImageRefCountedMemory();
diff --git a/ui/gl/gl_image_shared_memory.cc b/ui/gl/gl_image_shared_memory.cc
index 7c615f8..0bbf549 100644
--- a/ui/gl/gl_image_shared_memory.cc
+++ b/ui/gl/gl_image_shared_memory.cc
@@ -5,9 +5,28 @@
#include "ui/gl/gl_image_shared_memory.h"
#include "base/logging.h"
+#include "base/numerics/safe_math.h"
#include "base/process/process_handle.h"
namespace gfx {
+namespace {
+
+// Returns true if the size is valid and false otherwise.
+bool SizeInBytes(const gfx::Size& size,
+ gfx::GpuMemoryBuffer::Format format,
+ size_t* size_in_bytes) {
+ if (size.IsEmpty())
+ return false;
+ base::CheckedNumeric<size_t> s = GLImageMemory::BytesPerPixel(format);
+ s *= size.width();
+ s *= size.height();
+ if (!s.IsValid())
+ return false;
+ *size_in_bytes = s.ValueOrDie();
+ return true;
+}
+
+} // namespace
GLImageSharedMemory::GLImageSharedMemory(const gfx::Size& size,
unsigned internalformat)
@@ -18,8 +37,10 @@
DCHECK(!shared_memory_);
}
-bool GLImageSharedMemory::Initialize(const gfx::GpuMemoryBufferHandle& handle) {
- if (!HasValidFormat())
+bool GLImageSharedMemory::Initialize(const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBuffer::Format format) {
+ size_t size_in_bytes;
+ if (!SizeInBytes(GetSize(), format, &size_in_bytes))
return false;
if (!base::SharedMemory::IsHandleValid(handle.handle))
@@ -37,16 +58,18 @@
scoped_ptr<base::SharedMemory> duped_shared_memory(
new base::SharedMemory(duped_shared_memory_handle, true));
-
- if (!duped_shared_memory->Map(Bytes())) {
+ if (!duped_shared_memory->Map(size_in_bytes)) {
DVLOG(0) << "Failed to map shared memory.";
return false;
}
+ if (!GLImageMemory::Initialize(
+ static_cast<unsigned char*>(duped_shared_memory->memory()), format)) {
+ return false;
+ }
+
DCHECK(!shared_memory_);
shared_memory_ = duped_shared_memory.Pass();
- GLImageMemory::Initialize(
- static_cast<unsigned char*>(shared_memory_->memory()));
return true;
}
diff --git a/ui/gl/gl_image_shared_memory.h b/ui/gl/gl_image_shared_memory.h
index 447475f..429d3c8 100644
--- a/ui/gl/gl_image_shared_memory.h
+++ b/ui/gl/gl_image_shared_memory.h
@@ -15,10 +15,11 @@
public:
GLImageSharedMemory(const gfx::Size& size, unsigned internalformat);
- bool Initialize(const gfx::GpuMemoryBufferHandle& handle);
+ bool Initialize(const gfx::GpuMemoryBufferHandle& handle,
+ gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
+ virtual void Destroy(bool have_context) override;
protected:
virtual ~GLImageSharedMemory();
diff --git a/ui/gl/gl_image_stub.h b/ui/gl/gl_image_stub.h
index c8ec8eb..626afea 100644
--- a/ui/gl/gl_image_stub.h
+++ b/ui/gl/gl_image_stub.h
@@ -15,20 +15,20 @@
GLImageStub();
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE {}
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override {}
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override {}
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override {}
+ virtual void DidUseTexImage() override {}
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageStub();
diff --git a/ui/gl/gl_image_surface_texture.cc b/ui/gl/gl_image_surface_texture.cc
index 4fed45b..27c9f64 100644
--- a/ui/gl/gl_image_surface_texture.cc
+++ b/ui/gl/gl_image_surface_texture.cc
@@ -6,7 +6,6 @@
#include "base/debug/trace_event.h"
#include "ui/gl/android/surface_texture.h"
-#include "ui/gl/android/surface_texture_tracker.h"
namespace gfx {
@@ -19,14 +18,10 @@
DCHECK_EQ(0, texture_id_);
}
-bool GLImageSurfaceTexture::Initialize(
- const gfx::GpuMemoryBufferHandle& handle) {
+bool GLImageSurfaceTexture::Initialize(SurfaceTexture* surface_texture) {
DCHECK(!surface_texture_.get());
- surface_texture_ =
- SurfaceTextureTracker::GetInstance()->AcquireSurfaceTexture(
- handle.surface_texture_id.primary_id,
- handle.surface_texture_id.secondary_id);
- return !!surface_texture_.get();
+ surface_texture_ = surface_texture;
+ return true;
}
void GLImageSurfaceTexture::Destroy(bool have_context) {
diff --git a/ui/gl/gl_image_surface_texture.h b/ui/gl/gl_image_surface_texture.h
index b47eb30..eaf4363 100644
--- a/ui/gl/gl_image_surface_texture.h
+++ b/ui/gl/gl_image_surface_texture.h
@@ -6,35 +6,33 @@
#define UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_
#include "base/memory/ref_counted.h"
-#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_image.h"
namespace gfx {
-
class SurfaceTexture;
class GL_EXPORT GLImageSurfaceTexture : public GLImage {
public:
explicit GLImageSurfaceTexture(const gfx::Size& size);
- bool Initialize(const gfx::GpuMemoryBufferHandle& handle);
+ bool Initialize(SurfaceTexture* surface_texture);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool BindTexImage(unsigned target) OVERRIDE;
- virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual bool CopyTexImage(unsigned target) OVERRIDE;
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
- virtual void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
+ virtual void Destroy(bool have_context) override;
+ virtual gfx::Size GetSize() override;
+ virtual bool BindTexImage(unsigned target) override;
+ virtual void ReleaseTexImage(unsigned target) override {}
+ virtual bool CopyTexImage(unsigned target) override;
+ virtual void WillUseTexImage() override {}
+ virtual void DidUseTexImage() override {}
+ virtual void WillModifyTexImage() override {}
+ virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
+ const RectF& crop_rect) override;
protected:
virtual ~GLImageSurfaceTexture();
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 3851c1c..7c7a5ce 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -158,32 +158,32 @@
public:
explicit GLSurfaceAdapter(GLSurface* surface);
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual bool Recreate() OVERRIDE;
- virtual bool DeferDraws() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
- virtual bool OnMakeCurrent(GLContext* context) OVERRIDE;
- virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE;
- virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
- virtual void* GetShareHandle() OVERRIDE;
- virtual void* GetDisplay() OVERRIDE;
- virtual void* GetConfig() OVERRIDE;
- virtual unsigned GetFormat() OVERRIDE;
- virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool Resize(const gfx::Size& size) override;
+ virtual bool Recreate() override;
+ virtual bool DeferDraws() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override;
+ virtual bool SupportsPostSubBuffer() override;
+ virtual gfx::Size GetSize() override;
+ virtual void* GetHandle() override;
+ virtual unsigned int GetBackingFrameBufferObject() override;
+ virtual bool OnMakeCurrent(GLContext* context) override;
+ virtual bool SetBackbufferAllocation(bool allocated) override;
+ virtual void SetFrontbufferAllocation(bool allocated) override;
+ virtual void* GetShareHandle() override;
+ virtual void* GetDisplay() override;
+ virtual void* GetConfig() override;
+ virtual unsigned GetFormat() override;
+ virtual VSyncProvider* GetVSyncProvider() override;
virtual bool ScheduleOverlayPlane(int z_order,
OverlayTransform transform,
GLImage* image,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE;
- virtual bool IsSurfaceless() const OVERRIDE;
+ const RectF& crop_rect) override;
+ virtual bool IsSurfaceless() const override;
GLSurface* surface() const { return surface_.get(); }
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 439401a..b8c29d7 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -79,7 +79,7 @@
protected:
virtual bool GetSyncValues(int64* system_time,
int64* media_stream_counter,
- int64* swap_buffer_counter) OVERRIDE {
+ int64* swap_buffer_counter) override {
uint64 u_system_time, u_media_stream_counter, u_swap_buffer_counter;
bool result = eglGetSyncValuesCHROMIUM(
g_display, surface_, &u_system_time,
@@ -92,7 +92,7 @@
return result;
}
- virtual bool GetMscRate(int32* numerator, int32* denominator) OVERRIDE {
+ virtual bool GetMscRate(int32* numerator, int32* denominator) override {
return false;
}
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index e682f4b..b0b3336 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -29,7 +29,7 @@
GLSurfaceEGL();
// Implement GLSurface.
- virtual EGLDisplay GetDisplay() OVERRIDE;
+ virtual EGLDisplay GetDisplay() override;
static bool InitializeOneOff();
static EGLDisplay GetHardwareDisplay();
@@ -60,18 +60,18 @@
explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window);
// Implement GLSurface.
- virtual EGLConfig GetConfig() OVERRIDE;
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual bool Recreate() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual EGLSurface GetHandle() OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
- virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
+ virtual EGLConfig GetConfig() override;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool Resize(const gfx::Size& size) override;
+ virtual bool Recreate() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual EGLSurface GetHandle() override;
+ virtual bool SupportsPostSubBuffer() override;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override;
+ virtual VSyncProvider* GetVSyncProvider() override;
// Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider.
// Takes ownership of the VSyncProvider.
@@ -99,15 +99,15 @@
explicit PbufferGLSurfaceEGL(const gfx::Size& size);
// Implement GLSurface.
- virtual EGLConfig GetConfig() OVERRIDE;
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual EGLSurface GetHandle() OVERRIDE;
- virtual void* GetShareHandle() OVERRIDE;
+ virtual EGLConfig GetConfig() override;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual bool Resize(const gfx::Size& size) override;
+ virtual EGLSurface GetHandle() override;
+ virtual void* GetShareHandle() override;
protected:
virtual ~PbufferGLSurfaceEGL();
@@ -127,15 +127,15 @@
explicit SurfacelessEGL(const gfx::Size& size);
// Implement GLSurface.
- virtual EGLConfig GetConfig() OVERRIDE;
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual EGLSurface GetHandle() OVERRIDE;
- virtual void* GetShareHandle() OVERRIDE;
+ virtual EGLConfig GetConfig() override;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual bool Resize(const gfx::Size& size) override;
+ virtual EGLSurface GetHandle() override;
+ virtual void* GetShareHandle() override;
protected:
virtual ~SurfacelessEGL();
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 10f0681..7189c5a 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -82,12 +82,12 @@
protected:
virtual bool GetSyncValues(int64* system_time,
int64* media_stream_counter,
- int64* swap_buffer_counter) OVERRIDE {
+ int64* swap_buffer_counter) override {
return glXGetSyncValuesOML(g_display, window_, system_time,
media_stream_counter, swap_buffer_counter);
}
- virtual bool GetMscRate(int32* numerator, int32* denominator) OVERRIDE {
+ virtual bool GetMscRate(int32* numerator, int32* denominator) override {
if (!g_glx_get_msc_rate_oml_supported)
return false;
@@ -269,7 +269,7 @@
}
virtual void GetVSyncParameters(
- const VSyncProvider::UpdateVSyncCallback& callback) OVERRIDE {
+ const VSyncProvider::UpdateVSyncCallback& callback) override {
if (kGetVSyncParametersMinPeriod > base::TimeDelta()) {
base::TimeTicks now = base::TimeTicks::Now();
base::TimeDelta delta = now - last_get_vsync_parameters_time_;
diff --git a/ui/gl/gl_surface_glx.h b/ui/gl/gl_surface_glx.h
index 37c835c..0627023 100644
--- a/ui/gl/gl_surface_glx.h
+++ b/ui/gl/gl_surface_glx.h
@@ -35,7 +35,7 @@
static bool IsTextureFromPixmapSupported();
static bool IsOMLSyncControlSupported();
- virtual void* GetDisplay() OVERRIDE;
+ virtual void* GetDisplay() override;
// Get the FB config that the surface was created with or NULL if it is not
// a GLX drawable.
@@ -55,17 +55,17 @@
explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window);
// Implement GLSurfaceGLX.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual void* GetConfig() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
- virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool Resize(const gfx::Size& size) override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual void* GetHandle() override;
+ virtual bool SupportsPostSubBuffer() override;
+ virtual void* GetConfig() override;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override;
+ virtual VSyncProvider* GetVSyncProvider() override;
protected:
virtual ~NativeViewGLSurfaceGLX();
@@ -75,8 +75,8 @@
gfx::AcceleratedWidget GetDrawableHandle() const;
// PlatformEventDispatcher implementation
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// Window passed in at creation. Always valid.
gfx::AcceleratedWidget parent_window_;
@@ -98,13 +98,13 @@
explicit PbufferGLSurfaceGLX(const gfx::Size& size);
// Implement GLSurfaceGLX.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual void* GetConfig() OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual void* GetHandle() override;
+ virtual void* GetConfig() override;
protected:
virtual ~PbufferGLSurfaceGLX();
diff --git a/ui/gl/gl_surface_mac.cc b/ui/gl/gl_surface_mac.cc
index 41f6798..dec5a9a 100644
--- a/ui/gl/gl_surface_mac.cc
+++ b/ui/gl/gl_surface_mac.cc
@@ -30,16 +30,16 @@
explicit NoOpGLSurface(const gfx::Size& size) : size_(size) {}
// Implement GLSurface.
- virtual bool Initialize() OVERRIDE { return true; }
- virtual void Destroy() OVERRIDE {}
- virtual bool IsOffscreen() OVERRIDE { return true; }
- virtual bool SwapBuffers() OVERRIDE {
+ virtual bool Initialize() override { return true; }
+ virtual void Destroy() override {}
+ virtual bool IsOffscreen() override { return true; }
+ virtual bool SwapBuffers() override {
NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
return false;
}
- virtual gfx::Size GetSize() OVERRIDE { return size_; }
- virtual void* GetHandle() OVERRIDE { return NULL; }
- virtual void* GetDisplay() OVERRIDE { return NULL; }
+ virtual gfx::Size GetSize() override { return size_; }
+ virtual void* GetHandle() override { return NULL; }
+ virtual void* GetDisplay() override { return NULL; }
protected:
virtual ~NoOpGLSurface() {}
diff --git a/ui/gl/gl_surface_osmesa.h b/ui/gl/gl_surface_osmesa.h
index 472d7b1..20fb17f 100644
--- a/ui/gl/gl_surface_osmesa.h
+++ b/ui/gl/gl_surface_osmesa.h
@@ -21,14 +21,14 @@
GLSurfaceOSMesa(OSMesaSurfaceFormat format, const gfx::Size& size);
// Implement GLSurface.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool Resize(const gfx::Size& new_size) OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
- virtual unsigned GetFormat() OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool Resize(const gfx::Size& new_size) override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual void* GetHandle() override;
+ virtual unsigned GetFormat() override;
protected:
virtual ~GLSurfaceOSMesa();
@@ -48,8 +48,8 @@
public:
explicit GLSurfaceOSMesaHeadless();
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
protected:
virtual ~GLSurfaceOSMesaHeadless();
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index a47a759..4576195 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -30,10 +30,10 @@
ozone_surface_(ozone_surface.Pass()),
widget_(widget) {}
- virtual bool Initialize() OVERRIDE {
+ virtual bool Initialize() override {
return Initialize(ozone_surface_->CreateVSyncProvider());
}
- virtual bool Resize(const gfx::Size& size) OVERRIDE {
+ virtual bool Resize(const gfx::Size& size) override {
if (!ozone_surface_->ResizeNativeWindow(size)) {
if (!ReinitializeNativeSurface() ||
!ozone_surface_->ResizeNativeWindow(size))
@@ -42,7 +42,7 @@
return NativeViewGLSurfaceEGL::Resize(size);
}
- virtual bool SwapBuffers() OVERRIDE {
+ virtual bool SwapBuffers() override {
if (!NativeViewGLSurfaceEGL::SwapBuffers())
return false;
@@ -52,7 +52,7 @@
OverlayTransform transform,
GLImage* image,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE {
+ const RectF& crop_rect) override {
return image->ScheduleOverlayPlane(
widget_, z_order, transform, bounds_rect, crop_rect);
}
@@ -107,7 +107,7 @@
ozone_surface_(ozone_surface.Pass()),
widget_(widget) {}
- virtual bool Initialize() OVERRIDE {
+ virtual bool Initialize() override {
if (!SurfacelessEGL::Initialize())
return false;
vsync_provider_ = ozone_surface_->CreateVSyncProvider();
@@ -115,13 +115,13 @@
return false;
return true;
}
- virtual bool Resize(const gfx::Size& size) OVERRIDE {
+ virtual bool Resize(const gfx::Size& size) override {
if (!ozone_surface_->ResizeNativeWindow(size))
return false;
return SurfacelessEGL::Resize(size);
}
- virtual bool SwapBuffers() OVERRIDE {
+ virtual bool SwapBuffers() override {
// TODO: this should be replaced by a fence when supported by the driver.
glFinish();
return ozone_surface_->OnSwapBuffers();
@@ -130,21 +130,21 @@
OverlayTransform transform,
GLImage* image,
const Rect& bounds_rect,
- const RectF& crop_rect) OVERRIDE {
+ const RectF& crop_rect) override {
return image->ScheduleOverlayPlane(
widget_, z_order, transform, bounds_rect, crop_rect);
}
- virtual bool IsOffscreen() OVERRIDE { return false; }
- virtual VSyncProvider* GetVSyncProvider() OVERRIDE {
+ virtual bool IsOffscreen() override { return false; }
+ virtual VSyncProvider* GetVSyncProvider() override {
return vsync_provider_.get();
}
- virtual bool SupportsPostSubBuffer() OVERRIDE { return true; }
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE {
+ virtual bool SupportsPostSubBuffer() override { return true; }
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override {
// The actual sub buffer handling is handled at higher layers.
SwapBuffers();
return true;
}
- virtual bool IsSurfaceless() const OVERRIDE { return true; }
+ virtual bool IsSurfaceless() const override { return true; }
private:
virtual ~GLSurfaceOzoneSurfaceless() {
diff --git a/ui/gl/gl_surface_stub.h b/ui/gl/gl_surface_stub.h
index 14e24b0..8a80dfe 100644
--- a/ui/gl/gl_surface_stub.h
+++ b/ui/gl/gl_surface_stub.h
@@ -15,11 +15,11 @@
void SetSize(const gfx::Size& size) { size_ = size; }
// Implement GLSurface.
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void* GetHandle() OVERRIDE;
+ virtual void Destroy() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual gfx::Size GetSize() override;
+ virtual void* GetHandle() override;
protected:
virtual ~GLSurfaceStub();
diff --git a/ui/gl/gl_surface_wgl.cc b/ui/gl/gl_surface_wgl.cc
index 23391ea..690f4f4 100644
--- a/ui/gl/gl_surface_wgl.cc
+++ b/ui/gl/gl_surface_wgl.cc
@@ -176,7 +176,6 @@
NativeViewGLSurfaceWGL::NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window)
: window_(window),
- child_window_(NULL),
device_context_(NULL) {
DCHECK(window);
}
@@ -188,34 +187,16 @@
bool NativeViewGLSurfaceWGL::Initialize() {
DCHECK(!device_context_);
- RECT rect;
- if (!GetClientRect(window_, &rect)) {
- LOG(ERROR) << "GetClientRect failed.\n";
+ DWORD process_id;
+ GetWindowThreadProcessId(window_, &process_id);
+ if (process_id != GetCurrentProcessId()) {
+ LOG(ERROR) << "Can't use window created in " << process_id
+ << " with wgl in " << GetCurrentProcessId();
Destroy();
return false;
}
- // Create a child window. WGL has problems using a window handle owned by
- // another process.
- child_window_ = CreateWindow(
- reinterpret_cast<wchar_t*>(g_display->window_class()),
- L"",
- WS_CHILDWINDOW | WS_DISABLED | WS_VISIBLE,
- 0, 0,
- rect.right - rect.left,
- rect.bottom - rect.top,
- window_,
- NULL,
- NULL,
- NULL);
- if (!child_window_) {
- LOG(ERROR) << "CreateWindow failed.\n";
- Destroy();
- return false;
- }
-
- // The GL context will render to this window.
- device_context_ = GetDC(child_window_);
+ device_context_ = GetDC(window_);
if (!device_context_) {
LOG(ERROR) << "Unable to get device context for window.";
Destroy();
@@ -234,13 +215,9 @@
}
void NativeViewGLSurfaceWGL::Destroy() {
- if (child_window_ && device_context_)
- ReleaseDC(child_window_, device_context_);
+ if (window_ && device_context_)
+ ReleaseDC(window_, device_context_);
- if (child_window_)
- DestroyWindow(child_window_);
-
- child_window_ = NULL;
device_context_ = NULL;
}
@@ -253,26 +230,13 @@
"width", GetSize().width(),
"height", GetSize().height());
- // Resize the child window to match the parent before swapping. Do not repaint
- // it as it moves.
- RECT rect;
- if (!GetClientRect(window_, &rect))
- return false;
- if (!MoveWindow(child_window_,
- 0, 0,
- rect.right - rect.left,
- rect.bottom - rect.top,
- FALSE)) {
- return false;
- }
-
DCHECK(device_context_);
return ::SwapBuffers(device_context_) == TRUE;
}
gfx::Size NativeViewGLSurfaceWGL::GetSize() {
RECT rect;
- BOOL result = GetClientRect(child_window_, &rect);
+ BOOL result = GetClientRect(window_, &rect);
DCHECK(result);
return gfx::Size(rect.right - rect.left, rect.bottom - rect.top);
}
diff --git a/ui/gl/gl_surface_wgl.h b/ui/gl/gl_surface_wgl.h
index aa32047..18b7e84 100644
--- a/ui/gl/gl_surface_wgl.h
+++ b/ui/gl/gl_surface_wgl.h
@@ -42,7 +42,6 @@
private:
gfx::AcceleratedWidget window_;
- gfx::AcceleratedWidget child_window_;
HDC device_context_;
DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc
index df7613e..2219f32 100644
--- a/ui/gl/gl_surface_win.cc
+++ b/ui/gl/gl_surface_win.cc
@@ -45,12 +45,12 @@
virtual ~NativeViewGLSurfaceOSMesa();
// Implement subset of GLSurface.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual bool SupportsPostSubBuffer() override;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override;
private:
gfx::AcceleratedWidget window_;
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc
index bc9f1e6..55a0f38 100644
--- a/ui/gl/gl_surface_x11.cc
+++ b/ui/gl/gl_surface_x11.cc
@@ -28,13 +28,13 @@
static bool InitializeOneOff();
// Implement a subset of GLSurface.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool Resize(const gfx::Size& new_size) OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
+ virtual bool Initialize() override;
+ virtual void Destroy() override;
+ virtual bool Resize(const gfx::Size& new_size) override;
+ virtual bool IsOffscreen() override;
+ virtual bool SwapBuffers() override;
+ virtual bool SupportsPostSubBuffer() override;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) override;
protected:
virtual ~NativeViewGLSurfaceOSMesa();
diff --git a/ui/gl/sync_control_vsync_provider.h b/ui/gl/sync_control_vsync_provider.h
index edee2b0..3360354 100644
--- a/ui/gl/sync_control_vsync_provider.h
+++ b/ui/gl/sync_control_vsync_provider.h
@@ -18,7 +18,7 @@
SyncControlVSyncProvider();
virtual ~SyncControlVSyncProvider();
- virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) OVERRIDE;
+ virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
protected:
virtual bool GetSyncValues(int64* system_time,
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 8e9fd20..396ac49 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -62,7 +62,7 @@
private:
// wm::MaskedWindowTargeter:
virtual bool GetHitTestMask(aura::Window* window,
- gfx::Path* mask) const OVERRIDE {
+ gfx::Path* mask) const override {
if (proxy_ && !proxy_->HasKeyboardWindow())
return true;
gfx::Rect keyboard_bounds = proxy_ ? proxy_->GetKeyboardWindow()->bounds() :
@@ -88,34 +88,34 @@
private:
// Overridden from aura::WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE { return gfx::Size(); }
- virtual gfx::Size GetMaximumSize() const OVERRIDE { return gfx::Size(); }
+ virtual gfx::Size GetMinimumSize() const override { return gfx::Size(); }
+ virtual gfx::Size GetMaximumSize() const override { return gfx::Size(); }
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
bounds_ = new_bounds;
}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override {
return gfx::kNullCursor;
}
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
+ virtual int GetNonClientComponent(const gfx::Point& point) const override {
return HTNOWHERE;
}
virtual bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) OVERRIDE {
+ const gfx::Point& location) override {
return true;
}
- virtual bool CanFocus() OVERRIDE { return false; }
- virtual void OnCaptureLost() OVERRIDE {}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {}
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE { delete this; }
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {}
- virtual bool HasHitTestMask() const OVERRIDE {
+ virtual bool CanFocus() override { return false; }
+ virtual void OnCaptureLost() override {}
+ virtual void OnPaint(gfx::Canvas* canvas) override {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
+ virtual void OnWindowDestroying(aura::Window* window) override {}
+ virtual void OnWindowDestroyed(aura::Window* window) override { delete this; }
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override {}
+ virtual bool HasHitTestMask() const override {
return !proxy_ || proxy_->HasKeyboardWindow();
}
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {
+ virtual void GetHitTestMask(gfx::Path* mask) const override {
if (proxy_ && !proxy_->HasKeyboardWindow())
return;
gfx::Rect keyboard_bounds = proxy_ ? proxy_->GetKeyboardWindow()->bounds() :
@@ -171,11 +171,11 @@
private:
// Overridden from ui::LayerAnimationObserver:
- virtual void OnLayerAnimationEnded(ui::LayerAnimationSequence* seq) OVERRIDE;
+ virtual void OnLayerAnimationEnded(ui::LayerAnimationSequence* seq) override;
virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* seq) OVERRIDE;
+ ui::LayerAnimationSequence* seq) override;
virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* seq) OVERRIDE {}
+ ui::LayerAnimationSequence* seq) override {}
ui::LayerAnimator* animator_;
base::Callback<void(void)> callback_;
@@ -209,8 +209,8 @@
public:
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
void AddObservedWindow(aura::Window* window);
void RemoveAllObservedWindows();
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index fbb1bdc..dc44cd6 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -116,20 +116,20 @@
// aura::WindowObserver overrides
virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) OVERRIDE;
+ const HierarchyChangeParams& params) override;
// InputMethodObserver overrides
virtual void OnTextInputTypeChanged(
- const ui::TextInputClient* client) OVERRIDE {}
- virtual void OnFocus() OVERRIDE {}
- virtual void OnBlur() OVERRIDE {}
+ const ui::TextInputClient* client) override {}
+ virtual void OnFocus() override {}
+ virtual void OnBlur() override {}
virtual void OnCaretBoundsChanged(
- const ui::TextInputClient* client) OVERRIDE {}
+ const ui::TextInputClient* client) override {}
virtual void OnTextInputStateChanged(
- const ui::TextInputClient* client) OVERRIDE;
+ const ui::TextInputClient* client) override;
virtual void OnInputMethodDestroyed(
- const ui::InputMethod* input_method) OVERRIDE;
- virtual void OnShowImeIfNeeded() OVERRIDE;
+ const ui::InputMethod* input_method) override;
+ virtual void OnShowImeIfNeeded() override;
// Show virtual keyboard immediately with animation.
void ShowKeyboardInternal();
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index cd98f9a..37f655d 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -37,7 +37,7 @@
// Overridden from content::WebContentsDelegate:
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
- const content::OpenURLParams& params) OVERRIDE {
+ const content::OpenURLParams& params) override {
source->GetController().LoadURL(
params.url, params.referrer, params.transition, params.extra_headers);
Observe(source);
@@ -45,12 +45,12 @@
}
virtual bool IsPopupOrPanel(
- const content::WebContents* source) const OVERRIDE {
+ const content::WebContents* source) const override {
return true;
}
virtual void MoveContents(content::WebContents* source,
- const gfx::Rect& pos) OVERRIDE {
+ const gfx::Rect& pos) override {
aura::Window* keyboard = proxy_->GetKeyboardWindow();
// keyboard window must have been added to keyboard container window at this
// point. Otherwise, wrong keyboard bounds is used and may cause problem as
@@ -70,12 +70,12 @@
// Overridden from content::WebContentsDelegate:
virtual void RequestMediaAccessPermission(content::WebContents* web_contents,
const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback) OVERRIDE {
+ const content::MediaResponseCallback& callback) override {
proxy_->RequestAudioInput(web_contents, request, callback);
}
// Overridden from content::WebContentsObserver:
- virtual void WebContentsDestroyed() OVERRIDE {
+ virtual void WebContentsDestroyed() override {
delete this;
}
diff --git a/ui/keyboard/keyboard_controller_proxy.h b/ui/keyboard/keyboard_controller_proxy.h
index d7886e2..f893eea 100644
--- a/ui/keyboard/keyboard_controller_proxy.h
+++ b/ui/keyboard/keyboard_controller_proxy.h
@@ -115,8 +115,8 @@
// aura::WindowObserver overrides:
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
private:
friend class TestApi;
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index 51c4e0f..9c3ccb6 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -68,7 +68,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
aura::Window* target = static_cast<aura::Window*>(event->target());
if (event->type() == ui::ET_MOUSE_PRESSED ||
event->type() == ui::ET_TOUCH_PRESSED) {
@@ -92,8 +92,8 @@
}
// Overridden from KeyboardControllerProxy:
- virtual bool HasKeyboardWindow() const OVERRIDE { return window_; }
- virtual aura::Window* GetKeyboardWindow() OVERRIDE {
+ virtual bool HasKeyboardWindow() const override { return window_; }
+ virtual aura::Window* GetKeyboardWindow() override {
if (!window_) {
window_.reset(new aura::Window(&delegate_));
window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
@@ -101,15 +101,15 @@
}
return window_.get();
}
- virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; }
- virtual ui::InputMethod* GetInputMethod() OVERRIDE {
+ virtual content::BrowserContext* GetBrowserContext() override { return NULL; }
+ virtual ui::InputMethod* GetInputMethod() override {
return input_method_.get();
}
virtual void RequestAudioInput(content::WebContents* web_contents,
const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback) OVERRIDE { return; }
- virtual void LoadSystemKeyboard() OVERRIDE {};
- virtual void ReloadKeyboardIfNeeded() OVERRIDE {};
+ const content::MediaResponseCallback& callback) override { return; }
+ virtual void LoadSystemKeyboard() override {};
+ virtual void ReloadKeyboardIfNeeded() override {};
private:
scoped_ptr<aura::Window> window_;
@@ -131,7 +131,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
ui::EventHandler::OnEvent(event);
event_counts_[event->type()]++;
}
@@ -151,7 +151,7 @@
private:
virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE {
+ bool visible) override {
if (!visible)
base::MessageLoop::current()->Quit();
}
@@ -168,7 +168,7 @@
KeyboardControllerTest() {}
virtual ~KeyboardControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// The ContextFactory must exist before any Compositors are created.
bool enable_pixel_output = false;
ui::ContextFactory* context_factory =
@@ -185,7 +185,7 @@
controller_.reset(new KeyboardController(proxy_));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
controller_.reset();
focus_controller_.reset();
if (::switches::IsTextInputFocusManagerEnabled())
@@ -499,7 +499,7 @@
KeyboardControllerAnimationTest() {}
virtual ~KeyboardControllerAnimationTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// We cannot short-circuit animations for this test.
ui::ScopedAnimationDurationScaleMode test_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
@@ -512,14 +512,14 @@
controller()->AddObserver(this);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
controller()->RemoveObserver(this);
KeyboardControllerTest::TearDown();
}
protected:
// KeyboardControllerObserver overrides
- virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE {
+ virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override {
notified_bounds_ = new_bounds;
}
diff --git a/ui/keyboard/keyboard_layout_manager.h b/ui/keyboard/keyboard_layout_manager.h
index bc13f16..b93665f 100644
--- a/ui/keyboard/keyboard_layout_manager.h
+++ b/ui/keyboard/keyboard_layout_manager.h
@@ -22,14 +22,14 @@
}
// Overridden from aura::LayoutManager
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {}
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE {}
+ virtual void OnWindowResized() override;
+ virtual void OnWindowAddedToLayout(aura::Window* child) override;
+ virtual void OnWillRemoveWindowFromLayout(aura::Window* child) override {}
+ virtual void OnWindowRemovedFromLayout(aura::Window* child) override {}
virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE {}
+ bool visible) override {}
virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
+ const gfx::Rect& requested_bounds) override;
private:
KeyboardController* controller_;
diff --git a/ui/keyboard/test/run_all_unittests.cc b/ui/keyboard/test/run_all_unittests.cc
index 9ecd0c6..519f69f 100644
--- a/ui/keyboard/test/run_all_unittests.cc
+++ b/ui/keyboard/test/run_all_unittests.cc
@@ -20,7 +20,7 @@
KeyboardTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
base::TestSuite::Initialize();
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
@@ -30,7 +30,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/keyboard/webui/vk_mojo_handler.h b/ui/keyboard/webui/vk_mojo_handler.h
index 7ee3c9d..a7985db 100644
--- a/ui/keyboard/webui/vk_mojo_handler.h
+++ b/ui/keyboard/webui/vk_mojo_handler.h
@@ -21,27 +21,27 @@
ui::InputMethod* GetInputMethod();
// mojo::InterfaceImpl<>:
- virtual void OnConnectionEstablished() OVERRIDE;
+ virtual void OnConnectionEstablished() override;
// KeyboardUIHandlerMojo:
virtual void SendKeyEvent(const mojo::String& event_type,
int32_t char_value,
int32_t key_code,
const mojo::String& key_name,
- int32_t modifiers) OVERRIDE;
- virtual void HideKeyboard() OVERRIDE;
+ int32_t modifiers) override;
+ virtual void HideKeyboard() override;
// ui::InputMethodObserver:
virtual void OnTextInputTypeChanged(
- const ui::TextInputClient* client) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void OnCaretBoundsChanged(const ui::TextInputClient* client) OVERRIDE;
+ const ui::TextInputClient* client) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
virtual void OnTextInputStateChanged(
- const ui::TextInputClient* text_client) OVERRIDE;
+ const ui::TextInputClient* text_client) override;
virtual void OnInputMethodDestroyed(
- const ui::InputMethod* input_method) OVERRIDE;
- virtual void OnShowImeIfNeeded() OVERRIDE;
+ const ui::InputMethod* input_method) override;
+ virtual void OnShowImeIfNeeded() override;
DISALLOW_COPY_AND_ASSIGN(VKMojoHandler);
};
diff --git a/ui/keyboard/webui/vk_webui_controller.h b/ui/keyboard/webui/vk_webui_controller.h
index d701c63..97ee5a5 100644
--- a/ui/keyboard/webui/vk_webui_controller.h
+++ b/ui/keyboard/webui/vk_webui_controller.h
@@ -33,7 +33,7 @@
mojo::InterfaceRequest<KeyboardUIHandlerMojo> request);
// content::WebUIController:
- virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;
+ virtual void RenderViewCreated(content::RenderViewHost* host) override;
scoped_ptr<VKMojoHandler> ui_handler_;
base::WeakPtrFactory<VKWebUIController> weak_factory_;
@@ -47,14 +47,14 @@
// WebUIControllerFactory:
virtual content::WebUI::TypeID GetWebUIType(
content::BrowserContext* browser_context,
- const GURL& url) const OVERRIDE;
+ const GURL& url) const override;
virtual bool UseWebUIForURL(content::BrowserContext* browser_context,
- const GURL& url) const OVERRIDE;
+ const GURL& url) const override;
virtual bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
- const GURL& url) const OVERRIDE;
+ const GURL& url) const override;
virtual content::WebUIController* CreateWebUIControllerForURL(
content::WebUI* web_ui,
- const GURL& url) const OVERRIDE;
+ const GURL& url) const override;
static VKWebUIControllerFactory* GetInstance();
diff --git a/ui/login/display_manager.js b/ui/login/display_manager.js
index 8f8c60d..5561b9e 100644
--- a/ui/login/display_manager.js
+++ b/ui/login/display_manager.js
@@ -46,6 +46,7 @@
/** @const */ var ACCELERATOR_APP_LAUNCH_BAILOUT = 'app_launch_bailout';
/** @const */ var ACCELERATOR_APP_LAUNCH_NETWORK_CONFIG =
'app_launch_network_config';
+/** @const */ var ACCELERATOR_EMBEDDED_SIGNIN = 'embedded_signin';
/* Signin UI state constants. Used to control header bar UI. */
/** @const */ var SIGNIN_UI_STATE = {
@@ -374,6 +375,9 @@
} else if (name == ACCELERATOR_APP_LAUNCH_NETWORK_CONFIG) {
if (currentStepId == SCREEN_APP_LAUNCH_SPLASH)
chrome.send('networkConfigRequest');
+ } else if (name == ACCELERATOR_EMBEDDED_SIGNIN) {
+ if (currentStepId == SCREEN_GAIA_SIGNIN)
+ chrome.send('switchToEmbeddedSignin');
}
if (!this.forceKeyboardFlow_)
diff --git a/ui/login/screen_container.css b/ui/login/screen_container.css
index fdab175..54fc5ef 100644
--- a/ui/login/screen_container.css
+++ b/ui/login/screen_container.css
@@ -16,7 +16,7 @@
top: 0;
}
-.oobe-display #outer-container.down {
+.oobe-display #outer-container {
-webkit-perspective: 600px;
}
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 4a77441..6ff7091 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -30,14 +30,14 @@
last_clicked_index_(-1) {}
virtual void RemoveNotification(const std::string& id,
- bool by_user) OVERRIDE {
+ bool by_user) override {
last_removed_id_ = id;
last_removed_by_user_ = by_user;
++remove_count_;
}
virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) OVERRIDE {
+ int button_index) override {
last_clicked_id_ = id;
last_clicked_index_ = button_index;
}
diff --git a/ui/message_center/cocoa/popup_collection.mm b/ui/message_center/cocoa/popup_collection.mm
index adc4f62..7320dcb 100644
--- a/ui/message_center/cocoa/popup_collection.mm
+++ b/ui/message_center/cocoa/popup_collection.mm
@@ -62,17 +62,17 @@
}
virtual void OnNotificationAdded(
- const std::string& notification_id) OVERRIDE {
+ const std::string& notification_id) override {
[popup_collection_ layoutNewNotifications];
}
virtual void OnNotificationRemoved(const std::string& notification_id,
- bool user_id) OVERRIDE {
+ bool user_id) override {
[popup_collection_ removeNotification:notification_id];
}
virtual void OnNotificationUpdated(
- const std::string& notification_id) OVERRIDE {
+ const std::string& notification_id) override {
[popup_collection_ updateNotification:notification_id];
}
diff --git a/ui/message_center/cocoa/popup_collection_unittest.mm b/ui/message_center/cocoa/popup_collection_unittest.mm
index d85b158..d2990bc 100644
--- a/ui/message_center/cocoa/popup_collection_unittest.mm
+++ b/ui/message_center/cocoa/popup_collection_unittest.mm
@@ -35,7 +35,7 @@
}];
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
collection_.reset(); // Close all popups.
ui::CocoaTest::TearDown();
}
@@ -404,4 +404,50 @@
collection_.reset();
}
+// This test reproduces bug.
+// https://code.google.com/p/chromium/issues/detail?id=418053
+// It will timeout if problem exists.
+TEST_F(PopupCollectionTest, AnimationDidEndOutOfOrder) {
+ // Set animation duration to 100 ms.
+ [collection_ setAnimationDuration:0.1];
+
+ // Add three notifications.
+ AddThreeNotifications();
+
+ // Wait for animation end.
+ WaitForAnimationEnded();
+
+ // Add fourth notification.
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "4",
+ ASCIIToUTF16("Fourth"),
+ ASCIIToUTF16("This is the Fourth notification to be displayed"),
+ gfx::Image(),
+ base::string16(),
+ DummyNotifierId(),
+ message_center::RichNotificationData(),
+ NULL));
+ center_->AddNotification(notification.Pass());
+
+ // Mark first notifications as shown,
+ // just as from TimerFinished callback.
+ // Mark it while fourth animation is in progress so old notification
+ // will be marked as pending updates.
+ center_->MarkSinglePopupAsShown("1", false);
+ center_->MarkSinglePopupAsShown("2", false);
+ center_->MarkSinglePopupAsShown("3", false);
+
+ WaitForAnimationEnded();
+ // Assert that isAnimating flag is false ater animation ends.
+ // If it will be true after all animaions ends,
+ // no new notification can be added and collection will be blocked.
+ EXPECT_FALSE([collection_ isAnimating]);
+
+ // Release the popup collection before the animation ends. No crash should
+ // be expected.
+ collection_.reset();
+}
+
} // namespace message_center
diff --git a/ui/message_center/cocoa/popup_controller.mm b/ui/message_center/cocoa/popup_controller.mm
index 0f22937..0ee5e89 100644
--- a/ui/message_center/cocoa/popup_controller.mm
+++ b/ui/message_center/cocoa/popup_controller.mm
@@ -192,6 +192,13 @@
[self close];
}
+- (void)animationDidStop:(NSAnimation*)animation {
+ // We can arrive here if animation was stopped in [self close] call.
+ boundsAnimation_.reset();
+
+ [popupCollection_ onPopupAnimationEnded:[self notificationID]];
+}
+
- (void)showWithAnimation:(NSRect)newBounds {
bounds_ = newBounds;
NSRect startBounds = newBounds;
diff --git a/ui/message_center/cocoa/settings_controller.h b/ui/message_center/cocoa/settings_controller.h
index 2efa944..83433b4 100644
--- a/ui/message_center/cocoa/settings_controller.h
+++ b/ui/message_center/cocoa/settings_controller.h
@@ -28,10 +28,10 @@
// Overridden from NotifierSettingsObserver:
virtual void UpdateIconImage(const NotifierId& notifier_id,
- const gfx::Image& icon) OVERRIDE;
- virtual void NotifierGroupChanged() OVERRIDE;
+ const gfx::Image& icon) override;
+ virtual void NotifierGroupChanged() override;
virtual void NotifierEnabledChanged(const NotifierId& notifier_id,
- bool enabled) OVERRIDE;
+ bool enabled) override;
private:
MCSettingsController* settings_controller_; // weak, owns this
diff --git a/ui/message_center/cocoa/status_item_view_unittest.mm b/ui/message_center/cocoa/status_item_view_unittest.mm
index f673a11..fb98a07 100644
--- a/ui/message_center/cocoa/status_item_view_unittest.mm
+++ b/ui/message_center/cocoa/status_item_view_unittest.mm
@@ -13,12 +13,12 @@
: view_([[MCStatusItemView alloc] init]) {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ui::CocoaTest::SetUp();
[[test_window() contentView] addSubview:view_];
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
[view_ removeItem];
ui::CocoaTest::TearDown();
}
diff --git a/ui/message_center/cocoa/tray_controller_unittest.mm b/ui/message_center/cocoa/tray_controller_unittest.mm
index 285e8b6..8a4c6f7 100644
--- a/ui/message_center/cocoa/tray_controller_unittest.mm
+++ b/ui/message_center/cocoa/tray_controller_unittest.mm
@@ -14,7 +14,7 @@
class TrayControllerTest : public ui::CocoaTest {
public:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ui::CocoaTest::SetUp();
message_center::MessageCenter::Initialize();
tray_.reset(new message_center::MessageCenterTray(
@@ -23,7 +23,7 @@
[[MCTrayController alloc] initWithMessageCenterTray:tray_.get()]);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
controller_.reset();
tray_.reset();
message_center::MessageCenter::Shutdown();
diff --git a/ui/message_center/cocoa/tray_view_controller_unittest.mm b/ui/message_center/cocoa/tray_view_controller_unittest.mm
index 9496177..801f3f6 100644
--- a/ui/message_center/cocoa/tray_view_controller_unittest.mm
+++ b/ui/message_center/cocoa/tray_view_controller_unittest.mm
@@ -26,7 +26,7 @@
: center_(NULL) {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ui::CocoaTest::SetUp();
message_center::MessageCenter::Initialize();
center_ = message_center::MessageCenter::Get();
@@ -41,7 +41,7 @@
[tray_ view]; // Create the view.
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
tray_.reset();
message_center::MessageCenter::Shutdown();
ui::CocoaTest::TearDown();
diff --git a/ui/message_center/fake_message_center.h b/ui/message_center/fake_message_center.h
index 22273b8..073cff9 100644
--- a/ui/message_center/fake_message_center.h
+++ b/ui/message_center/fake_message_center.h
@@ -19,60 +19,60 @@
virtual ~FakeMessageCenter();
// Overridden from FakeMessageCenter.
- virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE;
- virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE;
- virtual void AddNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
- virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
- virtual size_t NotificationCount() const OVERRIDE;
- virtual size_t UnreadNotificationCount() const OVERRIDE;
- virtual bool HasPopupNotifications() const OVERRIDE;
- virtual bool IsQuietMode() const OVERRIDE;
- virtual bool HasClickedListener(const std::string& id) OVERRIDE;
+ virtual void AddObserver(MessageCenterObserver* observer) override;
+ virtual void RemoveObserver(MessageCenterObserver* observer) override;
+ virtual void AddNotificationBlocker(NotificationBlocker* blocker) override;
+ virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
+ virtual size_t NotificationCount() const override;
+ virtual size_t UnreadNotificationCount() const override;
+ virtual bool HasPopupNotifications() const override;
+ virtual bool IsQuietMode() const override;
+ virtual bool HasClickedListener(const std::string& id) override;
virtual message_center::Notification* FindVisibleNotificationById(
- const std::string& id) OVERRIDE;
+ const std::string& id) override;
virtual const NotificationList::Notifications& GetVisibleNotifications()
- OVERRIDE;
- virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
- virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
+ override;
+ virtual NotificationList::PopupNotifications GetPopupNotifications() override;
+ virtual void AddNotification(scoped_ptr<Notification> notification) override;
virtual void UpdateNotification(const std::string& old_id,
scoped_ptr<Notification> new_notification)
- OVERRIDE;
+ override;
- virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
- virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
- virtual void RemoveAllVisibleNotifications(bool by_user) OVERRIDE;
+ virtual void RemoveNotification(const std::string& id, bool by_user) override;
+ virtual void RemoveAllNotifications(bool by_user) override;
+ virtual void RemoveAllVisibleNotifications(bool by_user) override;
virtual void SetNotificationIcon(const std::string& notification_id,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void SetNotificationImage(const std::string& notification_id,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void SetNotificationButtonIcon(const std::string& notification_id,
int button_index,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void DisableNotificationsByNotifier(
- const NotifierId& notifier_id) OVERRIDE;
- virtual void ClickOnNotification(const std::string& id) OVERRIDE;
+ const NotifierId& notifier_id) override;
+ virtual void ClickOnNotification(const std::string& id) override;
virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) OVERRIDE;
+ int button_index) override;
virtual void MarkSinglePopupAsShown(const std::string& id,
- bool mark_notification_as_read) OVERRIDE;
+ bool mark_notification_as_read) override;
virtual void DisplayedNotification(
const std::string& id,
- const DisplaySource source) OVERRIDE;
+ const DisplaySource source) override;
virtual void SetNotifierSettingsProvider(
- NotifierSettingsProvider* provider) OVERRIDE;
- virtual NotifierSettingsProvider* GetNotifierSettingsProvider() OVERRIDE;
- virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE;
+ NotifierSettingsProvider* provider) override;
+ virtual NotifierSettingsProvider* GetNotifierSettingsProvider() override;
+ virtual void SetQuietMode(bool in_quiet_mode) override;
virtual void EnterQuietModeWithExpire(
- const base::TimeDelta& expires_in) OVERRIDE;
- virtual void SetVisibility(Visibility visible) OVERRIDE;
- virtual bool IsMessageCenterVisible() const OVERRIDE;
- virtual void RestartPopupTimers() OVERRIDE;
- virtual void PausePopupTimers() OVERRIDE;
+ const base::TimeDelta& expires_in) override;
+ virtual void SetVisibility(Visibility visible) override;
+ virtual bool IsMessageCenterVisible() const override;
+ virtual void RestartPopupTimers() override;
+ virtual void PausePopupTimers() override;
protected:
- virtual void DisableTimersForTest() OVERRIDE;
+ virtual void DisableTimersForTest() override;
private:
const NotificationList::Notifications empty_notifications_;
diff --git a/ui/message_center/fake_message_center_tray_delegate.h b/ui/message_center/fake_message_center_tray_delegate.h
index ff05c84..d03310b 100644
--- a/ui/message_center/fake_message_center_tray_delegate.h
+++ b/ui/message_center/fake_message_center_tray_delegate.h
@@ -27,15 +27,15 @@
}
// Overridden from MessageCenterTrayDelegate:
- virtual void OnMessageCenterTrayChanged() OVERRIDE;
- virtual bool ShowPopups() OVERRIDE;
- virtual void HidePopups() OVERRIDE;
- virtual bool ShowMessageCenter() OVERRIDE;
- virtual void HideMessageCenter() OVERRIDE;
- virtual bool ShowNotifierSettings() OVERRIDE;
- virtual bool IsContextMenuEnabled() const OVERRIDE;
- virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE;
- virtual void DisplayFirstRunBalloon() OVERRIDE;
+ virtual void OnMessageCenterTrayChanged() override;
+ virtual bool ShowPopups() override;
+ virtual void HidePopups() override;
+ virtual bool ShowMessageCenter() override;
+ virtual void HideMessageCenter() override;
+ virtual bool ShowNotifierSettings() override;
+ virtual bool IsContextMenuEnabled() const override;
+ virtual MessageCenterTray* GetMessageCenterTray() override;
+ virtual void DisplayFirstRunBalloon() override;
private:
scoped_ptr<MessageCenterTray> tray_;
diff --git a/ui/message_center/fake_notifier_settings_provider.h b/ui/message_center/fake_notifier_settings_provider.h
index 08f4d34..ebefda1 100644
--- a/ui/message_center/fake_notifier_settings_provider.h
+++ b/ui/message_center/fake_notifier_settings_provider.h
@@ -19,25 +19,25 @@
const std::vector<Notifier*>& notifiers);
virtual ~FakeNotifierSettingsProvider();
- virtual size_t GetNotifierGroupCount() const OVERRIDE;
- virtual const NotifierGroup& GetNotifierGroupAt(size_t index) const OVERRIDE;
- virtual bool IsNotifierGroupActiveAt(size_t index) const OVERRIDE;
- virtual void SwitchToNotifierGroup(size_t index) OVERRIDE;
- virtual const NotifierGroup& GetActiveNotifierGroup() const OVERRIDE;
+ virtual size_t GetNotifierGroupCount() const override;
+ virtual const NotifierGroup& GetNotifierGroupAt(size_t index) const override;
+ virtual bool IsNotifierGroupActiveAt(size_t index) const override;
+ virtual void SwitchToNotifierGroup(size_t index) override;
+ virtual const NotifierGroup& GetActiveNotifierGroup() const override;
- virtual void GetNotifierList(std::vector<Notifier*>* notifiers) OVERRIDE;
+ virtual void GetNotifierList(std::vector<Notifier*>* notifiers) override;
virtual void SetNotifierEnabled(const Notifier& notifier,
- bool enabled) OVERRIDE;
+ bool enabled) override;
- virtual void OnNotifierSettingsClosing() OVERRIDE;
+ virtual void OnNotifierSettingsClosing() override;
virtual bool NotifierHasAdvancedSettings(const NotifierId& notifier_id) const
- OVERRIDE;
+ override;
virtual void OnNotifierAdvancedSettingsRequested(
const NotifierId& notifier_id,
- const std::string* notification_id) OVERRIDE;
- virtual void AddObserver(NotifierSettingsObserver* observer) OVERRIDE;
- virtual void RemoveObserver(NotifierSettingsObserver* observer) OVERRIDE;
+ const std::string* notification_id) override;
+ virtual void AddObserver(NotifierSettingsObserver* observer) override;
+ virtual void RemoveObserver(NotifierSettingsObserver* observer) override;
bool WasEnabled(const Notifier& notifier);
int closed_called_count();
diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h
index f48f5dc..9948089 100644
--- a/ui/message_center/message_center_impl.h
+++ b/ui/message_center/message_center_impl.h
@@ -88,10 +88,10 @@
// MessageCenterObserver implementation.
virtual void OnNotificationDisplayed(
const std::string& id,
- const DisplaySource source) OVERRIDE;
- virtual void OnNotificationUpdated(const std::string& id) OVERRIDE;
+ const DisplaySource source) override;
+ virtual void OnNotificationUpdated(const std::string& id) override;
virtual void OnNotificationRemoved(const std::string& id, bool by_user)
- OVERRIDE;
+ override;
// Callback for each timer when its time is up.
virtual void TimerFinished(const std::string& id);
@@ -145,67 +145,67 @@
virtual ~MessageCenterImpl();
// MessageCenter overrides:
- virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE;
- virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE;
- virtual void AddNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
- virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
- virtual void SetVisibility(Visibility visible) OVERRIDE;
- virtual bool IsMessageCenterVisible() const OVERRIDE;
- virtual size_t NotificationCount() const OVERRIDE;
- virtual size_t UnreadNotificationCount() const OVERRIDE;
- virtual bool HasPopupNotifications() const OVERRIDE;
- virtual bool IsQuietMode() const OVERRIDE;
- virtual bool HasClickedListener(const std::string& id) OVERRIDE;
+ virtual void AddObserver(MessageCenterObserver* observer) override;
+ virtual void RemoveObserver(MessageCenterObserver* observer) override;
+ virtual void AddNotificationBlocker(NotificationBlocker* blocker) override;
+ virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
+ virtual void SetVisibility(Visibility visible) override;
+ virtual bool IsMessageCenterVisible() const override;
+ virtual size_t NotificationCount() const override;
+ virtual size_t UnreadNotificationCount() const override;
+ virtual bool HasPopupNotifications() const override;
+ virtual bool IsQuietMode() const override;
+ virtual bool HasClickedListener(const std::string& id) override;
virtual message_center::Notification* FindVisibleNotificationById(
- const std::string& id) OVERRIDE;
+ const std::string& id) override;
virtual const NotificationList::Notifications& GetVisibleNotifications()
- OVERRIDE;
- virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
- virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
+ override;
+ virtual NotificationList::PopupNotifications GetPopupNotifications() override;
+ virtual void AddNotification(scoped_ptr<Notification> notification) override;
virtual void UpdateNotification(const std::string& old_id,
scoped_ptr<Notification> new_notification)
- OVERRIDE;
- virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
- virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
- virtual void RemoveAllVisibleNotifications(bool by_user) OVERRIDE;
+ override;
+ virtual void RemoveNotification(const std::string& id, bool by_user) override;
+ virtual void RemoveAllNotifications(bool by_user) override;
+ virtual void RemoveAllVisibleNotifications(bool by_user) override;
virtual void SetNotificationIcon(const std::string& notification_id,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void SetNotificationImage(const std::string& notification_id,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void SetNotificationButtonIcon(const std::string& notification_id,
int button_index,
- const gfx::Image& image) OVERRIDE;
+ const gfx::Image& image) override;
virtual void DisableNotificationsByNotifier(
- const NotifierId& notifier_id) OVERRIDE;
- virtual void ClickOnNotification(const std::string& id) OVERRIDE;
+ const NotifierId& notifier_id) override;
+ virtual void ClickOnNotification(const std::string& id) override;
virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) OVERRIDE;
+ int button_index) override;
virtual void MarkSinglePopupAsShown(const std::string& id,
- bool mark_notification_as_read) OVERRIDE;
+ bool mark_notification_as_read) override;
virtual void DisplayedNotification(
const std::string& id,
- const DisplaySource source) OVERRIDE;
+ const DisplaySource source) override;
virtual void SetNotifierSettingsProvider(
- NotifierSettingsProvider* provider) OVERRIDE;
- virtual NotifierSettingsProvider* GetNotifierSettingsProvider() OVERRIDE;
- virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE;
+ NotifierSettingsProvider* provider) override;
+ virtual NotifierSettingsProvider* GetNotifierSettingsProvider() override;
+ virtual void SetQuietMode(bool in_quiet_mode) override;
virtual void EnterQuietModeWithExpire(
- const base::TimeDelta& expires_in) OVERRIDE;
- virtual void RestartPopupTimers() OVERRIDE;
- virtual void PausePopupTimers() OVERRIDE;
+ const base::TimeDelta& expires_in) override;
+ virtual void RestartPopupTimers() override;
+ virtual void PausePopupTimers() override;
// NotificationBlocker::Observer overrides:
- virtual void OnBlockingStateChanged(NotificationBlocker* blocker) OVERRIDE;
+ virtual void OnBlockingStateChanged(NotificationBlocker* blocker) override;
// message_center::NotifierSettingsObserver overrides:
virtual void UpdateIconImage(const NotifierId& notifier_id,
- const gfx::Image& icon) OVERRIDE;
- virtual void NotifierGroupChanged() OVERRIDE;
+ const gfx::Image& icon) override;
+ virtual void NotifierGroupChanged() override;
virtual void NotifierEnabledChanged(const NotifierId& notifier_id,
- bool enabled) OVERRIDE;
+ bool enabled) override;
protected:
- virtual void DisableTimersForTest() OVERRIDE;
+ virtual void DisableTimersForTest() override;
private:
struct NotificationCache {
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index 913c8a2..f0453e5 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -27,7 +27,7 @@
public:
MessageCenterImplTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
MessageCenter::Initialize();
message_center_ = MessageCenter::Get();
loop_.reset(new base::MessageLoop);
@@ -35,7 +35,7 @@
closure_ = run_loop_->QuitClosure();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
run_loop_.reset();
loop_.reset();
message_center_ = NULL;
@@ -118,7 +118,7 @@
// NotificationBlocker overrides:
virtual bool ShouldShowNotificationAsPopup(
- const message_center::NotifierId& notifier_id) const OVERRIDE {
+ const message_center::NotifierId& notifier_id) const override {
return notifications_enabled_;
}
@@ -138,7 +138,7 @@
// NotificationBlocker overrides:
virtual bool ShouldShowNotificationAsPopup(
- const NotifierId& notifier_id) const OVERRIDE {
+ const NotifierId& notifier_id) const override {
return (notifier_id == allowed_notifier_) ||
ToggledNotificationBlocker::ShouldShowNotificationAsPopup(notifier_id);
}
@@ -158,7 +158,7 @@
// NotificationBlocker overrides:
virtual bool ShouldShowNotification(
- const NotifierId& notifier_id) const OVERRIDE {
+ const NotifierId& notifier_id) const override {
return ShouldShowNotificationAsPopup(notifier_id);
}
@@ -202,7 +202,7 @@
quit_closure_(quit_closure) {}
virtual ~MockPopupTimersController() {}
- virtual void TimerFinished(const std::string& id) OVERRIDE {
+ virtual void TimerFinished(const std::string& id) override {
base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_);
timer_finished_ = true;
last_id_ = id;
diff --git a/ui/message_center/message_center_tray.cc b/ui/message_center/message_center_tray.cc
index 3425ce5..3037c69 100644
--- a/ui/message_center/message_center_tray.cc
+++ b/ui/message_center/message_center_tray.cc
@@ -32,12 +32,12 @@
virtual ~NotificationMenuModel();
// Overridden from ui::SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
private:
MessageCenterTray* tray_;
diff --git a/ui/message_center/message_center_tray.h b/ui/message_center/message_center_tray.h
index 4539417..6e81409 100644
--- a/ui/message_center/message_center_tray.h
+++ b/ui/message_center/message_center_tray.h
@@ -74,21 +74,21 @@
message_center::MessageCenter* message_center() { return message_center_; }
// Overridden from MessageCenterObserver:
- virtual void OnNotificationAdded(const std::string& notification_id) OVERRIDE;
+ virtual void OnNotificationAdded(const std::string& notification_id) override;
virtual void OnNotificationRemoved(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual void OnNotificationUpdated(
- const std::string& notification_id) OVERRIDE;
+ const std::string& notification_id) override;
virtual void OnNotificationClicked(
- const std::string& notification_id) OVERRIDE;
+ const std::string& notification_id) override;
virtual void OnNotificationButtonClicked(
const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
virtual void OnNotificationDisplayed(
const std::string& notification_id,
- const DisplaySource source) OVERRIDE;
- virtual void OnQuietModeChanged(bool in_quiet_mode) OVERRIDE;
- virtual void OnBlockingStateChanged(NotificationBlocker* blocker) OVERRIDE;
+ const DisplaySource source) override;
+ virtual void OnQuietModeChanged(bool in_quiet_mode) override;
+ virtual void OnBlockingStateChanged(NotificationBlocker* blocker) override;
private:
void OnMessageCenterChanged();
diff --git a/ui/message_center/message_center_tray_unittest.cc b/ui/message_center/message_center_tray_unittest.cc
index 993e188..cf1fcee 100644
--- a/ui/message_center/message_center_tray_unittest.cc
+++ b/ui/message_center/message_center_tray_unittest.cc
@@ -23,23 +23,23 @@
show_message_center_success_(true),
enable_context_menu_(true) {}
virtual ~MockDelegate() {}
- virtual void OnMessageCenterTrayChanged() OVERRIDE {}
- virtual bool ShowPopups() OVERRIDE {
+ virtual void OnMessageCenterTrayChanged() override {}
+ virtual bool ShowPopups() override {
return show_message_center_success_;
}
- virtual void HidePopups() OVERRIDE {}
- virtual bool ShowMessageCenter() OVERRIDE {
+ virtual void HidePopups() override {}
+ virtual bool ShowMessageCenter() override {
return show_popups_success_;
}
- virtual void HideMessageCenter() OVERRIDE {}
- virtual bool ShowNotifierSettings() OVERRIDE {
+ virtual void HideMessageCenter() override {}
+ virtual bool ShowNotifierSettings() override {
return true;
}
- virtual bool IsContextMenuEnabled() const OVERRIDE {
+ virtual bool IsContextMenuEnabled() const override {
return enable_context_menu_;
}
- virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE {
+ virtual MessageCenterTray* GetMessageCenterTray() override {
return NULL;
}
diff --git a/ui/message_center/notification_delegate.h b/ui/message_center/notification_delegate.h
index 9c6c8a1..2faf2d0 100644
--- a/ui/message_center/notification_delegate.h
+++ b/ui/message_center/notification_delegate.h
@@ -59,12 +59,12 @@
explicit HandleNotificationClickedDelegate(const base::Closure& closure);
// message_center::NotificationDelegate overrides:
- virtual void Display() OVERRIDE;
- virtual void Error() OVERRIDE;
- virtual void Close(bool by_user) OVERRIDE;
- virtual bool HasClickedListener() OVERRIDE;
- virtual void Click() OVERRIDE;
- virtual void ButtonClick(int button_index) OVERRIDE;
+ virtual void Display() override;
+ virtual void Error() override;
+ virtual void Close(bool by_user) override;
+ virtual bool HasClickedListener() override;
+ virtual void Click() override;
+ virtual void ButtonClick(int button_index) override;
protected:
virtual ~HandleNotificationClickedDelegate();
@@ -87,11 +87,11 @@
const ButtonClickCallback& button_callback);
// message_center::NotificationDelegate overrides:
- virtual void Display() OVERRIDE;
- virtual void Error() OVERRIDE;
- virtual void Close(bool by_user) OVERRIDE;
- virtual void Click() OVERRIDE;
- virtual void ButtonClick(int button_index) OVERRIDE;
+ virtual void Display() override;
+ virtual void Error() override;
+ virtual void Close(bool by_user) override;
+ virtual void Click() override;
+ virtual void ButtonClick(int button_index) override;
protected:
virtual ~HandleNotificationButtonClickDelegate();
diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc
index f657e04..274b176 100644
--- a/ui/message_center/test/run_all_unittests.cc
+++ b/ui/message_center/test/run_all_unittests.cc
@@ -23,7 +23,7 @@
MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
#if !defined(OS_MACOSX)
gfx::GLSurface::InitializeOneOffForTests();
#endif
@@ -35,7 +35,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index abbdcf3..f6b2fe2 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -44,12 +44,12 @@
std::vector<base::string16> GetWrappedText(int width, int lines);
// Overridden from views::Label.
- virtual void SetText(const base::string16& text) OVERRIDE;
+ virtual void SetText(const base::string16& text) override;
protected:
// Overridden from views::Label.
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
int GetTextFlags();
diff --git a/ui/message_center/views/bounded_label.h b/ui/message_center/views/bounded_label.h
index 9a9e6d4..d67d5c5 100644
--- a/ui/message_center/views/bounded_label.h
+++ b/ui/message_center/views/bounded_label.h
@@ -50,18 +50,18 @@
gfx::Size GetSizeForWidthAndLines(int width, int lines);
// views::View:
- virtual int GetBaseline() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
+ virtual int GetBaseline() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
virtual void Paint(gfx::Canvas* canvas,
- const views::CullSet& cull_set) OVERRIDE;
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ const views::CullSet& cull_set) override;
+ virtual bool CanProcessEventsWithinSubtree() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
protected:
// Overridden from views::View.
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
private:
friend class test::BoundedLabelTest;
diff --git a/ui/message_center/views/desktop_popup_alignment_delegate.h b/ui/message_center/views/desktop_popup_alignment_delegate.h
index d00dbba..1e126d8 100644
--- a/ui/message_center/views/desktop_popup_alignment_delegate.h
+++ b/ui/message_center/views/desktop_popup_alignment_delegate.h
@@ -30,12 +30,12 @@
void StartObserving(gfx::Screen* screen);
// Overridden from PopupAlignmentDelegate:
- virtual int GetToastOriginX(const gfx::Rect& toast_bounds) const OVERRIDE;
- virtual int GetBaseLine() const OVERRIDE;
- virtual int GetWorkAreaBottom() const OVERRIDE;
- virtual bool IsTopDown() const OVERRIDE;
- virtual bool IsFromLeft() const OVERRIDE;
- virtual void RecomputeAlignment(const gfx::Display& display) OVERRIDE;
+ virtual int GetToastOriginX(const gfx::Rect& toast_bounds) const override;
+ virtual int GetBaseLine() const override;
+ virtual int GetWorkAreaBottom() const override;
+ virtual bool IsTopDown() const override;
+ virtual bool IsFromLeft() const override;
+ virtual void RecomputeAlignment(const gfx::Display& display) override;
private:
friend class test::MessagePopupCollectionTest;
@@ -48,10 +48,10 @@
};
// Overridden from gfx::DisplayObserver:
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
+ virtual void OnDisplayAdded(const gfx::Display& new_display) override;
+ virtual void OnDisplayRemoved(const gfx::Display& old_display) override;
virtual void OnDisplayMetricsChanged(const gfx::Display& display,
- uint32_t metrics) OVERRIDE;
+ uint32_t metrics) override;
int32_t alignment_;
int64_t display_id_;
diff --git a/ui/message_center/views/message_center_bubble.cc b/ui/message_center/views/message_center_bubble.cc
index 273d1ef..7f0d6e8 100644
--- a/ui/message_center/views/message_center_bubble.cc
+++ b/ui/message_center/views/message_center_bubble.cc
@@ -22,11 +22,11 @@
virtual ~ContentsView();
// Overridden from views::View:
- virtual int GetHeightForWidth(int width) const OVERRIDE;
+ virtual int GetHeightForWidth(int width) const override;
protected:
// Overridden from views::View:
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
private:
base::WeakPtr<MessageCenterBubble> bubble_;
diff --git a/ui/message_center/views/message_center_bubble.h b/ui/message_center/views/message_center_bubble.h
index 1173a95..5febb18 100644
--- a/ui/message_center/views/message_center_bubble.h
+++ b/ui/message_center/views/message_center_bubble.h
@@ -29,16 +29,16 @@
void SetSettingsVisible();
// Overridden from views::WidgetObserver:
- virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
+ virtual void OnWidgetClosing(views::Widget* widget) override;
// Overridden from MessageBubbleBase:
virtual views::TrayBubbleView::InitParams GetInitParams(
- views::TrayBubbleView::AnchorAlignment anchor_alignment) OVERRIDE;
- virtual void InitializeContents(views::TrayBubbleView* bubble_view) OVERRIDE;
- virtual void OnBubbleViewDestroyed() OVERRIDE;
- virtual void UpdateBubbleView() OVERRIDE;
- virtual void OnMouseEnteredView() OVERRIDE;
- virtual void OnMouseExitedView() OVERRIDE;
+ views::TrayBubbleView::AnchorAlignment anchor_alignment) override;
+ virtual void InitializeContents(views::TrayBubbleView* bubble_view) override;
+ virtual void OnBubbleViewDestroyed() override;
+ virtual void UpdateBubbleView() override;
+ virtual void OnMouseEnteredView() override;
+ virtual void OnMouseExitedView() override;
size_t NumMessageViewsForTest() const;
diff --git a/ui/message_center/views/message_center_button_bar.cc b/ui/message_center/views/message_center_button_bar.cc
index eb5f11e..b56ab68 100644
--- a/ui/message_center/views/message_center_button_bar.cc
+++ b/ui/message_center/views/message_center_button_bar.cc
@@ -50,7 +50,7 @@
protected:
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
private:
gfx::Size size_;
diff --git a/ui/message_center/views/message_center_button_bar.h b/ui/message_center/views/message_center_button_bar.h
index bc87dbe..a02df8c 100644
--- a/ui/message_center/views/message_center_button_bar.h
+++ b/ui/message_center/views/message_center_button_bar.h
@@ -50,11 +50,11 @@
void ViewVisibilityChanged();
// Overridden from views::View:
- virtual void ChildVisibilityChanged(views::View* child) OVERRIDE;
+ virtual void ChildVisibilityChanged(views::View* child) override;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
MessageCenterView* message_center_view() const {
return message_center_view_;
diff --git a/ui/message_center/views/message_center_view.cc b/ui/message_center/views/message_center_view.cc
index 5b3ee28..d726b61 100644
--- a/ui/message_center/views/message_center_view.cc
+++ b/ui/message_center/views/message_center_view.cc
@@ -62,9 +62,9 @@
virtual ~NoNotificationMessageView();
// Overridden from views::View.
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void Layout() override;
private:
views::Label* label_;
@@ -121,17 +121,17 @@
protected:
// Overridden from views::View.
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
virtual void PaintChildren(gfx::Canvas* canvas,
- const views::CullSet& cull_set) OVERRIDE;
- virtual void ReorderChildLayers(ui::Layer* parent_layer) OVERRIDE;
+ const views::CullSet& cull_set) override;
+ virtual void ReorderChildLayers(ui::Layer* parent_layer) override;
// Overridden from views::BoundsAnimatorObserver.
virtual void OnBoundsAnimatorProgressed(
- views::BoundsAnimator* animator) OVERRIDE;
- virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE;
+ views::BoundsAnimator* animator) override;
+ virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override;
private:
bool IsValidChild(const views::View* child) const;
diff --git a/ui/message_center/views/message_center_view.h b/ui/message_center/views/message_center_view.h
index 94dd139..6f72e91 100644
--- a/ui/message_center/views/message_center_view.h
+++ b/ui/message_center/views/message_center_view.h
@@ -68,33 +68,33 @@
protected:
// Overridden from views::View:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
// Overridden from MessageCenterObserver:
- virtual void OnNotificationAdded(const std::string& id) OVERRIDE;
+ virtual void OnNotificationAdded(const std::string& id) override;
virtual void OnNotificationRemoved(const std::string& id,
- bool by_user) OVERRIDE;
- virtual void OnNotificationUpdated(const std::string& id) OVERRIDE;
+ bool by_user) override;
+ virtual void OnNotificationUpdated(const std::string& id) override;
// Overridden from MessageCenterController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
- const base::string16& display_source) OVERRIDE;
- virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
+ const base::string16& display_source) override;
+ virtual bool HasClickedListener(const std::string& notification_id) override;
virtual void ClickOnNotificationButton(const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
// Overridden from gfx::AnimationDelegate:
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
+ virtual void AnimationCanceled(const gfx::Animation* animation) override;
private:
friend class MessageCenterViewTest;
diff --git a/ui/message_center/views/message_center_view_unittest.cc b/ui/message_center/views/message_center_view_unittest.cc
index 3335ed8..6941927 100644
--- a/ui/message_center/views/message_center_view_unittest.cc
+++ b/ui/message_center/views/message_center_view_unittest.cc
@@ -40,9 +40,9 @@
Test* test);
virtual ~MockNotificationView();
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int w) const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int w) const override;
+ virtual void Layout() override;
private:
Test* test_;
@@ -87,26 +87,26 @@
MessageCenterViewTest();
virtual ~MessageCenterViewTest();
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
MessageCenterView* GetMessageCenterView();
int GetNotificationCount();
int GetCallCount(CallType type);
// Overridden from MessageCenterController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
- const base::string16& display_source) OVERRIDE;
- virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
+ const base::string16& display_source) override;
+ virtual bool HasClickedListener(const std::string& notification_id) override;
virtual void ClickOnNotificationButton(const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
// Overridden from MockNotificationView::Test
- virtual void RegisterCall(CallType type) OVERRIDE;
+ virtual void RegisterCall(CallType type) override;
void LogBounds(int depth, views::View* view);
diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h
index 8d6d644..f015319 100644
--- a/ui/message_center/views/message_popup_collection.h
+++ b/ui/message_center/views/message_popup_collection.h
@@ -62,15 +62,15 @@
virtual ~MessagePopupCollection();
// Overridden from MessageCenterController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
- const base::string16& display_source) OVERRIDE;
- virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
+ const base::string16& display_source) override;
+ virtual bool HasClickedListener(const std::string& notification_id) override;
virtual void ClickOnNotificationButton(const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
void MarkAllPopupsShown();
@@ -128,11 +128,11 @@
int GetBaseLine(ToastContentsView* last_toast) const;
// Overridden from MessageCenterObserver:
- virtual void OnNotificationAdded(const std::string& notification_id) OVERRIDE;
+ virtual void OnNotificationAdded(const std::string& notification_id) override;
virtual void OnNotificationRemoved(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual void OnNotificationUpdated(
- const std::string& notification_id) OVERRIDE;
+ const std::string& notification_id) override;
ToastContentsView* FindToast(const std::string& notification_id) const;
diff --git a/ui/message_center/views/message_popup_collection_unittest.cc b/ui/message_center/views/message_popup_collection_unittest.cc
index 551e4dd..6aa0736 100644
--- a/ui/message_center/views/message_popup_collection_unittest.cc
+++ b/ui/message_center/views/message_popup_collection_unittest.cc
@@ -26,7 +26,7 @@
class MessagePopupCollectionTest : public views::ViewsTestBase {
public:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
views::ViewsTestBase::SetUp();
MessageCenter::Initialize();
MessageCenter::Get()->DisableTimersForTest();
@@ -42,7 +42,7 @@
PrepareForWait();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
collection_.reset();
MessageCenter::Shutdown();
views::ViewsTestBase::TearDown();
diff --git a/ui/message_center/views/message_view.h b/ui/message_center/views/message_view.h
index 1bf8aee..0c0d3c5 100644
--- a/ui/message_center/views/message_view.h
+++ b/ui/message_center/views/message_view.h
@@ -74,21 +74,21 @@
}
// Overridden from views::View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void Layout() override;
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; }
std::string notification_id() { return notification_id_; }
@@ -97,7 +97,7 @@
protected:
// Overridden from views::SlideOutView:
- virtual void OnSlideOut() OVERRIDE;
+ virtual void OnSlideOut() override;
views::ImageView* small_image() { return small_image_view_.get(); }
views::ImageButton* close_button() { return close_button_.get(); }
diff --git a/ui/message_center/views/message_view_context_menu_controller.h b/ui/message_center/views/message_view_context_menu_controller.h
index 5ee39de..7c41259 100644
--- a/ui/message_center/views/message_view_context_menu_controller.h
+++ b/ui/message_center/views/message_view_context_menu_controller.h
@@ -22,7 +22,7 @@
// Overridden from views::ContextMenuController:
virtual void ShowContextMenuForView(views::View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
MessageCenterController* controller_;
diff --git a/ui/message_center/views/notification_button.h b/ui/message_center/views/notification_button.h
index b5ac0f1..347964a 100644
--- a/ui/message_center/views/notification_button.h
+++ b/ui/message_center/views/notification_button.h
@@ -27,16 +27,16 @@
void SetTitle(const base::string16& title);
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
// Overridden from views::CustomButton:
- virtual void StateChanged() OVERRIDE;
+ virtual void StateChanged() override;
private:
views::ImageView* icon_;
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index 81cfcd1..208a386 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -115,7 +115,7 @@
virtual ~ItemView();
// Overridden from views::View:
- virtual void SetVisible(bool visible) OVERRIDE;
+ virtual void SetVisible(bool visible) override;
private:
DISALLOW_COPY_AND_ASSIGN(ItemView);
@@ -194,8 +194,8 @@
private:
// Overriden from View
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
DISALLOW_COPY_AND_ASSIGN(NotificationProgressBar);
};
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h
index 623f120..0cb6444 100644
--- a/ui/message_center/views/notification_view.h
+++ b/ui/message_center/views/notification_view.h
@@ -46,23 +46,23 @@
virtual ~NotificationView();
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void ScrollRectToVisible(const gfx::Rect& rect) OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void Layout() override;
+ virtual void OnFocus() override;
+ virtual void ScrollRectToVisible(const gfx::Rect& rect) override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
// Overridden from MessageView:
virtual void UpdateWithNotification(
- const Notification& notification) OVERRIDE;
+ const Notification& notification) override;
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from MessageViewController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
void set_controller(MessageCenterController* controller) {
controller_ = controller;
@@ -82,7 +82,7 @@
// views::ViewTargeterDelegate:
virtual views::View* TargetForRect(views::View* root,
- const gfx::Rect& rect) OVERRIDE;
+ const gfx::Rect& rect) override;
void CreateOrUpdateViews(const Notification& notification);
void SetAccessibleName(const Notification& notification);
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index 6e85301..1937618 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -28,8 +28,8 @@
NotificationViewTest();
virtual ~NotificationViewTest();
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
views::Widget* widget() { return notification_view_->GetWidget(); }
NotificationView* notification_view() { return notification_view_.get(); }
@@ -37,15 +37,15 @@
RichNotificationData* data() { return data_.get(); }
// Overridden from MessageCenterController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
- const base::string16& display_source) OVERRIDE;
- virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
+ const base::string16& display_source) override;
+ virtual bool HasClickedListener(const std::string& notification_id) override;
virtual void ClickOnNotificationButton(const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
protected:
const gfx::Image CreateTestImage(int width, int height) {
diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc
index cbe285b..4f24a8c 100644
--- a/ui/message_center/views/notifier_settings_view.cc
+++ b/ui/message_center/views/notifier_settings_view.cc
@@ -129,14 +129,14 @@
virtual ~EntryView();
// views::View:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnFocus() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnBlur() override;
private:
scoped_ptr<views::Painter> focus_painter_;
@@ -210,12 +210,12 @@
virtual ~NotifierGroupMenuModel();
// ui::SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
private:
NotifierSettingsProvider* notifier_settings_provider_;
diff --git a/ui/message_center/views/notifier_settings_view.h b/ui/message_center/views/notifier_settings_view.h
index 994fa50..ef60a06 100644
--- a/ui/message_center/views/notifier_settings_view.h
+++ b/ui/message_center/views/notifier_settings_view.h
@@ -41,10 +41,10 @@
// Overridden from NotifierSettingsDelegate:
virtual void UpdateIconImage(const NotifierId& notifier_id,
- const gfx::Image& icon) OVERRIDE;
- virtual void NotifierGroupChanged() OVERRIDE;
+ const gfx::Image& icon) override;
+ virtual void NotifierGroupChanged() override;
virtual void NotifierEnabledChanged(const NotifierId& notifier_id,
- bool enabled) OVERRIDE;
+ bool enabled) override;
void set_provider(NotifierSettingsProvider* new_provider) {
provider_ = new_provider;
@@ -72,8 +72,8 @@
private:
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* button,
- const ui::Event& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ const ui::Event& event) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
bool ShouldHaveLearnMoreButton() const;
// Helper function to reset the layout when the view has substantially
@@ -96,19 +96,19 @@
void UpdateContentsView(const std::vector<Notifier*>& notifiers);
// Overridden from views::View:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// Overridden from views::MenuButtonListener:
virtual void OnMenuButtonClicked(views::View* source,
- const gfx::Point& point) OVERRIDE;
+ const gfx::Point& point) override;
views::ImageButton* title_arrow_;
views::Label* title_label_;
diff --git a/ui/message_center/views/notifier_settings_view_unittest.cc b/ui/message_center/views/notifier_settings_view_unittest.cc
index 331bd95..df9ce16 100644
--- a/ui/message_center/views/notifier_settings_view_unittest.cc
+++ b/ui/message_center/views/notifier_settings_view_unittest.cc
@@ -31,13 +31,13 @@
virtual ~TestingNotifierSettingsProvider() {}
virtual bool NotifierHasAdvancedSettings(const NotifierId& notifier_id) const
- OVERRIDE {
+ override {
return notifier_id == settings_handler_id_;
}
virtual void OnNotifierAdvancedSettingsRequested(
const NotifierId& notifier_id,
- const std::string* notification_id) OVERRIDE {
+ const std::string* notification_id) override {
request_count_++;
last_notifier_id_settings_requested_.reset(new NotifierId(notifier_id));
}
@@ -60,8 +60,8 @@
NotifierSettingsViewTest();
virtual ~NotifierSettingsViewTest();
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
NotifierSettingsView* GetView() const;
TestingNotifierSettingsProvider* settings_provider() const {
diff --git a/ui/message_center/views/padded_button.h b/ui/message_center/views/padded_button.h
index c420621..ccb2590 100644
--- a/ui/message_center/views/padded_button.h
+++ b/ui/message_center/views/padded_button.h
@@ -24,9 +24,9 @@
virtual ~PaddedButton();
// Overridden from views::ImageButton:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
// The SetPadding() method also sets the button's image alignment (positive
// values yield left/top alignments, negative values yield right/bottom ones,
diff --git a/ui/message_center/views/proportional_image_view.h b/ui/message_center/views/proportional_image_view.h
index 7c1be92..f92b4d8 100644
--- a/ui/message_center/views/proportional_image_view.h
+++ b/ui/message_center/views/proportional_image_view.h
@@ -17,9 +17,9 @@
virtual ~ProportionalImageView();
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
gfx::Size GetImageDrawingSize();
diff --git a/ui/message_center/views/toast_contents_view.h b/ui/message_center/views/toast_contents_view.h
index 1b39d81..4ebcd17 100644
--- a/ui/message_center/views/toast_contents_view.h
+++ b/ui/message_center/views/toast_contents_view.h
@@ -71,34 +71,34 @@
const std::string& id() { return id_; }
// Overridden from views::View:
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
private:
// Overridden from MessageCenterController:
- virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
+ virtual void ClickOnNotification(const std::string& notification_id) override;
virtual void RemoveNotification(const std::string& notification_id,
- bool by_user) OVERRIDE;
+ bool by_user) override;
virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
- const base::string16& display_source) OVERRIDE;
- virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
+ const base::string16& display_source) override;
+ virtual bool HasClickedListener(const std::string& notification_id) override;
virtual void ClickOnNotificationButton(const std::string& notification_id,
- int button_index) OVERRIDE;
+ int button_index) override;
// Overridden from gfx::AnimationDelegate:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationCanceled(const gfx::Animation* animation) override;
// Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE;
- virtual void WindowClosing() OVERRIDE;
- virtual void OnDisplayChanged() OVERRIDE;
- virtual void OnWorkAreaChanged() OVERRIDE;
+ virtual views::View* GetContentsView() override;
+ virtual void WindowClosing() override;
+ virtual void OnDisplayChanged() override;
+ virtual void OnWorkAreaChanged() override;
// Initialization and update.
void CreateWidget(gfx::NativeView parent);
diff --git a/ui/metro_viewer/OWNERS b/ui/metro_viewer/OWNERS
index 5ecb406..9b1c245 100644
--- a/ui/metro_viewer/OWNERS
+++ b/ui/metro_viewer/OWNERS
@@ -6,6 +6,7 @@
per-file *_messages*.h=jln@chromium.org
per-file *_messages*.h=jschuh@chromium.org
per-file *_messages*.h=kenrb@chromium.org
+per-file *_messages*.h=mkwst@chromium.org
per-file *_messages*.h=nasko@chromium.org
per-file *_messages*.h=tsepez@chromium.org
per-file *_messages*.h=wfh@chromium.org
diff --git a/ui/native_theme/fallback_theme.h b/ui/native_theme/fallback_theme.h
index 65eb3bd..4f695b0 100644
--- a/ui/native_theme/fallback_theme.h
+++ b/ui/native_theme/fallback_theme.h
@@ -18,7 +18,7 @@
protected:
// Overridden from NativeThemeBase:
- virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
+ virtual SkColor GetSystemColor(ColorId color_id) const override;
private:
DISALLOW_COPY_AND_ASSIGN(FallbackTheme);
diff --git a/ui/native_theme/native_theme_android.h b/ui/native_theme/native_theme_android.h
index e1d2f78..378a233 100644
--- a/ui/native_theme/native_theme_android.h
+++ b/ui/native_theme/native_theme_android.h
@@ -14,7 +14,7 @@
public:
static NativeThemeAndroid* instance();
- virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
+ virtual SkColor GetSystemColor(ColorId color_id) const override;
private:
NativeThemeAndroid();
diff --git a/ui/native_theme/native_theme_aura.h b/ui/native_theme/native_theme_aura.h
index 82a6ec9..2bcfbed 100644
--- a/ui/native_theme/native_theme_aura.h
+++ b/ui/native_theme/native_theme_aura.h
@@ -28,36 +28,36 @@
virtual void PaintMenuPopupBackground(
SkCanvas* canvas,
const gfx::Size& size,
- const MenuBackgroundExtraParams& menu_background) const OVERRIDE;
+ const MenuBackgroundExtraParams& menu_background) const override;
virtual void PaintMenuItemBackground(
SkCanvas* canvas,
State state,
const gfx::Rect& rect,
- const MenuListExtraParams& menu_list) const OVERRIDE;
+ const MenuListExtraParams& menu_list) const override;
virtual void PaintArrowButton(SkCanvas* gc,
const gfx::Rect& rect,
Part direction,
- State state) const OVERRIDE;
+ State state) const override;
virtual void PaintScrollbarTrack(
SkCanvas* sk_canvas,
Part part,
State state,
const ScrollbarTrackExtraParams& extra_params,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintScrollbarThumb(SkCanvas* sk_canvas,
Part part,
State state,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintScrollbarCorner(SkCanvas* canvas,
State state,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintScrollbarThumbStateTransition(SkCanvas* canvas,
State startState,
State endState,
double progress,
const gfx::Rect& rect) const
- OVERRIDE;
+ override;
// Returns the NineImagePainter used to paint the specified state, creating if
// necessary. If no image is provided for the specified state the normal state
diff --git a/ui/native_theme/native_theme_aurawin.h b/ui/native_theme/native_theme_aurawin.h
index 0b3a29e..7c7e57d 100644
--- a/ui/native_theme/native_theme_aurawin.h
+++ b/ui/native_theme/native_theme_aurawin.h
@@ -23,12 +23,12 @@
// Overridden from NativeThemeBase:
virtual gfx::Size GetPartSize(Part part,
State state,
- const ExtraParams& extra) const OVERRIDE;
+ const ExtraParams& extra) const override;
virtual void Paint(SkCanvas* canvas,
Part part,
State state,
const gfx::Rect& rect,
- const ExtraParams& extra) const OVERRIDE;
+ const ExtraParams& extra) const override;
DISALLOW_COPY_AND_ASSIGN(NativeThemeAuraWin);
};
diff --git a/ui/native_theme/native_theme_base.h b/ui/native_theme/native_theme_base.h
index 454c4b6..b928c81 100644
--- a/ui/native_theme/native_theme_base.h
+++ b/ui/native_theme/native_theme_base.h
@@ -26,19 +26,19 @@
// NativeTheme implementation:
virtual gfx::Size GetPartSize(Part part,
State state,
- const ExtraParams& extra) const OVERRIDE;
+ const ExtraParams& extra) const override;
virtual void Paint(SkCanvas* canvas,
Part part,
State state,
const gfx::Rect& rect,
- const ExtraParams& extra) const OVERRIDE;
+ const ExtraParams& extra) const override;
virtual void PaintStateTransition(SkCanvas* canvas,
Part part,
State startState,
State endState,
double progress,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
protected:
NativeThemeBase();
diff --git a/ui/native_theme/native_theme_mac.h b/ui/native_theme/native_theme_mac.h
index ecdd38e..433e16d 100644
--- a/ui/native_theme/native_theme_mac.h
+++ b/ui/native_theme/native_theme_mac.h
@@ -17,7 +17,7 @@
static NativeThemeMac* instance();
// Overridden from NativeTheme:
- virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
+ virtual SkColor GetSystemColor(ColorId color_id) const override;
// Overridden from NativeThemeBase:
virtual void PaintScrollbarTrack(
@@ -25,23 +25,23 @@
Part part,
State state,
const ScrollbarTrackExtraParams& extra_params,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintScrollbarThumb(SkCanvas* sk_canvas,
Part part,
State state,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintScrollbarCorner(SkCanvas* canvas,
State state,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
virtual void PaintMenuPopupBackground(
SkCanvas* canvas,
const gfx::Size& size,
- const MenuBackgroundExtraParams& menu_background) const OVERRIDE;
+ const MenuBackgroundExtraParams& menu_background) const override;
virtual void PaintMenuItemBackground(
SkCanvas* canvas,
State state,
const gfx::Rect& rect,
- const MenuListExtraParams& menu_list) const OVERRIDE;
+ const MenuListExtraParams& menu_list) const override;
private:
NativeThemeMac();
diff --git a/ui/native_theme/native_theme_win.h b/ui/native_theme/native_theme_win.h
index 408818f..9430298 100644
--- a/ui/native_theme/native_theme_win.h
+++ b/ui/native_theme/native_theme_win.h
@@ -106,20 +106,20 @@
// NativeTheme implementation:
virtual gfx::Size GetPartSize(Part part,
State state,
- const ExtraParams& extra) const OVERRIDE;
+ const ExtraParams& extra) const override;
virtual void Paint(SkCanvas* canvas,
Part part,
State state,
const gfx::Rect& rect,
- const ExtraParams& extra) const OVERRIDE;
- virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
+ const ExtraParams& extra) const override;
+ virtual SkColor GetSystemColor(ColorId color_id) const override;
private:
NativeThemeWin();
~NativeThemeWin();
// gfx::SysColorChangeListener implementation:
- virtual void OnSysColorChange() OVERRIDE;
+ virtual void OnSysColorChange() override;
// Update the locally cached set of system colors.
void UpdateSystemColors();
diff --git a/ui/ozone/common/display_snapshot_proxy.h b/ui/ozone/common/display_snapshot_proxy.h
index c0d29c5..175af51 100644
--- a/ui/ozone/common/display_snapshot_proxy.h
+++ b/ui/ozone/common/display_snapshot_proxy.h
@@ -17,7 +17,7 @@
virtual ~DisplaySnapshotProxy();
// DisplaySnapshot override:
- virtual std::string ToString() const OVERRIDE;
+ virtual std::string ToString() const override;
private:
std::string string_representation_;
diff --git a/ui/ozone/common/native_display_delegate_ozone.h b/ui/ozone/common/native_display_delegate_ozone.h
index 5507f9a..e600ce5 100644
--- a/ui/ozone/common/native_display_delegate_ozone.h
+++ b/ui/ozone/common/native_display_delegate_ozone.h
@@ -16,31 +16,31 @@
virtual ~NativeDisplayDelegateOzone();
// NativeDisplayDelegate overrides:
- virtual void Initialize() OVERRIDE;
- virtual void GrabServer() OVERRIDE;
- virtual void UngrabServer() OVERRIDE;
- virtual void SyncWithServer() OVERRIDE;
- virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE;
- virtual void ForceDPMSOn() OVERRIDE;
- virtual std::vector<ui::DisplaySnapshot*> GetDisplays() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void GrabServer() override;
+ virtual void UngrabServer() override;
+ virtual void SyncWithServer() override;
+ virtual void SetBackgroundColor(uint32_t color_argb) override;
+ virtual void ForceDPMSOn() override;
+ virtual std::vector<ui::DisplaySnapshot*> GetDisplays() override;
virtual void AddMode(const ui::DisplaySnapshot& output,
- const ui::DisplayMode* mode) OVERRIDE;
+ const ui::DisplayMode* mode) override;
virtual bool Configure(const ui::DisplaySnapshot& output,
const ui::DisplayMode* mode,
- const gfx::Point& origin) OVERRIDE;
- virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE;
+ const gfx::Point& origin) override;
+ virtual void CreateFrameBuffer(const gfx::Size& size) override;
virtual bool GetHDCPState(const ui::DisplaySnapshot& output,
- ui::HDCPState* state) OVERRIDE;
+ ui::HDCPState* state) override;
virtual bool SetHDCPState(const ui::DisplaySnapshot& output,
- ui::HDCPState state) OVERRIDE;
+ ui::HDCPState state) override;
virtual std::vector<ui::ColorCalibrationProfile>
GetAvailableColorCalibrationProfiles(
- const ui::DisplaySnapshot& output) OVERRIDE;
+ const ui::DisplaySnapshot& output) override;
virtual bool SetColorCalibrationProfile(
const ui::DisplaySnapshot& output,
- ui::ColorCalibrationProfile new_profile) OVERRIDE;
- virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
+ ui::ColorCalibrationProfile new_profile) override;
+ virtual void AddObserver(NativeDisplayObserver* observer) override;
+ virtual void RemoveObserver(NativeDisplayObserver* observer) override;
private:
DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateOzone);
diff --git a/ui/ozone/demo/ozone_demo.cc b/ui/ozone/demo/ozone_demo.cc
index 42a6267..717b451 100644
--- a/ui/ozone/demo/ozone_demo.cc
+++ b/ui/ozone/demo/ozone_demo.cc
@@ -66,22 +66,22 @@
}
// PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect& new_bounds) OVERRIDE {}
- virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE {}
- virtual void DispatchEvent(ui::Event* event) OVERRIDE {}
- virtual void OnCloseRequest() OVERRIDE {
+ virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override {}
+ virtual void OnDamageRect(const gfx::Rect& damaged_region) override {}
+ virtual void DispatchEvent(ui::Event* event) override {}
+ virtual void OnCloseRequest() override {
Quit();
}
- virtual void OnClosed() OVERRIDE {}
+ virtual void OnClosed() override {}
virtual void OnWindowStateChanged(
- ui::PlatformWindowState new_state) OVERRIDE {}
- virtual void OnLostCapture() OVERRIDE {}
+ ui::PlatformWindowState new_state) override {}
+ virtual void OnLostCapture() override {}
virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) OVERRIDE {
+ gfx::AcceleratedWidget widget) override {
DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
widget_ = widget;
}
- virtual void OnActivationChanged(bool active) OVERRIDE {}
+ virtual void OnActivationChanged(bool active) override {}
private:
bool InitializeGLSurface() {
diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
index 6953185..c9bee4c 100644
--- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
+++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
@@ -28,7 +28,7 @@
int z_order,
gfx::OverlayTransform transform,
const gfx::Rect& bounds_rect,
- const gfx::RectF& crop_rect) OVERRIDE {
+ const gfx::RectF& crop_rect) override {
return SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane(
widget, z_order, transform, pixmap_, bounds_rect, crop_rect);
}
@@ -41,16 +41,20 @@
scoped_refptr<NativePixmap> pixmap_;
};
-SurfaceFactoryOzone::BufferFormat GetOzoneFormatFor(unsigned internal_format) {
- switch (internal_format) {
- case GL_RGBA8_OES:
+SurfaceFactoryOzone::BufferFormat GetOzoneFormatFor(
+ gfx::GpuMemoryBuffer::Format format) {
+ switch (format) {
+ case gfx::GpuMemoryBuffer::RGBA_8888:
return SurfaceFactoryOzone::RGBA_8888;
- case GL_RGB8_OES:
+ case gfx::GpuMemoryBuffer::RGBX_8888:
return SurfaceFactoryOzone::RGBX_8888;
- default:
+ case gfx::GpuMemoryBuffer::BGRA_8888:
NOTREACHED();
return SurfaceFactoryOzone::RGBA_8888;
}
+
+ NOTREACHED();
+ return SurfaceFactoryOzone::RGBA_8888;
}
std::pair<uint32_t, uint32_t> GetIndex(const gfx::GpuMemoryBufferId& id) {
@@ -69,15 +73,14 @@
bool GpuMemoryBufferFactoryOzoneNativeBuffer::CreateGpuMemoryBuffer(
const gfx::GpuMemoryBufferId& id,
const gfx::Size& size,
- unsigned internalformat,
- unsigned usage) {
+ gfx::GpuMemoryBuffer::Format format,
+ gfx::GpuMemoryBuffer::Usage usage) {
scoped_refptr<NativePixmap> pixmap =
SurfaceFactoryOzone::GetInstance()->CreateNativePixmap(
- size, GetOzoneFormatFor(internalformat));
+ size, GetOzoneFormatFor(format));
if (!pixmap.get()) {
LOG(ERROR) << "Failed to create pixmap " << size.width() << "x"
- << size.height() << " format " << internalformat << ", usage "
- << usage;
+ << size.height() << " format " << format << ", usage " << usage;
return false;
}
native_pixmap_map_[GetIndex(id)] = pixmap;
diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h
index 79584fc..b35487f 100644
--- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h
+++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h
@@ -30,8 +30,8 @@
// Creates a GPU memory buffer identified by |id|.
bool CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferId& id,
const gfx::Size& size,
- unsigned internalformat,
- unsigned usage);
+ gfx::GpuMemoryBuffer::Format format,
+ gfx::GpuMemoryBuffer::Usage usage);
// Destroys GPU memory buffer identified by |id|.
void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferId& id);
diff --git a/ui/ozone/platform/caca/caca_window.h b/ui/ozone/platform/caca/caca_window.h
index 444f3d5..5310a93 100644
--- a/ui/ozone/platform/caca/caca_window.h
+++ b/ui/ozone/platform/caca/caca_window.h
@@ -47,23 +47,23 @@
caca_display_t* display() const { return display_.get(); }
// PlatformWindow:
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
private:
// Event polling.
diff --git a/ui/ozone/platform/caca/caca_window_manager.cc b/ui/ozone/platform/caca/caca_window_manager.cc
index 9dbbc6b..247ba28 100644
--- a/ui/ozone/platform/caca/caca_window_manager.cc
+++ b/ui/ozone/platform/caca/caca_window_manager.cc
@@ -26,10 +26,10 @@
bool Initialize();
// ui::SurfaceOzoneCanvas overrides:
- virtual skia::RefPtr<SkCanvas> GetCanvas() OVERRIDE;
- virtual void ResizeCanvas(const gfx::Size& viewport_size) OVERRIDE;
- virtual void PresentCanvas(const gfx::Rect& damage) OVERRIDE;
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE;
+ virtual skia::RefPtr<SkCanvas> GetCanvas() override;
+ virtual void ResizeCanvas(const gfx::Size& viewport_size) override;
+ virtual void PresentCanvas(const gfx::Rect& damage) override;
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
private:
CacaWindow* window_; // Not owned.
diff --git a/ui/ozone/platform/caca/caca_window_manager.h b/ui/ozone/platform/caca/caca_window_manager.h
index e01cf55..de1d5ae 100644
--- a/ui/ozone/platform/caca/caca_window_manager.h
+++ b/ui/ozone/platform/caca/caca_window_manager.h
@@ -31,9 +31,9 @@
// ui::SurfaceFactoryOzone overrides:
virtual bool LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
- SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
- gfx::AcceleratedWidget widget) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
private:
IDMap<CacaWindow> windows_;
diff --git a/ui/ozone/platform/caca/ozone_platform_caca.cc b/ui/ozone/platform/caca/ozone_platform_caca.cc
index d892a63..a34f014 100644
--- a/ui/ozone/platform/caca/ozone_platform_caca.cc
+++ b/ui/ozone/platform/caca/ozone_platform_caca.cc
@@ -21,21 +21,21 @@
virtual ~OzonePlatformCaca() {}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return window_manager_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
return NULL; // no GPU support
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return NULL; // no GPU support
}
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
scoped_ptr<CacaWindow> caca_window(new CacaWindow(
delegate, window_manager_.get(), event_source_.get(), bounds));
if (!caca_window->Initialize())
@@ -43,17 +43,17 @@
return caca_window.PassAs<PlatformWindow>();
}
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
}
- virtual void InitializeUI() OVERRIDE {
+ virtual void InitializeUI() override {
window_manager_.reset(new CacaWindowManager);
event_source_.reset(new CacaEventSource());
cursor_factory_ozone_.reset(new CursorFactoryOzone());
}
- virtual void InitializeGPU() OVERRIDE {}
+ virtual void InitializeGPU() override {}
private:
scoped_ptr<CacaWindowManager> window_manager_;
diff --git a/ui/ozone/platform/dri/display_snapshot_dri.cc b/ui/ozone/platform/dri/display_snapshot_dri.cc
index fa7b6f9..0d0c559 100644
--- a/ui/ozone/platform/dri/display_snapshot_dri.cc
+++ b/ui/ozone/platform/dri/display_snapshot_dri.cc
@@ -43,11 +43,16 @@
bool IsAspectPreserving(DriWrapper* drm, drmModeConnector* connector) {
ScopedDrmPropertyPtr property(drm->GetProperty(connector, "scaling mode"));
- if (property) {
- for (int j = 0; j < property->count_enums; ++j) {
- if (property->enums[j].value ==
- connector->prop_values[property->prop_id] &&
- strcmp(property->enums[j].name, "Full aspect") == 0)
+ if (!property)
+ return false;
+
+ for (int props_i = 0; props_i < connector->count_props; ++props_i) {
+ if (connector->props[props_i] != property->prop_id)
+ continue;
+
+ for (int enums_i = 0; enums_i < property->count_enums; ++enums_i) {
+ if (property->enums[enums_i].value == connector->prop_values[props_i] &&
+ strcmp(property->enums[enums_i].name, "Full aspect") == 0)
return true;
}
}
diff --git a/ui/ozone/platform/dri/display_snapshot_dri.h b/ui/ozone/platform/dri/display_snapshot_dri.h
index a509be4..5c13188 100644
--- a/ui/ozone/platform/dri/display_snapshot_dri.h
+++ b/ui/ozone/platform/dri/display_snapshot_dri.h
@@ -27,7 +27,7 @@
drmModePropertyRes* dpms_property() const { return dpms_property_.get(); }
// DisplaySnapshot overrides:
- virtual std::string ToString() const OVERRIDE;
+ virtual std::string ToString() const override;
private:
uint32_t connector_;
diff --git a/ui/ozone/platform/dri/dri_buffer.h b/ui/ozone/platform/dri/dri_buffer.h
index 9b645ae..773860f 100644
--- a/ui/ozone/platform/dri/dri_buffer.h
+++ b/ui/ozone/platform/dri/dri_buffer.h
@@ -28,9 +28,9 @@
SkCanvas* GetCanvas() const;
// ScanoutBuffer:
- virtual uint32_t GetFramebufferId() const OVERRIDE;
- virtual uint32_t GetHandle() const OVERRIDE;
- virtual gfx::Size GetSize() const OVERRIDE;
+ virtual uint32_t GetFramebufferId() const override;
+ virtual uint32_t GetHandle() const override;
+ virtual gfx::Size GetSize() const override;
protected:
virtual ~DriBuffer();
@@ -59,7 +59,7 @@
virtual ~DriBufferGenerator();
// ScanoutBufferGenerator:
- virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) OVERRIDE;
+ virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) override;
private:
DriWrapper* dri_; // Not owned.
diff --git a/ui/ozone/platform/dri/dri_cursor.h b/ui/ozone/platform/dri/dri_cursor.h
index 949584c..f13abef 100644
--- a/ui/ozone/platform/dri/dri_cursor.h
+++ b/ui/ozone/platform/dri/dri_cursor.h
@@ -35,10 +35,10 @@
// CursorDelegateEvdev:
virtual void MoveCursorTo(gfx::AcceleratedWidget widget,
- const gfx::PointF& location) OVERRIDE;
- virtual void MoveCursor(const gfx::Vector2dF& delta) OVERRIDE;
- virtual bool IsCursorVisible() OVERRIDE;
- virtual gfx::PointF location() OVERRIDE;
+ const gfx::PointF& location) override;
+ virtual void MoveCursor(const gfx::Vector2dF& delta) override;
+ virtual bool IsCursorVisible() override;
+ virtual gfx::PointF location() override;
private:
// The location of the bitmap (the cursor location is the hotspot location).
diff --git a/ui/ozone/platform/dri/dri_gpu_platform_support.h b/ui/ozone/platform/dri/dri_gpu_platform_support.h
index 65a8ee5..259edb7 100644
--- a/ui/ozone/platform/dri/dri_gpu_platform_support.h
+++ b/ui/ozone/platform/dri/dri_gpu_platform_support.h
@@ -40,10 +40,10 @@
void AddHandler(scoped_ptr<GpuPlatformSupport> handler);
// GpuPlatformSupport:
- virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE;
+ virtual void OnChannelEstablished(IPC::Sender* sender) override;
// IPC::Listener:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) override;
private:
void OnCreateWindowDelegate(gfx::AcceleratedWidget widget);
diff --git a/ui/ozone/platform/dri/dri_gpu_platform_support_host.h b/ui/ozone/platform/dri/dri_gpu_platform_support_host.h
index 0315b54..61d35f0 100644
--- a/ui/ozone/platform/dri/dri_gpu_platform_support_host.h
+++ b/ui/ozone/platform/dri/dri_gpu_platform_support_host.h
@@ -39,22 +39,22 @@
void RemoveChannelObserver(ChannelObserver* observer);
// GpuPlatformSupportHost:
- virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
- virtual void OnChannelDestroyed(int host_id) OVERRIDE;
+ virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) override;
+ virtual void OnChannelDestroyed(int host_id) override;
// IPC::Listener:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) override;
// IPC::Sender:
- virtual bool Send(IPC::Message* message) OVERRIDE;
+ virtual bool Send(IPC::Message* message) override;
// HardwareCursorDelegate:
virtual void SetHardwareCursor(gfx::AcceleratedWidget widget,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& location,
- int frame_delay_ms) OVERRIDE;
+ int frame_delay_ms) override;
virtual void MoveHardwareCursor(gfx::AcceleratedWidget widget,
- const gfx::Point& location) OVERRIDE;
+ const gfx::Point& location) override;
private:
int host_id_;
diff --git a/ui/ozone/platform/dri/dri_surface.h b/ui/ozone/platform/dri/dri_surface.h
index 740a310..d3b7807 100644
--- a/ui/ozone/platform/dri/dri_surface.h
+++ b/ui/ozone/platform/dri/dri_surface.h
@@ -27,10 +27,10 @@
virtual ~DriSurface();
// SurfaceOzoneCanvas:
- virtual skia::RefPtr<SkCanvas> GetCanvas() OVERRIDE;
- virtual void ResizeCanvas(const gfx::Size& viewport_size) OVERRIDE;
- virtual void PresentCanvas(const gfx::Rect& damage) OVERRIDE;
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE;
+ virtual skia::RefPtr<SkCanvas> GetCanvas() override;
+ virtual void ResizeCanvas(const gfx::Size& viewport_size) override;
+ virtual void PresentCanvas(const gfx::Rect& damage) override;
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
private:
void UpdateNativeSurface(const gfx::Rect& damage);
diff --git a/ui/ozone/platform/dri/dri_surface_factory.h b/ui/ozone/platform/dri/dri_surface_factory.h
index c51847e..d05ad5f 100644
--- a/ui/ozone/platform/dri/dri_surface_factory.h
+++ b/ui/ozone/platform/dri/dri_surface_factory.h
@@ -50,18 +50,18 @@
// SurfaceFactoryOzone:
virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
- gfx::AcceleratedWidget widget) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
virtual bool LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
- SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
// HardwareCursorDelegate:
virtual void SetHardwareCursor(gfx::AcceleratedWidget widget,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& location,
- int frame_delay_ms) OVERRIDE;
+ int frame_delay_ms) override;
virtual void MoveHardwareCursor(gfx::AcceleratedWidget window,
- const gfx::Point& location) OVERRIDE;
+ const gfx::Point& location) override;
protected:
// Draw the last set cursor & update the cursor plane.
diff --git a/ui/ozone/platform/dri/dri_surface_factory_unittest.cc b/ui/ozone/platform/dri/dri_surface_factory_unittest.cc
index 1fbaf31..6a124c6 100644
--- a/ui/ozone/platform/dri/dri_surface_factory_unittest.cc
+++ b/ui/ozone/platform/dri/dri_surface_factory_unittest.cc
@@ -40,7 +40,7 @@
// Normally we'd use DRM to figure out the controller configuration. But we
// can't use DRM in unit tests, so we just create a fake configuration.
- virtual void ForceInitializationOfPrimaryDisplay() OVERRIDE {
+ virtual void ForceInitializationOfPrimaryDisplay() override {
ConfigureDisplayController(
kDefaultCrtc, kDefaultConnector, gfx::Point(), kDefaultMode);
}
@@ -57,8 +57,8 @@
public:
DriSurfaceFactoryTest() {}
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
scoped_ptr<base::MessageLoop> message_loop_;
scoped_ptr<ui::MockDriWrapper> dri_;
diff --git a/ui/ozone/platform/dri/dri_surface_unittest.cc b/ui/ozone/platform/dri/dri_surface_unittest.cc
index 427911e..108e600 100644
--- a/ui/ozone/platform/dri/dri_surface_unittest.cc
+++ b/ui/ozone/platform/dri/dri_surface_unittest.cc
@@ -37,13 +37,13 @@
virtual ~MockDriWindowDelegate() {}
// DriWindowDelegate:
- virtual void Initialize() OVERRIDE {}
- virtual void Shutdown() OVERRIDE {}
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 1; }
- virtual ui::HardwareDisplayController* GetController() OVERRIDE {
+ virtual void Initialize() override {}
+ virtual void Shutdown() override {}
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override { return 1; }
+ virtual ui::HardwareDisplayController* GetController() override {
return controller_.get();
}
- virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE {}
+ virtual void OnBoundsChanged(const gfx::Rect& bounds) override {}
private:
scoped_ptr<ui::HardwareDisplayController> controller_;
@@ -57,8 +57,8 @@
public:
DriSurfaceTest() {}
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
scoped_ptr<base::MessageLoop> message_loop_;
diff --git a/ui/ozone/platform/dri/dri_vsync_provider.h b/ui/ozone/platform/dri/dri_vsync_provider.h
index c90aa80..05668f2 100644
--- a/ui/ozone/platform/dri/dri_vsync_provider.h
+++ b/ui/ozone/platform/dri/dri_vsync_provider.h
@@ -16,7 +16,7 @@
DriVSyncProvider(DriWindowDelegate* window_delegate);
virtual ~DriVSyncProvider();
- virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) OVERRIDE;
+ virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
private:
DriWindowDelegate* window_delegate_; // Not owned.
diff --git a/ui/ozone/platform/dri/dri_window.h b/ui/ozone/platform/dri/dri_window.h
index 825c6a0..9197ce0 100644
--- a/ui/ozone/platform/dri/dri_window.h
+++ b/ui/ozone/platform/dri/dri_window.h
@@ -33,27 +33,27 @@
void Initialize();
// PlatformWindow:
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
// ChannelObserver:
- virtual void OnChannelEstablished() OVERRIDE;
- virtual void OnChannelDestroyed() OVERRIDE;
+ virtual void OnChannelEstablished() override;
+ virtual void OnChannelDestroyed() override;
private:
PlatformWindowDelegate* delegate_; // Not owned.
diff --git a/ui/ozone/platform/dri/dri_window_delegate_impl.h b/ui/ozone/platform/dri/dri_window_delegate_impl.h
index 336b05d..0345beb 100644
--- a/ui/ozone/platform/dri/dri_window_delegate_impl.h
+++ b/ui/ozone/platform/dri/dri_window_delegate_impl.h
@@ -25,11 +25,11 @@
virtual ~DriWindowDelegateImpl();
// DriWindowDelegate:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual HardwareDisplayController* GetController() OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE;
+ virtual void Initialize() override;
+ virtual void Shutdown() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual HardwareDisplayController* GetController() override;
+ virtual void OnBoundsChanged(const gfx::Rect& bounds) override;
private:
gfx::AcceleratedWidget widget_;
diff --git a/ui/ozone/platform/dri/gbm_buffer.h b/ui/ozone/platform/dri/gbm_buffer.h
index b455db3..3451510 100644
--- a/ui/ozone/platform/dri/gbm_buffer.h
+++ b/ui/ozone/platform/dri/gbm_buffer.h
@@ -40,8 +40,8 @@
GbmPixmap(scoped_refptr<GbmBuffer> buffer);
// NativePixmap:
- virtual void* GetEGLClientBuffer() OVERRIDE;
- virtual int GetDmaBufFd() OVERRIDE;
+ virtual void* GetEGLClientBuffer() override;
+ virtual int GetDmaBufFd() override;
scoped_refptr<GbmBuffer> buffer() { return buffer_; }
diff --git a/ui/ozone/platform/dri/gbm_buffer_base.h b/ui/ozone/platform/dri/gbm_buffer_base.h
index b536694..58ce159 100644
--- a/ui/ozone/platform/dri/gbm_buffer_base.h
+++ b/ui/ozone/platform/dri/gbm_buffer_base.h
@@ -22,9 +22,9 @@
gbm_bo* bo() const { return bo_; }
// ScanoutBuffer:
- virtual uint32_t GetFramebufferId() const OVERRIDE;
- virtual uint32_t GetHandle() const OVERRIDE;
- virtual gfx::Size GetSize() const OVERRIDE;
+ virtual uint32_t GetFramebufferId() const override;
+ virtual uint32_t GetHandle() const override;
+ virtual gfx::Size GetSize() const override;
protected:
GbmBufferBase(DriWrapper* dri, gbm_bo* bo, bool scanout);
diff --git a/ui/ozone/platform/dri/gbm_surface.h b/ui/ozone/platform/dri/gbm_surface.h
index be52c9c..ed54b31 100644
--- a/ui/ozone/platform/dri/gbm_surface.h
+++ b/ui/ozone/platform/dri/gbm_surface.h
@@ -34,9 +34,9 @@
bool Initialize();
// GbmSurfaceless:
- virtual intptr_t GetNativeWindow() OVERRIDE;
- virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) OVERRIDE;
- virtual bool OnSwapBuffers() OVERRIDE;
+ virtual intptr_t GetNativeWindow() override;
+ virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
+ virtual bool OnSwapBuffers() override;
private:
gbm_device* gbm_device_;
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc
index a31fcee..59f6a4c 100644
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc
@@ -29,7 +29,7 @@
virtual ~SingleOverlay() {}
virtual void CheckOverlaySupport(
- OverlaySurfaceCandidateList* candidates) OVERRIDE {
+ OverlaySurfaceCandidateList* candidates) override {
if (candidates->size() == 2) {
OverlayCandidatesOzone::OverlaySurfaceCandidate* first =
&(*candidates)[0];
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.h b/ui/ozone/platform/dri/gbm_surface_factory.h
index 2118db2..786f77d 100644
--- a/ui/ozone/platform/dri/gbm_surface_factory.h
+++ b/ui/ozone/platform/dri/gbm_surface_factory.h
@@ -25,28 +25,28 @@
DriWindowDelegateManager* window_manager);
// DriSurfaceFactory:
- virtual intptr_t GetNativeDisplay() OVERRIDE;
+ virtual intptr_t GetNativeDisplay() override;
virtual const int32_t* GetEGLSurfaceProperties(
- const int32_t* desired_list) OVERRIDE;
+ const int32_t* desired_list) override;
virtual bool LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
- SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
virtual scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
- gfx::AcceleratedWidget w) OVERRIDE;
+ gfx::AcceleratedWidget w) override;
virtual scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget(
- gfx::AcceleratedWidget widget) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
virtual scoped_refptr<ui::NativePixmap> CreateNativePixmap(
gfx::Size size,
- BufferFormat format) OVERRIDE;
+ BufferFormat format) override;
virtual OverlayCandidatesOzone* GetOverlayCandidates(
- gfx::AcceleratedWidget w) OVERRIDE;
+ gfx::AcceleratedWidget w) override;
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int plane_z_order,
gfx::OverlayTransform plane_transform,
scoped_refptr<NativePixmap> buffer,
const gfx::Rect& display_bounds,
- const gfx::RectF& crop_rect) OVERRIDE;
- virtual bool CanShowPrimaryPlaneAsOverlay() OVERRIDE;
+ const gfx::RectF& crop_rect) override;
+ virtual bool CanShowPrimaryPlaneAsOverlay() override;
private:
DriWindowDelegate* GetOrCreateWindowDelegate(gfx::AcceleratedWidget widget);
diff --git a/ui/ozone/platform/dri/gbm_surfaceless.h b/ui/ozone/platform/dri/gbm_surfaceless.h
index 4e3b92b..d30b7a4 100644
--- a/ui/ozone/platform/dri/gbm_surfaceless.h
+++ b/ui/ozone/platform/dri/gbm_surfaceless.h
@@ -25,10 +25,10 @@
virtual ~GbmSurfaceless();
// SurfaceOzoneEGL:
- virtual intptr_t GetNativeWindow() OVERRIDE;
- virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) OVERRIDE;
- virtual bool OnSwapBuffers() OVERRIDE;
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE;
+ virtual intptr_t GetNativeWindow() override;
+ virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
+ virtual bool OnSwapBuffers() override;
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
protected:
DriWindowDelegate* window_delegate_;
diff --git a/ui/ozone/platform/dri/hardware_display_controller.cc b/ui/ozone/platform/dri/hardware_display_controller.cc
index 716ec38..ee4e4a9 100644
--- a/ui/ozone/platform/dri/hardware_display_controller.cc
+++ b/ui/ozone/platform/dri/hardware_display_controller.cc
@@ -119,7 +119,10 @@
bool has_pending_page_flips = false;
// Wait for the page-flips to complete.
for (size_t i = 0; i < crtc_controllers_.size(); ++i) {
- if (crtc_controllers_[i]->page_flip_pending()) {
+ // In mirror mode the page flip callbacks can happen in different order than
+ // scheduled, so we need to make sure that the event for the current CRTC is
+ // processed before moving to the next CRTC.
+ while (crtc_controllers_[i]->page_flip_pending()) {
has_pending_page_flips = true;
crtc_controllers_[i]->drm()->HandleEvent(drm_event);
}
diff --git a/ui/ozone/platform/dri/hardware_display_controller_unittest.cc b/ui/ozone/platform/dri/hardware_display_controller_unittest.cc
index bde4d5a..ded4cfe 100644
--- a/ui/ozone/platform/dri/hardware_display_controller_unittest.cc
+++ b/ui/ozone/platform/dri/hardware_display_controller_unittest.cc
@@ -30,9 +30,9 @@
MockScanoutBuffer(const gfx::Size& size) : size_(size) {}
// ScanoutBuffer:
- virtual uint32_t GetFramebufferId() const OVERRIDE {return 0; }
- virtual uint32_t GetHandle() const OVERRIDE { return 0; }
- virtual gfx::Size GetSize() const OVERRIDE { return size_; }
+ virtual uint32_t GetFramebufferId() const override {return 0; }
+ virtual uint32_t GetHandle() const override { return 0; }
+ virtual gfx::Size GetSize() const override { return size_; }
private:
virtual ~MockScanoutBuffer() {}
@@ -49,8 +49,8 @@
HardwareDisplayControllerTest() {}
virtual ~HardwareDisplayControllerTest() {}
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
scoped_ptr<ui::HardwareDisplayController> controller_;
scoped_ptr<ui::MockDriWrapper> drm_;
@@ -182,4 +182,38 @@
controller_->QueueOverlayPlane(plane2);
EXPECT_TRUE(controller_->SchedulePageFlip());
EXPECT_EQ(2, drm_->get_page_flip_call_count());
+
+ controller_->WaitForPageFlipEvent();
+ EXPECT_EQ(2, drm_->get_handle_events_count());
+}
+
+TEST_F(HardwareDisplayControllerTest,
+ PageflipMirroredControllersWithInvertedCrtcOrder) {
+ scoped_ptr<ui::CrtcController> crtc1(
+ new ui::CrtcController(drm_.get(), kPrimaryCrtc, kPrimaryConnector));
+ scoped_ptr<ui::CrtcController> crtc2(
+ new ui::CrtcController(drm_.get(), kSecondaryCrtc, kSecondaryConnector));
+
+ // Make sure that if the order is reversed everything is still fine.
+ std::queue<ui::CrtcController*> crtc_queue;
+ crtc_queue.push(crtc2.get());
+ crtc_queue.push(crtc1.get());
+
+ controller_.reset(new ui::HardwareDisplayController(crtc1.Pass()));
+ controller_->AddCrtc(crtc2.Pass());
+
+ ui::OverlayPlane plane1(scoped_refptr<ui::ScanoutBuffer>(
+ new MockScanoutBuffer(kDefaultModeSize)));
+ EXPECT_TRUE(controller_->Modeset(plane1, kDefaultMode));
+ EXPECT_EQ(2, drm_->get_set_crtc_call_count());
+
+ ui::OverlayPlane plane2(scoped_refptr<ui::ScanoutBuffer>(
+ new MockScanoutBuffer(kDefaultModeSize)));
+ controller_->QueueOverlayPlane(plane2);
+ EXPECT_TRUE(controller_->SchedulePageFlip());
+ EXPECT_EQ(2, drm_->get_page_flip_call_count());
+
+ drm_->set_controllers(crtc_queue);
+ controller_->WaitForPageFlipEvent();
+ EXPECT_EQ(2, drm_->get_handle_events_count());
}
diff --git a/ui/ozone/platform/dri/native_display_delegate_dri.h b/ui/ozone/platform/dri/native_display_delegate_dri.h
index 70abb7b..fc20054 100644
--- a/ui/ozone/platform/dri/native_display_delegate_dri.h
+++ b/ui/ozone/platform/dri/native_display_delegate_dri.h
@@ -33,34 +33,34 @@
float refresh_rate);
// NativeDisplayDelegate overrides:
- virtual void Initialize() OVERRIDE;
- virtual void GrabServer() OVERRIDE;
- virtual void UngrabServer() OVERRIDE;
- virtual void SyncWithServer() OVERRIDE;
- virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE;
- virtual void ForceDPMSOn() OVERRIDE;
- virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void GrabServer() override;
+ virtual void UngrabServer() override;
+ virtual void SyncWithServer() override;
+ virtual void SetBackgroundColor(uint32_t color_argb) override;
+ virtual void ForceDPMSOn() override;
+ virtual std::vector<DisplaySnapshot*> GetDisplays() override;
virtual void AddMode(const DisplaySnapshot& output,
- const DisplayMode* mode) OVERRIDE;
+ const DisplayMode* mode) override;
virtual bool Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
- const gfx::Point& origin) OVERRIDE;
- virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE;
+ const gfx::Point& origin) override;
+ virtual void CreateFrameBuffer(const gfx::Size& size) override;
virtual bool GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) OVERRIDE;
+ HDCPState* state) override;
virtual bool SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) OVERRIDE;
+ HDCPState state) override;
virtual std::vector<ui::ColorCalibrationProfile>
GetAvailableColorCalibrationProfiles(
- const ui::DisplaySnapshot& output) OVERRIDE;
+ const ui::DisplaySnapshot& output) override;
virtual bool SetColorCalibrationProfile(
const ui::DisplaySnapshot& output,
- ui::ColorCalibrationProfile new_profile) OVERRIDE;
- virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
+ ui::ColorCalibrationProfile new_profile) override;
+ virtual void AddObserver(NativeDisplayObserver* observer) override;
+ virtual void RemoveObserver(NativeDisplayObserver* observer) override;
// DeviceEventObserver overrides:
- virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE;
+ virtual void OnDeviceEvent(const DeviceEvent& event) override;
private:
// Notify ScreenManager of all the displays that were present before the
diff --git a/ui/ozone/platform/dri/native_display_delegate_proxy.h b/ui/ozone/platform/dri/native_display_delegate_proxy.h
index 098c514..2dcf0e1 100644
--- a/ui/ozone/platform/dri/native_display_delegate_proxy.h
+++ b/ui/ozone/platform/dri/native_display_delegate_proxy.h
@@ -28,41 +28,41 @@
virtual ~NativeDisplayDelegateProxy();
// NativeDisplayDelegate overrides:
- virtual void Initialize() OVERRIDE;
- virtual void GrabServer() OVERRIDE;
- virtual void UngrabServer() OVERRIDE;
- virtual void SyncWithServer() OVERRIDE;
- virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE;
- virtual void ForceDPMSOn() OVERRIDE;
- virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void GrabServer() override;
+ virtual void UngrabServer() override;
+ virtual void SyncWithServer() override;
+ virtual void SetBackgroundColor(uint32_t color_argb) override;
+ virtual void ForceDPMSOn() override;
+ virtual std::vector<DisplaySnapshot*> GetDisplays() override;
virtual void AddMode(const DisplaySnapshot& output,
- const DisplayMode* mode) OVERRIDE;
+ const DisplayMode* mode) override;
virtual bool Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
- const gfx::Point& origin) OVERRIDE;
- virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE;
+ const gfx::Point& origin) override;
+ virtual void CreateFrameBuffer(const gfx::Size& size) override;
virtual bool GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) OVERRIDE;
+ HDCPState* state) override;
virtual bool SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) OVERRIDE;
+ HDCPState state) override;
virtual std::vector<ColorCalibrationProfile>
GetAvailableColorCalibrationProfiles(
- const DisplaySnapshot& output) OVERRIDE;
+ const DisplaySnapshot& output) override;
virtual bool SetColorCalibrationProfile(
const DisplaySnapshot& output,
- ColorCalibrationProfile new_profile) OVERRIDE;
- virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
+ ColorCalibrationProfile new_profile) override;
+ virtual void AddObserver(NativeDisplayObserver* observer) override;
+ virtual void RemoveObserver(NativeDisplayObserver* observer) override;
// DeviceEventObserver overrides:
- virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE;
+ virtual void OnDeviceEvent(const DeviceEvent& event) override;
// GpuPlatformSupportHost:
- virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
- virtual void OnChannelDestroyed(int host_id) OVERRIDE;
+ virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) override;
+ virtual void OnChannelDestroyed(int host_id) override;
// IPC::Listener overrides:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) override;
private:
void OnUpdateNativeDisplays(
diff --git a/ui/ozone/platform/dri/ozone_platform_dri.cc b/ui/ozone/platform/dri/ozone_platform_dri.cc
index f4f0914..88d6207 100644
--- a/ui/ozone/platform/dri/ozone_platform_dri.cc
+++ b/ui/ozone/platform/dri/ozone_platform_dri.cc
@@ -50,21 +50,21 @@
virtual ~OzonePlatformDri() {}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return surface_factory_ozone_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
return gpu_platform_support_.get();
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
scoped_ptr<DriWindow> platform_window(
new DriWindow(delegate,
bounds,
@@ -75,11 +75,11 @@
return platform_window.PassAs<PlatformWindow>();
}
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri(
dri_.get(), screen_manager_.get(), device_manager_.get()));
}
- virtual void InitializeUI() OVERRIDE {
+ virtual void InitializeUI() override {
dri_->Initialize();
surface_factory_ozone_.reset(new DriSurfaceFactory(
dri_.get(), screen_manager_.get(), &window_delegate_manager_));
@@ -101,7 +101,7 @@
LOG(FATAL) << "Failed to initialize dummy channel.";
}
- virtual void InitializeGPU() OVERRIDE {}
+ virtual void InitializeGPU() override {}
private:
scoped_ptr<VirtualTerminalManager> vt_manager_;
diff --git a/ui/ozone/platform/dri/ozone_platform_gbm.cc b/ui/ozone/platform/dri/ozone_platform_gbm.cc
index e8f0bef..737689c 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -57,7 +57,7 @@
gbm_device* device() const { return device_; }
- virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) OVERRIDE {
+ virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) override {
return GbmBuffer::CreateBuffer(
dri_, device_, SurfaceFactoryOzone::RGBA_8888, size, true);
}
@@ -82,21 +82,21 @@
virtual ~OzonePlatformGbm() {}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return surface_factory_ozone_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
return gpu_platform_support_.get();
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
scoped_ptr<DriWindow> platform_window(
new DriWindow(delegate,
bounds,
@@ -107,11 +107,11 @@
return platform_window.PassAs<PlatformWindow>();
}
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy(
gpu_platform_support_host_.get(), device_manager_.get()));
}
- virtual void InitializeUI() OVERRIDE {
+ virtual void InitializeUI() override {
vt_manager_.reset(new VirtualTerminalManager());
// Needed since the browser process creates the accelerated widgets and that
// happens through SFO.
@@ -125,7 +125,7 @@
device_manager_.get()));
}
- virtual void InitializeGPU() OVERRIDE {
+ virtual void InitializeGPU() override {
dri_.reset(new DriWrapper(kDefaultGraphicsCardPath));
dri_->Initialize();
buffer_generator_.reset(new GbmBufferGenerator(dri_.get()));
diff --git a/ui/ozone/platform/dri/screen_manager_unittest.cc b/ui/ozone/platform/dri/screen_manager_unittest.cc
index 843553f..1ee0006 100644
--- a/ui/ozone/platform/dri/screen_manager_unittest.cc
+++ b/ui/ozone/platform/dri/screen_manager_unittest.cc
@@ -25,7 +25,7 @@
ui::ScanoutBufferGenerator* buffer_generator)
: ScreenManager(dri, buffer_generator), dri_(dri) {}
- virtual void ForceInitializationOfPrimaryDisplay() OVERRIDE {}
+ virtual void ForceInitializationOfPrimaryDisplay() override {}
private:
ui::DriWrapper* dri_;
@@ -50,13 +50,13 @@
kDefaultMode.hdisplay, 0, kDefaultMode.hdisplay, kDefaultMode.vdisplay);
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
dri_.reset(new ui::MockDriWrapper(3));
buffer_generator_.reset(new ui::DriBufferGenerator(dri_.get()));
screen_manager_.reset(new MockScreenManager(
dri_.get(), buffer_generator_.get()));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
screen_manager_.reset();
dri_.reset();
}
diff --git a/ui/ozone/platform/dri/test/mock_dri_wrapper.cc b/ui/ozone/platform/dri/test/mock_dri_wrapper.cc
index b3f0100..fefddf7 100644
--- a/ui/ozone/platform/dri/test/mock_dri_wrapper.cc
+++ b/ui/ozone/platform/dri/test/mock_dri_wrapper.cc
@@ -30,6 +30,7 @@
remove_framebuffer_call_count_(0),
page_flip_call_count_(0),
overlay_flip_call_count_(0),
+ handle_events_count_(0),
set_crtc_expectation_(true),
add_framebuffer_expectation_(true),
page_flip_expectation_(true),
@@ -132,6 +133,7 @@
CHECK(!controllers_.empty());
controllers_.front()->OnPageFlipEvent(0, 0, 0);
controllers_.pop();
+ handle_events_count_++;
}
bool MockDriWrapper::CreateDumbBuffer(const SkImageInfo& info,
diff --git a/ui/ozone/platform/dri/test/mock_dri_wrapper.h b/ui/ozone/platform/dri/test/mock_dri_wrapper.h
index 3d4517b..a9b68b7 100644
--- a/ui/ozone/platform/dri/test/mock_dri_wrapper.h
+++ b/ui/ozone/platform/dri/test/mock_dri_wrapper.h
@@ -33,6 +33,7 @@
}
int get_page_flip_call_count() const { return page_flip_call_count_; }
int get_overlay_flip_call_count() const { return overlay_flip_call_count_; }
+ int get_handle_events_count() const { return handle_events_count_; }
void fail_init() { fd_ = -1; }
void set_set_crtc_expectation(bool state) { set_crtc_expectation_ = state; }
void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; }
@@ -49,51 +50,56 @@
return buffers_;
}
+ // Overwrite the list of controllers used when serving the PageFlip requests.
+ void set_controllers(const std::queue<CrtcController*>& controllers) {
+ controllers_ = controllers;
+ }
+
// DriWrapper:
- virtual ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) OVERRIDE;
+ virtual ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) override;
virtual bool SetCrtc(uint32_t crtc_id,
uint32_t framebuffer,
std::vector<uint32_t> connectors,
- drmModeModeInfo* mode) OVERRIDE;
+ drmModeModeInfo* mode) override;
virtual bool SetCrtc(drmModeCrtc* crtc,
- std::vector<uint32_t> connectors) OVERRIDE;
- virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id) OVERRIDE;
+ std::vector<uint32_t> connectors) override;
+ virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id) override;
virtual bool AddFramebuffer(uint32_t width,
uint32_t height,
uint8_t depth,
uint8_t bpp,
uint32_t stride,
uint32_t handle,
- uint32_t* framebuffer) OVERRIDE;
- virtual bool RemoveFramebuffer(uint32_t framebuffer) OVERRIDE;
+ uint32_t* framebuffer) override;
+ virtual bool RemoveFramebuffer(uint32_t framebuffer) override;
virtual bool PageFlip(uint32_t crtc_id,
uint32_t framebuffer,
- void* data) OVERRIDE;
+ void* data) override;
virtual bool PageFlipOverlay(uint32_t crtc_id,
uint32_t framebuffer,
const gfx::Rect& location,
const gfx::RectF& source,
- int overlay_plane) OVERRIDE;
+ int overlay_plane) override;
virtual ScopedDrmPropertyPtr GetProperty(drmModeConnector* connector,
- const char* name) OVERRIDE;
+ const char* name) override;
virtual bool SetProperty(uint32_t connector_id,
uint32_t property_id,
- uint64_t value) OVERRIDE;
+ uint64_t value) override;
virtual ScopedDrmPropertyBlobPtr GetPropertyBlob(drmModeConnector* connector,
- const char* name) OVERRIDE;
+ const char* name) override;
virtual bool SetCursor(uint32_t crtc_id,
uint32_t handle,
- const gfx::Size& size) OVERRIDE;
- virtual bool MoveCursor(uint32_t crtc_id, const gfx::Point& point) OVERRIDE;
- virtual void HandleEvent(drmEventContext& event) OVERRIDE;
+ const gfx::Size& size) override;
+ virtual bool MoveCursor(uint32_t crtc_id, const gfx::Point& point) override;
+ virtual void HandleEvent(drmEventContext& event) override;
virtual bool CreateDumbBuffer(const SkImageInfo& info,
uint32_t* handle,
uint32_t* stride,
- void** pixels) OVERRIDE;
+ void** pixels) override;
virtual void DestroyDumbBuffer(const SkImageInfo& info,
uint32_t handle,
uint32_t stride,
- void* pixels) OVERRIDE;
+ void* pixels) override;
private:
int get_crtc_call_count_;
@@ -103,6 +109,7 @@
int remove_framebuffer_call_count_;
int page_flip_call_count_;
int overlay_flip_call_count_;
+ int handle_events_count_;
bool set_crtc_expectation_;
bool add_framebuffer_expectation_;
diff --git a/ui/ozone/platform/egltest/ozone_platform_egltest.cc b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
index 46ee4ef..c192c9f 100644
--- a/ui/ozone/platform/egltest/ozone_platform_egltest.cc
+++ b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
@@ -54,23 +54,23 @@
virtual ~EgltestWindow();
// PlatformWindow:
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
private:
PlatformWindowDelegate* delegate_;
@@ -174,15 +174,15 @@
DCHECK(ret);
}
- virtual intptr_t GetNativeWindow() OVERRIDE { return native_window_; }
+ virtual intptr_t GetNativeWindow() override { return native_window_; }
- virtual bool OnSwapBuffers() OVERRIDE { return true; }
+ virtual bool OnSwapBuffers() override { return true; }
- virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) OVERRIDE {
+ virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) override {
return true;
}
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE {
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override {
return scoped_ptr<gfx::VSyncProvider>();
}
@@ -203,14 +203,14 @@
virtual ~SurfaceFactoryEgltest() {}
// SurfaceFactoryOzone:
- virtual intptr_t GetNativeDisplay() OVERRIDE;
+ virtual intptr_t GetNativeDisplay() override;
virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
- gfx::AcceleratedWidget widget) OVERRIDE;
+ gfx::AcceleratedWidget widget) override;
virtual const int32* GetEGLSurfaceProperties(
- const int32* desired_list) OVERRIDE;
+ const int32* desired_list) override;
virtual bool LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
- SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
private:
LibeglplatformShimLoader* eglplatform_shim_;
@@ -317,21 +317,21 @@
}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return surface_factory_ozone_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
return gpu_platform_support_.get();
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
return make_scoped_ptr<PlatformWindow>(
new EgltestWindow(delegate,
&eglplatform_shim_,
@@ -339,11 +339,11 @@
bounds));
}
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
}
- virtual void InitializeUI() OVERRIDE {
+ virtual void InitializeUI() override {
device_manager_ = CreateDeviceManager();
if (!surface_factory_ozone_)
surface_factory_ozone_.reset(
@@ -354,7 +354,7 @@
gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
}
- virtual void InitializeGPU() OVERRIDE {
+ virtual void InitializeGPU() override {
if (!surface_factory_ozone_)
surface_factory_ozone_.reset(
new SurfaceFactoryEgltest(&eglplatform_shim_));
diff --git a/ui/ozone/platform/test/ozone_platform_test.cc b/ui/ozone/platform/test/ozone_platform_test.cc
index 1057291..d657129 100644
--- a/ui/ozone/platform/test/ozone_platform_test.cc
+++ b/ui/ozone/platform/test/ozone_platform_test.cc
@@ -30,30 +30,30 @@
virtual ~OzonePlatformTest() {}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return window_manager_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
return gpu_platform_support_.get();
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
return make_scoped_ptr<PlatformWindow>(
new TestWindow(delegate, window_manager_.get(), bounds));
}
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
}
- virtual void InitializeUI() OVERRIDE {
+ virtual void InitializeUI() override {
window_manager_.reset(new TestWindowManager(file_path_));
window_manager_->Initialize();
// This unbreaks tests that create their own.
@@ -64,7 +64,7 @@
gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
}
- virtual void InitializeGPU() OVERRIDE {
+ virtual void InitializeGPU() override {
gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
}
diff --git a/ui/ozone/platform/test/test_window.h b/ui/ozone/platform/test/test_window.h
index 13a23a6..37e4ec4 100644
--- a/ui/ozone/platform/test/test_window.h
+++ b/ui/ozone/platform/test/test_window.h
@@ -26,19 +26,19 @@
base::FilePath path();
// PlatformWindow:
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
private:
PlatformWindowDelegate* delegate_;
diff --git a/ui/ozone/platform/test/test_window_manager.cc b/ui/ozone/platform/test/test_window_manager.cc
index 6eb1aef..7ffbad8 100644
--- a/ui/ozone/platform/test/test_window_manager.cc
+++ b/ui/ozone/platform/test/test_window_manager.cc
@@ -35,14 +35,14 @@
virtual ~FileSurface() {}
// SurfaceOzoneCanvas overrides:
- virtual void ResizeCanvas(const gfx::Size& viewport_size) OVERRIDE {
+ virtual void ResizeCanvas(const gfx::Size& viewport_size) override {
surface_ = skia::AdoptRef(SkSurface::NewRaster(SkImageInfo::MakeN32Premul(
viewport_size.width(), viewport_size.height())));
}
- virtual skia::RefPtr<SkCanvas> GetCanvas() OVERRIDE {
+ virtual skia::RefPtr<SkCanvas> GetCanvas() override {
return skia::SharePtr(surface_->getCanvas());
}
- virtual void PresentCanvas(const gfx::Rect& damage) OVERRIDE {
+ virtual void PresentCanvas(const gfx::Rect& damage) override {
if (location_.empty())
return;
SkBitmap bitmap;
@@ -55,7 +55,7 @@
FROM_HERE, base::Bind(&WriteDataToFile, location_, bitmap), true);
}
}
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE {
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override {
return scoped_ptr<gfx::VSyncProvider>();
}
diff --git a/ui/ozone/platform/test/test_window_manager.h b/ui/ozone/platform/test/test_window_manager.h
index 8efbb69..0241e8b 100644
--- a/ui/ozone/platform/test/test_window_manager.h
+++ b/ui/ozone/platform/test/test_window_manager.h
@@ -33,10 +33,10 @@
// SurfaceFactoryOzone:
virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
- gfx::AcceleratedWidget w) OVERRIDE;
+ gfx::AcceleratedWidget w) override;
virtual bool LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
- SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
private:
base::FilePath location_;
diff --git a/ui/ozone/public/gpu_platform_support.cc b/ui/ozone/public/gpu_platform_support.cc
index 2ac2004..f9f1589 100644
--- a/ui/ozone/public/gpu_platform_support.cc
+++ b/ui/ozone/public/gpu_platform_support.cc
@@ -15,8 +15,8 @@
class StubGpuPlatformSupport : public GpuPlatformSupport {
public:
// GpuPlatformSupport:
- virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE {}
- virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE { return false; }
+ virtual void OnChannelEstablished(IPC::Sender* sender) override {}
+ virtual bool OnMessageReceived(const IPC::Message&) override { return false; }
};
} // namespace
diff --git a/ui/ozone/public/gpu_platform_support_host.cc b/ui/ozone/public/gpu_platform_support_host.cc
index 1a75efd..a611f50 100644
--- a/ui/ozone/public/gpu_platform_support_host.cc
+++ b/ui/ozone/public/gpu_platform_support_host.cc
@@ -16,10 +16,10 @@
class StubGpuPlatformSupportHost : public GpuPlatformSupportHost {
public:
// GpuPlatformSupportHost:
- virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE {
+ virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) override {
}
- virtual void OnChannelDestroyed(int host_id) OVERRIDE {}
- virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE { return false; }
+ virtual void OnChannelDestroyed(int host_id) override {}
+ virtual bool OnMessageReceived(const IPC::Message&) override { return false; }
};
} // namespace
diff --git a/ui/ozone/public/ui_thread_gpu.cc b/ui/ozone/public/ui_thread_gpu.cc
index 68b260e..9601759 100644
--- a/ui/ozone/public/ui_thread_gpu.cc
+++ b/ui/ozone/public/ui_thread_gpu.cc
@@ -20,7 +20,7 @@
virtual ~UiThreadGpuForwardingSender() {}
// IPC::Sender:
- virtual bool Send(IPC::Message* msg) OVERRIDE {
+ virtual bool Send(IPC::Message* msg) override {
listener_->OnMessageReceived(*msg);
delete msg;
return true;
diff --git a/ui/ozone/run_all_unittests.cc b/ui/ozone/run_all_unittests.cc
index 3227099..6192740 100644
--- a/ui/ozone/run_all_unittests.cc
+++ b/ui/ozone/run_all_unittests.cc
@@ -15,8 +15,8 @@
protected:
// base::TestSuite:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
+ virtual void Initialize() override;
+ virtual void Shutdown() override;
private:
DISALLOW_COPY_AND_ASSIGN(OzoneTestSuite);
diff --git a/ui/platform_window/win/win_window.h b/ui/platform_window/win/win_window.h
index 18fada5..65ffb5a 100644
--- a/ui/platform_window/win/win_window.h
+++ b/ui/platform_window/win/win_window.h
@@ -22,19 +22,19 @@
void Destroy();
// PlatformWindow:
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
CR_BEGIN_MSG_MAP_EX(WinWindow)
CR_MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc
index 07baea6..e3a421c 100644
--- a/ui/platform_window/x11/x11_window.cc
+++ b/ui/platform_window/x11/x11_window.cc
@@ -56,6 +56,7 @@
}
void X11Window::Destroy() {
+ delegate_->OnClosed();
if (xwindow_ == None)
return;
diff --git a/ui/platform_window/x11/x11_window.h b/ui/platform_window/x11/x11_window.h
index 29fd63c..6e1184c 100644
--- a/ui/platform_window/x11/x11_window.h
+++ b/ui/platform_window/x11/x11_window.h
@@ -29,23 +29,23 @@
void ProcessXInput2Event(XEvent* xevent);
// PlatformWindow:
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void ToggleFullscreen() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetCursor(PlatformCursor cursor) OVERRIDE;
- virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual void Close() override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Rect GetBounds() override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void ToggleFullscreen() override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual void SetCursor(PlatformCursor cursor) override;
+ virtual void MoveCursorTo(const gfx::Point& location) override;
// PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const PlatformEvent& event) override;
PlatformWindowDelegate* delegate_;
diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/select_file_dialog_android.h
index a9d0d54..90abdbb 100644
--- a/ui/shell_dialogs/select_file_dialog_android.h
+++ b/ui/shell_dialogs/select_file_dialog_android.h
@@ -31,8 +31,8 @@
void OnFileNotSelected(JNIEnv* env, jobject java_object);
// From SelectFileDialog
- virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE;
- virtual void ListenerDestroyed() OVERRIDE;
+ virtual bool IsRunning(gfx::NativeWindow) const override;
+ virtual void ListenerDestroyed() override;
// Called when it is time to display the file picker.
// params is expected to be a vector<string16> with accept_types first and
@@ -45,7 +45,7 @@
int file_type_index,
const std::string& default_extension,
gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ void* params) override;
static bool RegisterSelectFileDialog(JNIEnv* env);
@@ -55,7 +55,7 @@
private:
SelectFileDialogImpl(Listener* listener, SelectFilePolicy* policy);
- virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
+ virtual bool HasMultipleFileTypeChoicesImpl() override;
base::android::ScopedJavaGlobalRef<jobject> java_object_;
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index 3844b06..a0d75e5 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -64,8 +64,8 @@
ui::SelectFilePolicy* policy);
// BaseShellDialog implementation.
- virtual bool IsRunning(gfx::NativeWindow parent_window) const OVERRIDE;
- virtual void ListenerDestroyed() OVERRIDE;
+ virtual bool IsRunning(gfx::NativeWindow parent_window) const override;
+ virtual void ListenerDestroyed() override;
// Callback from ObjC bridge.
void FileWasSelected(NSSavePanel* dialog,
@@ -75,8 +75,6 @@
const std::vector<base::FilePath>& files,
int index);
- bool ShouldEnableFilename(NSSavePanel* dialog, NSString* filename);
-
protected:
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
@@ -88,7 +86,7 @@
int file_type_index,
const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ void* params) override;
private:
virtual ~SelectFileDialogImpl();
@@ -97,7 +95,7 @@
NSView* GetAccessoryView(const FileTypeInfo* file_types,
int file_type_index);
- virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
+ virtual bool HasMultipleFileTypeChoicesImpl() override;
// The bridge for results from Cocoa to return to us.
base::scoped_nsobject<SelectFileDialogBridge> bridge_;
@@ -159,16 +157,6 @@
}
}
-bool SelectFileDialogImpl::ShouldEnableFilename(NSSavePanel* dialog,
- NSString* filename) {
- // If this is a single/multiple open file dialog, disable selecting packages.
- if (type_map_[dialog] != SELECT_OPEN_FILE &&
- type_map_[dialog] != SELECT_OPEN_MULTI_FILE)
- return true;
-
- return ![[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename];
-}
-
void SelectFileDialogImpl::SelectFileImpl(
Type type,
const base::string16& title,
@@ -427,9 +415,7 @@
}
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url {
- if (![url isFileURL])
- return NO;
- return selectFileDialogImpl_->ShouldEnableFilename(sender, [url path]);
+ return [url isFileURL];
}
@end
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
index 94949e5..6e1a8ab 100644
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -168,8 +168,8 @@
const base::Callback<bool(OPENFILENAME*)>& get_save_file_name_impl);
// BaseShellDialog implementation:
- virtual bool IsRunning(gfx::NativeWindow owning_window) const OVERRIDE;
- virtual void ListenerDestroyed() OVERRIDE;
+ virtual bool IsRunning(gfx::NativeWindow owning_window) const override;
+ virtual void ListenerDestroyed() override;
protected:
// SelectFileDialog implementation:
@@ -181,7 +181,7 @@
int file_type_index,
const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ void* params) override;
private:
virtual ~SelectFileDialogImpl();
@@ -289,7 +289,7 @@
LPARAM parameter,
LPARAM data);
- virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
+ virtual bool HasMultipleFileTypeChoicesImpl() override;
// Returns the filter to be used while displaying the open/save file dialog.
// This is computed from the extensions for the file types being opened.
diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc
index 5fe05a8..b5a2a66 100644
--- a/ui/snapshot/snapshot_aura_unittest.cc
+++ b/ui/snapshot/snapshot_aura_unittest.cc
@@ -43,7 +43,7 @@
virtual ~TestPaintingWindowDelegate() {
}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
for (int y = 0; y < window_size_.height(); ++y) {
for (int x = 0; x < window_size_.width(); ++x)
canvas->FillRect(gfx::Rect(x, y, 1, 1), GetExpectedColorForPoint(x, y));
@@ -84,7 +84,7 @@
SnapshotAuraTest() {}
virtual ~SnapshotAuraTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
testing::Test::SetUp();
// The ContextFactory must exist before any Compositors are created.
@@ -99,7 +99,7 @@
new ::wm::DefaultActivationClient(helper_->root_window());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
test_window_.reset();
delegate_.reset();
helper_->RunAllPendingInMessageLoop();
diff --git a/ui/v2/src/view.cc b/ui/v2/src/view.cc
index 4185465..d973630 100644
--- a/ui/v2/src/view.cc
+++ b/ui/v2/src/view.cc
@@ -125,13 +125,13 @@
private:
// Overridden from ui::LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override {
// TODO(beng): paint processor.
}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {
// TODO(beng): ???
}
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
+ virtual base::Closure PrepareForLayerBoundsChange() override {
return base::Bind(&ViewLayerOwner::OnLayerBoundsChanged,
base::Unretained(this));
}
diff --git a/ui/v2/src/view_unittest.cc b/ui/v2/src/view_unittest.cc
index c0253ed..b2971fa 100644
--- a/ui/v2/src/view_unittest.cc
+++ b/ui/v2/src/view_unittest.cc
@@ -138,7 +138,7 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewTreeChange(const TreeChangeParams& params) OVERRIDE {
+ virtual void OnViewTreeChange(const TreeChangeParams& params) override {
received_params_.push_back(params);
}
@@ -394,7 +394,7 @@
// Overridden from ViewObserver:
virtual void OnViewVisibilityChange(
View* view,
- ViewObserver::DispositionChangePhase phase) OVERRIDE {
+ ViewObserver::DispositionChangePhase phase) override {
DCHECK_EQ(view_, view);
log_entries_.push_back(std::make_pair(phase, view->visible()));
}
@@ -436,7 +436,7 @@
private:
virtual void OnViewBoundsChanged(View* view,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
DCHECK_EQ(view_, view);
bounds_changes_.push_back(std::make_pair(old_bounds, new_bounds));
}
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 93abc4d..1b1b6bf 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -104,8 +104,6 @@
}
}
-if (false) {
-
static_library("test_support") {
testonly = true
sources = gypi_values.views_test_support_sources
@@ -115,6 +113,7 @@
]
deps = [
"//base",
+ "//ipc:test_support",
"//skia",
"//testing/gtest",
"//ui/aura",
@@ -263,5 +262,3 @@
]
}
}
-
-} # if (false)
diff --git a/ui/views/accessibility/ax_view_obj_wrapper.h b/ui/views/accessibility/ax_view_obj_wrapper.h
index 6838d07..7a768b7 100644
--- a/ui/views/accessibility/ax_view_obj_wrapper.h
+++ b/ui/views/accessibility/ax_view_obj_wrapper.h
@@ -17,15 +17,15 @@
virtual ~AXViewObjWrapper();
// AXAuraObjWrapper overrides.
- virtual AXAuraObjWrapper* GetParent() OVERRIDE;
+ virtual AXAuraObjWrapper* GetParent() override;
virtual void GetChildren(
- std::vector<AXAuraObjWrapper*>* out_children) OVERRIDE;
- virtual void Serialize(ui::AXNodeData* out_node_data) OVERRIDE;
- virtual int32 GetID() OVERRIDE;
- virtual void DoDefault() OVERRIDE;
- virtual void Focus() OVERRIDE;
- virtual void MakeVisible() OVERRIDE;
- virtual void SetSelection(int32 start, int32 end) OVERRIDE;
+ std::vector<AXAuraObjWrapper*>* out_children) override;
+ virtual void Serialize(ui::AXNodeData* out_node_data) override;
+ virtual int32 GetID() override;
+ virtual void DoDefault() override;
+ virtual void Focus() override;
+ virtual void MakeVisible() override;
+ virtual void SetSelection(int32 start, int32 end) override;
private:
View* view_;
diff --git a/ui/views/accessibility/ax_widget_obj_wrapper.h b/ui/views/accessibility/ax_widget_obj_wrapper.h
index 61ff1e9..52c03ca 100644
--- a/ui/views/accessibility/ax_widget_obj_wrapper.h
+++ b/ui/views/accessibility/ax_widget_obj_wrapper.h
@@ -21,17 +21,17 @@
virtual ~AXWidgetObjWrapper();
// AXAuraObjWrapper overrides.
- virtual AXAuraObjWrapper* GetParent() OVERRIDE;
+ virtual AXAuraObjWrapper* GetParent() override;
virtual void GetChildren(
- std::vector<AXAuraObjWrapper*>* out_children) OVERRIDE;
- virtual void Serialize(ui::AXNodeData* out_node_data) OVERRIDE;
- virtual int32 GetID() OVERRIDE;
+ std::vector<AXAuraObjWrapper*>* out_children) override;
+ virtual void Serialize(ui::AXNodeData* out_node_data) override;
+ virtual int32 GetID() override;
// WidgetObserver overrides.
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
// WidgetRemovalsObserver overrides.
- virtual void OnWillRemoveView(Widget* widget, View* view) OVERRIDE;
+ virtual void OnWillRemoveView(Widget* widget, View* view) override;
private:
Widget* widget_;
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.h b/ui/views/accessibility/ax_window_obj_wrapper.h
index b3cd235..14bf2a8 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.h
+++ b/ui/views/accessibility/ax_window_obj_wrapper.h
@@ -22,14 +22,14 @@
virtual ~AXWindowObjWrapper();
// AXAuraObjWrapper overrides.
- virtual AXAuraObjWrapper* GetParent() OVERRIDE;
+ virtual AXAuraObjWrapper* GetParent() override;
virtual void GetChildren(
- std::vector<AXAuraObjWrapper*>* out_children) OVERRIDE;
- virtual void Serialize(ui::AXNodeData* out_node_data) OVERRIDE;
- virtual int32 GetID() OVERRIDE;
+ std::vector<AXAuraObjWrapper*>* out_children) override;
+ virtual void Serialize(ui::AXNodeData* out_node_data) override;
+ virtual int32 GetID() override;
// WindowObserver overrides.
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) override;
private:
aura::Window* window_;
diff --git a/ui/views/accessibility/native_view_accessibility.h b/ui/views/accessibility/native_view_accessibility.h
index 3f36f57..a85dc0c 100644
--- a/ui/views/accessibility/native_view_accessibility.h
+++ b/ui/views/accessibility/native_view_accessibility.h
@@ -32,12 +32,12 @@
static void UnregisterWebView(View* web_view);
// ui::AXPlatformNodeDelegate
- virtual ui::AXNodeData* GetData() OVERRIDE;
- virtual int GetChildCount() OVERRIDE;
- virtual gfx::NativeViewAccessible ChildAtIndex(int index) OVERRIDE;
- virtual gfx::NativeViewAccessible GetParent() OVERRIDE;
- virtual gfx::Vector2d GetGlobalCoordinateOffset() OVERRIDE;
- virtual void NotifyAccessibilityEvent(ui::AXEvent event_type) OVERRIDE;
+ virtual ui::AXNodeData* GetData() override;
+ virtual int GetChildCount() override;
+ virtual gfx::NativeViewAccessible ChildAtIndex(int index) override;
+ virtual gfx::NativeViewAccessible GetParent() override;
+ virtual gfx::Vector2d GetGlobalCoordinateOffset() override;
+ virtual void NotifyAccessibilityEvent(ui::AXEvent event_type) override;
protected:
NativeViewAccessibility();
diff --git a/ui/views/accessibility/native_view_accessibility_unittest.cc b/ui/views/accessibility/native_view_accessibility_unittest.cc
index cf5f5de..c376bbf 100644
--- a/ui/views/accessibility/native_view_accessibility_unittest.cc
+++ b/ui/views/accessibility/native_view_accessibility_unittest.cc
@@ -28,7 +28,7 @@
NativeViewAccessibilityTest() {}
virtual ~NativeViewAccessibilityTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
button_.reset(new TestButton());
button_->SetSize(gfx::Size(20, 20));
@@ -39,7 +39,7 @@
label_accessibility_ = NativeViewAccessibility::Create(label_.get());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
button_accessibility_->Destroy();
button_accessibility_ = NULL;
label_accessibility_->Destroy();
diff --git a/ui/views/accessibility/native_view_accessibility_win.h b/ui/views/accessibility/native_view_accessibility_win.h
index b9a77f5..2f629ca 100644
--- a/ui/views/accessibility/native_view_accessibility_win.h
+++ b/ui/views/accessibility/native_view_accessibility_win.h
@@ -62,9 +62,9 @@
// NativeViewAccessibility.
virtual void NotifyAccessibilityEvent(
- ui::AXEvent event_type) OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeObject() OVERRIDE;
- virtual void Destroy() OVERRIDE;
+ ui::AXEvent event_type) override;
+ virtual gfx::NativeViewAccessible GetNativeObject() override;
+ virtual void Destroy() override;
// Supported IAccessible methods.
diff --git a/ui/views/accessible_pane_view.cc b/ui/views/accessible_pane_view.cc
index 84fccdc..c89dc46 100644
--- a/ui/views/accessible_pane_view.cc
+++ b/ui/views/accessible_pane_view.cc
@@ -24,14 +24,14 @@
accessible_pane_view_(pane_view) {}
protected:
- virtual View* GetParent(View* v) OVERRIDE {
+ virtual View* GetParent(View* v) override {
return accessible_pane_view_->ContainsForFocusSearch(root(), v) ?
accessible_pane_view_->GetParentForFocusSearch(v) : NULL;
}
// Returns true if |v| is contained within the hierarchy rooted at |root|.
// Subclasses can override this if they need custom focus search behavior.
- virtual bool Contains(View* root, const View* v) OVERRIDE {
+ virtual bool Contains(View* root, const View* v) override {
return accessible_pane_view_->ContainsForFocusSearch(root, v);
}
diff --git a/ui/views/accessible_pane_view.h b/ui/views/accessible_pane_view.h
index 11ea448..345e928 100644
--- a/ui/views/accessible_pane_view.h
+++ b/ui/views/accessible_pane_view.h
@@ -40,23 +40,23 @@
virtual bool SetPaneFocusAndFocusDefault();
// Overridden from View:
- virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE;
+ virtual FocusTraversable* GetPaneFocusTraversable() override;
virtual bool AcceleratorPressed(const ui::Accelerator& accelerator)
- OVERRIDE;
- virtual void SetVisible(bool flag) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void RequestFocus() OVERRIDE;
+ override;
+ virtual void SetVisible(bool flag) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void RequestFocus() override;
// Overridden from FocusChangeListener:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
// Overridden from FocusTraversable:
- virtual FocusSearch* GetFocusSearch() OVERRIDE;
- virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
- virtual View* GetFocusTraversableParentView() OVERRIDE;
+ virtual FocusSearch* GetFocusSearch() override;
+ virtual FocusTraversable* GetFocusTraversableParent() override;
+ virtual View* GetFocusTraversableParentView() override;
// For testing only.
const ui::Accelerator& home_key() const { return home_key_; }
diff --git a/ui/views/accessible_pane_view_unittest.cc b/ui/views/accessible_pane_view_unittest.cc
index 4468f2f..126fc91 100644
--- a/ui/views/accessible_pane_view_unittest.cc
+++ b/ui/views/accessible_pane_view_unittest.cc
@@ -24,7 +24,7 @@
virtual ~TestBarView();
virtual void ButtonPressed(Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
LabelButton* child_button() const { return child_button_.get(); }
LabelButton* second_child_button() const {
return second_child_button_.get();
@@ -32,7 +32,7 @@
LabelButton* third_child_button() const { return third_child_button_.get(); }
LabelButton* not_child_button() const { return not_child_button_.get(); }
- virtual View* GetDefaultFocusableChild() OVERRIDE;
+ virtual View* GetDefaultFocusableChild() override;
private:
void Init();
diff --git a/ui/views/animation/bounds_animator.h b/ui/views/animation/bounds_animator.h
index 1a88cdf..0abc37a 100644
--- a/ui/views/animation/bounds_animator.h
+++ b/ui/views/animation/bounds_animator.h
@@ -144,15 +144,15 @@
AnimationEndType type);
// gfx::AnimationDelegate overrides.
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationCanceled(const gfx::Animation* animation) override;
// gfx::AnimationContainerObserver overrides.
virtual void AnimationContainerProgressed(
- gfx::AnimationContainer* container) OVERRIDE;
+ gfx::AnimationContainer* container) override;
virtual void AnimationContainerEmpty(
- gfx::AnimationContainer* container) OVERRIDE;
+ gfx::AnimationContainer* container) override;
// Parent of all views being animated.
View* parent_;
diff --git a/ui/views/animation/bounds_animator_unittest.cc b/ui/views/animation/bounds_animator_unittest.cc
index 6294d8a..b8f62a2 100644
--- a/ui/views/animation/bounds_animator_unittest.cc
+++ b/ui/views/animation/bounds_animator_unittest.cc
@@ -22,7 +22,7 @@
}
protected:
- virtual SlideAnimation* CreateAnimation() OVERRIDE {
+ virtual SlideAnimation* CreateAnimation() override {
SlideAnimation* animation = BoundsAnimator::CreateAnimation();
animation->SetSlideDuration(10);
return animation;
@@ -53,7 +53,7 @@
}
// Overridden from gfx::AnimationDelegate:
- virtual void AnimationCanceled(const Animation* animation) OVERRIDE {
+ virtual void AnimationCanceled(const Animation* animation) override {
canceled_ = true;
}
@@ -72,7 +72,7 @@
public:
TestView() {}
- virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE {
+ virtual void SchedulePaintInRect(const gfx::Rect& r) override {
if (dirty_rect_.IsEmpty())
dirty_rect_ = r;
else
diff --git a/ui/views/animation/scroll_animator.h b/ui/views/animation/scroll_animator.h
index 525a998..b941cdb 100644
--- a/ui/views/animation/scroll_animator.h
+++ b/ui/views/animation/scroll_animator.h
@@ -41,9 +41,9 @@
private:
// Implementation of gfx::AnimationDelegate.
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
+ virtual void AnimationCanceled(const gfx::Animation* animation) override;
ScrollDelegate* delegate_;
diff --git a/ui/views/background.cc b/ui/views/background.cc
index bb2ddd0..d2d64bb 100644
--- a/ui/views/background.cc
+++ b/ui/views/background.cc
@@ -22,7 +22,7 @@
SetNativeControlColor(color);
}
- virtual void Paint(gfx::Canvas* canvas, View* view) const OVERRIDE {
+ virtual void Paint(gfx::Canvas* canvas, View* view) const override {
// Fill the background. Note that we don't constrain to the bounds as
// canvas is already clipped for us.
canvas->DrawColor(get_color());
@@ -45,7 +45,7 @@
}
- virtual void Paint(gfx::Canvas* canvas, View* view) const OVERRIDE {
+ virtual void Paint(gfx::Canvas* canvas, View* view) const override {
Painter::PaintPainterAt(canvas, painter_, view->GetLocalBounds());
}
diff --git a/ui/views/border.cc b/ui/views/border.cc
index 0ff3406..dac2daa 100644
--- a/ui/views/border.cc
+++ b/ui/views/border.cc
@@ -20,9 +20,9 @@
SidedSolidBorder(int top, int left, int bottom, int right, SkColor color);
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetMinimumSize() const override;
private:
const SkColor color_;
@@ -78,13 +78,13 @@
: insets_(top, left, bottom, right) {}
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE {}
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override {}
- virtual gfx::Insets GetInsets() const OVERRIDE {
+ virtual gfx::Insets GetInsets() const override {
return insets_;
}
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
+ virtual gfx::Size GetMinimumSize() const override {
return gfx::Size();
}
@@ -105,15 +105,15 @@
virtual ~BorderPainter() {}
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE {
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override {
Painter::PaintPainterAt(canvas, painter_.get(), view.GetLocalBounds());
}
- virtual gfx::Insets GetInsets() const OVERRIDE {
+ virtual gfx::Insets GetInsets() const override {
return insets_;
}
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
+ virtual gfx::Size GetMinimumSize() const override {
return painter_->GetMinimumSize();
}
diff --git a/ui/views/bubble/bubble_border.h b/ui/views/bubble/bubble_border.h
index 8ce546a..8fc149b 100644
--- a/ui/views/bubble/bubble_border.h
+++ b/ui/views/bubble/bubble_border.h
@@ -196,9 +196,9 @@
int GetArrowOffset(const gfx::Size& border_size) const;
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetMinimumSize() const override;
private:
FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, GetSizeForContentsSizeTest);
@@ -233,7 +233,7 @@
explicit BubbleBackground(BubbleBorder* border) : border_(border) {}
// Overridden from Background:
- virtual void Paint(gfx::Canvas* canvas, View* view) const OVERRIDE;
+ virtual void Paint(gfx::Canvas* canvas, View* view) const override;
private:
BubbleBorder* border_;
diff --git a/ui/views/bubble/bubble_delegate.h b/ui/views/bubble/bubble_delegate.h
index 739ec92..5f21313 100644
--- a/ui/views/bubble/bubble_delegate.h
+++ b/ui/views/bubble/bubble_delegate.h
@@ -33,21 +33,21 @@
static Widget* CreateBubble(BubbleDelegateView* bubble_delegate);
// WidgetDelegateView overrides:
- virtual BubbleDelegateView* AsBubbleDelegate() OVERRIDE;
- virtual bool ShouldShowCloseButton() const OVERRIDE;
- virtual View* GetContentsView() OVERRIDE;
- virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual BubbleDelegateView* AsBubbleDelegate() override;
+ virtual bool ShouldShowCloseButton() const override;
+ virtual View* GetContentsView() override;
+ virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// WidgetObserver overrides:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
virtual void OnWidgetVisibilityChanging(Widget* widget, bool visible)
- OVERRIDE;
+ override;
virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible)
- OVERRIDE;
- virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE;
+ override;
+ virtual void OnWidgetActivationChanged(Widget* widget, bool active) override;
virtual void OnWidgetBoundsChanged(Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
bool close_on_esc() const { return close_on_esc_; }
void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; }
@@ -119,8 +119,8 @@
virtual const gfx::FontList& GetTitleFontList() const;
// View overrides:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// Perform view initialization on the contents for bubble sizing.
virtual void Init();
diff --git a/ui/views/bubble/bubble_delegate_unittest.cc b/ui/views/bubble/bubble_delegate_unittest.cc
index a0cd57b..c3ba170 100644
--- a/ui/views/bubble/bubble_delegate_unittest.cc
+++ b/ui/views/bubble/bubble_delegate_unittest.cc
@@ -33,8 +33,8 @@
}
// BubbleDelegateView overrides:
- virtual View* GetInitiallyFocusedView() OVERRIDE { return view_; }
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual View* GetInitiallyFocusedView() override { return view_; }
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(200, 200);
}
diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h
index f14ca1e..1d3add7 100644
--- a/ui/views/bubble/bubble_frame_view.h
+++ b/ui/views/bubble/bubble_frame_view.h
@@ -40,33 +40,33 @@
static LabelButton* CreateCloseButton(ButtonListener* listener);
// NonClientFrameView overrides:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
+ virtual gfx::Rect GetBoundsForClientView() const override;
virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
+ const gfx::Rect& client_bounds) const override;
+ virtual int NonClientHitTest(const gfx::Point& point) override;
virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
- virtual void SizeConstraintsChanged() OVERRIDE;
+ gfx::Path* window_mask) override;
+ virtual void ResetWindowControls() override;
+ virtual void UpdateWindowIcon() override;
+ virtual void UpdateWindowTitle() override;
+ virtual void SizeConstraintsChanged() override;
// Set the FontList to be used for the title of the bubble.
// Caller must arrange to update the layout to have the call take effect.
void SetTitleFontList(const gfx::FontList& font_list);
// View overrides:
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
- virtual void OnThemeChanged() OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
+ virtual void ChildPreferredSizeChanged(View* child) override;
+ virtual void OnThemeChanged() override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
// Use bubble_border() and SetBubbleBorder(), not border() and SetBorder().
BubbleBorder* bubble_border() const { return bubble_border_; }
diff --git a/ui/views/bubble/bubble_frame_view_unittest.cc b/ui/views/bubble/bubble_frame_view_unittest.cc
index 1bd9e34..545ca38 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -29,7 +29,7 @@
virtual ~TestBubbleFrameView() {}
// BubbleFrameView overrides:
- virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) OVERRIDE {
+ virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) override {
return available_bounds_;
}
diff --git a/ui/views/bubble/bubble_window_targeter.h b/ui/views/bubble/bubble_window_targeter.h
index 45b1d5c..b37eaa0 100644
--- a/ui/views/bubble/bubble_window_targeter.h
+++ b/ui/views/bubble/bubble_window_targeter.h
@@ -23,7 +23,7 @@
private:
// wm::MaskedWindowTargeter:
virtual bool GetHitTestMask(aura::Window* window,
- gfx::Path* mask) const OVERRIDE;
+ gfx::Path* mask) const override;
views::BubbleDelegateView* bubble_;
diff --git a/ui/views/bubble/bubble_window_targeter_unittest.cc b/ui/views/bubble/bubble_window_targeter_unittest.cc
index 479f6e9..4ff0e0a 100644
--- a/ui/views/bubble/bubble_window_targeter_unittest.cc
+++ b/ui/views/bubble/bubble_window_targeter_unittest.cc
@@ -26,7 +26,7 @@
private:
// BubbleDelegateView:
virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params,
- Widget* widget) const OVERRIDE {
+ Widget* widget) const override {
params->ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
}
@@ -42,7 +42,7 @@
}
virtual ~BubbleWindowTargeterTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
CreateAnchorWidget();
CreateBubbleWidget();
@@ -51,7 +51,7 @@
bubble_widget()->Show();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
bubble_delegate_ = NULL;
bubble_widget_.reset();
anchor_.reset();
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index d1cf48e..53cb526 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -56,7 +56,7 @@
virtual ~MouseMoveDetectorHost();
virtual bool Contains(const gfx::Point& screen_point,
- MouseEventType type) OVERRIDE;
+ MouseEventType type) override;
private:
DISALLOW_COPY_AND_ASSIGN(MouseMoveDetectorHost);
};
@@ -94,7 +94,7 @@
// Overridden from BubbleBorder.
// Sets the bubble on top of the anchor when it has no arrow.
virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
- const gfx::Size& contents_size) const OVERRIDE {
+ const gfx::Size& contents_size) const override {
if (has_arrow(arrow())) {
gfx::Rect rect =
BubbleBorder::GetBounds(position_relative_to, contents_size);
@@ -182,11 +182,11 @@
ui::Layer* layer() { return &layer_; }
// Overridden from LayerDelegate.
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override;
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE;
+ const gfx::Rect& damage_rect_in_dip) override {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual base::Closure PrepareForLayerBoundsChange() override;
private:
ui::Layer layer_;
@@ -234,7 +234,7 @@
virtual ~BottomAlignedBoxLayout() {}
private:
- virtual void Layout(View* host) OVERRIDE {
+ virtual void Layout(View* host) override {
if (host->height() >= host->GetPreferredSize().height() ||
!bubble_view_->is_gesture_dragging()) {
BoxLayout::Layout(host);
diff --git a/ui/views/bubble/tray_bubble_view.h b/ui/views/bubble/tray_bubble_view.h
index 54f6cc8..8ffd58d 100644
--- a/ui/views/bubble/tray_bubble_view.h
+++ b/ui/views/bubble/tray_bubble_view.h
@@ -147,25 +147,25 @@
bool is_gesture_dragging() const { return is_gesture_dragging_; }
// Overridden from views::WidgetDelegate.
- virtual bool CanActivate() const OVERRIDE;
+ virtual bool CanActivate() const override;
virtual views::NonClientFrameView* CreateNonClientFrameView(
- views::Widget* widget) OVERRIDE;
- virtual bool WidgetHasHitTestMask() const OVERRIDE;
- virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ views::Widget* widget) override;
+ virtual bool WidgetHasHitTestMask() const override;
+ virtual void GetWidgetHitTestMask(gfx::Path* mask) const override;
// Overridden from views::BubbleDelegateView.
- virtual gfx::Rect GetAnchorRect() const OVERRIDE;
+ virtual gfx::Rect GetAnchorRect() const override;
// Overridden from views::View.
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// Overridden from MouseWatcherListener
- virtual void MouseMovedOutOfHost() OVERRIDE;
+ virtual void MouseMovedOutOfHost() override;
protected:
TrayBubbleView(gfx::NativeView parent_window,
@@ -174,12 +174,12 @@
const InitParams& init_params);
// Overridden from views::BubbleDelegateView.
- virtual void Init() OVERRIDE;
+ virtual void Init() override;
// Overridden from views::View.
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
private:
InitParams params_;
diff --git a/ui/views/cocoa/OWNERS b/ui/views/cocoa/OWNERS
new file mode 100644
index 0000000..13c6f49
--- /dev/null
+++ b/ui/views/cocoa/OWNERS
@@ -0,0 +1 @@
+tapted@chromium.org
diff --git a/ui/views/cocoa/bridged_native_widget.h b/ui/views/cocoa/bridged_native_widget.h
index 64cf81d..05eeabf 100644
--- a/ui/views/cocoa/bridged_native_widget.h
+++ b/ui/views/cocoa/bridged_native_widget.h
@@ -52,16 +52,35 @@
// Called internally by the NSWindowDelegate when the window is closing.
void OnWindowWillClose();
+ // Called by the NSWindowDelegate when a fullscreen operation begins. If
+ // |target_fullscreen_state| is true, the target state is fullscreen.
+ // Otherwise, a transition has begun to come out of fullscreen.
+ void OnFullscreenTransitionStart(bool target_fullscreen_state);
+
+ // Called when a fullscreen transition completes. If target_fullscreen_state()
+ // does not match |actual_fullscreen_state|, a new transition will begin.
+ void OnFullscreenTransitionComplete(bool actual_fullscreen_state);
+
+ // Transition the window into or out of fullscreen. This will immediately
+ // invert the value of target_fullscreen_state().
+ void ToggleDesiredFullscreenState();
+
// See widget.h for documentation.
InputMethod* CreateInputMethod();
ui::InputMethod* GetHostInputMethod();
+ // The restored bounds will be derived from the current NSWindow frame unless
+ // fullscreen or transitioning between fullscreen states.
+ gfx::Rect GetRestoredBounds() const;
+
NativeWidgetMac* native_widget_mac() { return native_widget_mac_; }
BridgedContentView* ns_view() { return bridged_view_; }
NSWindow* ns_window() { return window_; }
+ bool target_fullscreen_state() const { return target_fullscreen_state_; }
+
// Overridden from internal::InputMethodDelegate:
- virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE;
+ virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override;
private:
// Closes all child windows. BridgedNativeWidget children will be destroyed.
@@ -74,11 +93,24 @@
scoped_ptr<ui::InputMethod> input_method_;
FocusManager* focus_manager_; // Weak. Owned by our Widget.
+ // Tracks the bounds when the window last started entering fullscreen. Used to
+ // provide an answer for GetRestoredBounds(), but not ever sent to Cocoa (it
+ // has its own copy, but doesn't provide access to it).
+ gfx::Rect bounds_before_fullscreen_;
+
+ // Whether this window wants to be fullscreen. If a fullscreen animation is in
+ // progress then it might not be actually fullscreen.
+ bool target_fullscreen_state_;
+
+ // Whether this window is in a fullscreen transition, and the fullscreen state
+ // can not currently be changed.
+ bool in_fullscreen_transition_;
+
// Overridden from FocusChangeListener:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
};
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index 2a959da..560f533 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -5,9 +5,12 @@
#import "ui/views/cocoa/bridged_native_widget.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
+#import "base/mac/sdk_forward_declarations.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/input_method_factory.h"
#include "ui/base/ui_base_switches_util.h"
+#import "ui/gfx/mac/coordinate_conversion.h"
#import "ui/views/cocoa/bridged_content_view.h"
#import "ui/views/cocoa/views_nswindow_delegate.h"
#include "ui/views/widget/native_widget_mac.h"
@@ -19,7 +22,10 @@
namespace views {
BridgedNativeWidget::BridgedNativeWidget(NativeWidgetMac* parent)
- : native_widget_mac_(parent), focus_manager_(NULL) {
+ : native_widget_mac_(parent),
+ focus_manager_(NULL),
+ target_fullscreen_state_(false),
+ in_fullscreen_transition_(false) {
DCHECK(parent);
window_delegate_.reset(
[[ViewsNSWindowDelegate alloc] initWithBridgedNativeWidget:this]);
@@ -44,6 +50,11 @@
window_.swap(window);
[window_ setDelegate:window_delegate_];
+ // Validate the window's initial state, otherwise the bridge's initial
+ // tracking state will be incorrect.
+ DCHECK(![window_ isVisible]);
+ DCHECK_EQ(0u, [window_ styleMask] & NSFullScreenWindowMask);
+
if (params.parent) {
// Use NSWindow to manage child windows. This won't automatically close them
// but it will maintain relative positioning of the window layer and origin.
@@ -89,6 +100,61 @@
native_widget_mac_->OnWindowWillClose();
}
+void BridgedNativeWidget::OnFullscreenTransitionStart(
+ bool target_fullscreen_state) {
+ DCHECK_NE(target_fullscreen_state, target_fullscreen_state_);
+ target_fullscreen_state_ = target_fullscreen_state;
+ in_fullscreen_transition_ = true;
+
+ // If going into fullscreen, store an answer for GetRestoredBounds().
+ if (target_fullscreen_state)
+ bounds_before_fullscreen_ = gfx::ScreenRectFromNSRect([window_ frame]);
+}
+
+void BridgedNativeWidget::OnFullscreenTransitionComplete(
+ bool actual_fullscreen_state) {
+ in_fullscreen_transition_ = false;
+ if (target_fullscreen_state_ == actual_fullscreen_state)
+ return;
+
+ // First update to reflect reality so that OnTargetFullscreenStateChanged()
+ // expects the change.
+ target_fullscreen_state_ = actual_fullscreen_state;
+ ToggleDesiredFullscreenState();
+
+ // Usually ToggleDesiredFullscreenState() sets |in_fullscreen_transition_| via
+ // OnFullscreenTransitionStart(). When it does not, it means Cocoa ignored the
+ // toggleFullScreen: request. This can occur when the fullscreen transition
+ // fails and Cocoa is *about* to send windowDidFailToEnterFullScreen:.
+ // Annoyingly, for this case, Cocoa first sends windowDidExitFullScreen:.
+ if (in_fullscreen_transition_)
+ DCHECK_NE(target_fullscreen_state_, actual_fullscreen_state);
+}
+
+void BridgedNativeWidget::ToggleDesiredFullscreenState() {
+ if (base::mac::IsOSSnowLeopard()) {
+ NOTIMPLEMENTED();
+ return; // TODO(tapted): Implement this for Snow Leopard.
+ }
+
+ // If there is currently an animation into or out of fullscreen, then AppKit
+ // emits the string "not in fullscreen state" to stdio and does nothing. For
+ // this case, schedule a transition back into the desired state when the
+ // animation completes.
+ if (in_fullscreen_transition_) {
+ target_fullscreen_state_ = !target_fullscreen_state_;
+ return;
+ }
+
+ // Since fullscreen requests are ignored if the collection behavior does not
+ // allow it, save the collection behavior and restore it after.
+ NSWindowCollectionBehavior behavior = [window_ collectionBehavior];
+ [window_ setCollectionBehavior:behavior |
+ NSWindowCollectionBehaviorFullScreenPrimary];
+ [window_ toggleFullScreen:nil];
+ [window_ setCollectionBehavior:behavior];
+}
+
InputMethod* BridgedNativeWidget::CreateInputMethod() {
if (switches::IsTextInputFocusManagerEnabled())
return new NullInputMethod();
@@ -105,6 +171,13 @@
return input_method_.get();
}
+gfx::Rect BridgedNativeWidget::GetRestoredBounds() const {
+ if (target_fullscreen_state_ || in_fullscreen_transition_)
+ return bounds_before_fullscreen_;
+
+ return gfx::ScreenRectFromNSRect([window_ frame]);
+}
+
////////////////////////////////////////////////////////////////////////////////
// BridgedNativeWidget, internal::InputMethodDelegate:
diff --git a/ui/views/cocoa/bridged_native_widget_unittest.mm b/ui/views/cocoa/bridged_native_widget_unittest.mm
index 14a7f9c..bd72331 100644
--- a/ui/views/cocoa/bridged_native_widget_unittest.mm
+++ b/ui/views/cocoa/bridged_native_widget_unittest.mm
@@ -6,7 +6,11 @@
#import <Cocoa/Cocoa.h>
+#import "base/mac/foundation_util.h"
+#import "base/mac/sdk_forward_declarations.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#import "testing/gtest_mac.h"
@@ -37,6 +41,112 @@
} // namespace
+@interface NativeWidgetMacNotificationWaiter : NSObject {
+ @private
+ scoped_ptr<base::RunLoop> runLoop_;
+ base::scoped_nsobject<NSWindow> window_;
+ int enterCount_;
+ int exitCount_;
+ int targetEnterCount_;
+ int targetExitCount_;
+}
+
+@property(readonly, nonatomic) int enterCount;
+@property(readonly, nonatomic) int exitCount;
+
+// Initialize for the given window and start tracking notifications.
+- (id)initWithWindow:(NSWindow*)window;
+
+// Keep spinning a run loop until the enter and exit counts match.
+- (void)waitForEnterCount:(int)enterCount exitCount:(int)exitCount;
+
+// private:
+// Exit the RunLoop if there is one and the counts being tracked match.
+- (void)maybeQuitForChangedArg:(int*)changedArg;
+
+- (void)onEnter:(NSNotification*)notification;
+- (void)onExit:(NSNotification*)notification;
+
+@end
+
+@implementation NativeWidgetMacNotificationWaiter
+
+@synthesize enterCount = enterCount_;
+@synthesize exitCount = exitCount_;
+
+- (id)initWithWindow:(NSWindow*)window {
+ if ((self = [super init])) {
+ window_.reset([window retain]);
+ NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
+ [defaultCenter addObserver:self
+ selector:@selector(onEnter:)
+ name:NSWindowDidEnterFullScreenNotification
+ object:window];
+ [defaultCenter addObserver:self
+ selector:@selector(onExit:)
+ name:NSWindowDidExitFullScreenNotification
+ object:window];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ DCHECK(!runLoop_);
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [super dealloc];
+}
+
+- (void)waitForEnterCount:(int)enterCount exitCount:(int)exitCount {
+ if (enterCount_ >= enterCount && exitCount_ >= exitCount)
+ return;
+
+ targetEnterCount_ = enterCount;
+ targetExitCount_ = exitCount;
+ runLoop_.reset(new base::RunLoop);
+ runLoop_->Run();
+ runLoop_.reset();
+}
+
+- (void)maybeQuitForChangedArg:(int*)changedArg {
+ ++*changedArg;
+ if (!runLoop_)
+ return;
+
+ if (enterCount_ >= targetEnterCount_ && exitCount_ >= targetExitCount_)
+ runLoop_->Quit();
+}
+
+- (void)onEnter:(NSNotification*)notification {
+ [self maybeQuitForChangedArg:&enterCount_];
+}
+
+- (void)onExit:(NSNotification*)notification {
+ [self maybeQuitForChangedArg:&exitCount_];
+}
+
+@end
+
+// Class to override -[NSWindow toggleFullScreen:] to a no-op. This simulates
+// NSWindow's behavior when attempting to toggle fullscreen state again, when
+// the last attempt failed but Cocoa has not yet sent
+// windowDidFailToEnterFullScreen:.
+@interface BridgedNativeWidgetTestFullScreenWindow : NSWindow {
+ @private
+ int ignoredToggleFullScreenCount_;
+}
+@property(readonly, nonatomic) int ignoredToggleFullScreenCount;
+@end
+
+@implementation BridgedNativeWidgetTestFullScreenWindow
+
+@synthesize ignoredToggleFullScreenCount = ignoredToggleFullScreenCount_;
+
+- (void)toggleFullScreen:(id)sender {
+ ++ignoredToggleFullScreenCount_;
+}
+
+@end
+
namespace views {
namespace test {
@@ -51,7 +161,7 @@
}
// internal::NativeWidgetPrivate:
- virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE {
+ virtual void InitNativeWidget(const Widget::InitParams& params) override {
ownership_ = params.ownership;
// Usually the bridge gets initialized here. It is skipped to run extra
@@ -59,7 +169,7 @@
delegate()->OnNativeWidgetCreated(true);
}
- virtual void ReorderNativeViews() OVERRIDE {
+ virtual void ReorderNativeViews() override {
// Called via Widget::Init to set the content view. No-op in these tests.
}
@@ -80,7 +190,7 @@
}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ui::CocoaTest::SetUp();
Widget::InitParams params;
@@ -109,8 +219,8 @@
std::string GetText();
// testing::Test:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
// TODO(tapted): Make this a EventCountView from widget_unittest.cc.
@@ -148,6 +258,9 @@
view_.reset(new views::View);
base::scoped_nsobject<NSWindow> window([test_window() retain]);
+ // BridgedNativeWidget expects to be initialized with a hidden (deferred)
+ // window.
+ [window orderOut:nil];
EXPECT_FALSE([window delegate]);
bridge()->Init(window, Widget::InitParams());
@@ -156,6 +269,8 @@
bridge()->SetRootView(view_.get());
ns_view_ = bridge()->ns_view();
+ // Pretend it has been shown via NativeWidgetMac::Show().
+ [window orderFront:nil];
[test_window() makePretendKeyWindowAndSetFirstResponder:bridge()->ns_view()];
}
@@ -246,7 +361,7 @@
[[NSWindow alloc] initWithContentRect:NSMakeRect(50, 50, 400, 300)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
- defer:NO]);
+ defer:YES]);
[child_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
EXPECT_FALSE([child_window parentWindow]);
@@ -415,5 +530,163 @@
EXPECT_EQ_RANGE(NSMakeRange(0, 0), [ns_view_ selectedRange]);
}
+// Tests for correct fullscreen tracking, regardless of whether it is initiated
+// by the Widget code or elsewhere (e.g. by the user).
+TEST_F(BridgedNativeWidgetTest, FullscreenSynchronousState) {
+ EXPECT_FALSE(widget_->IsFullscreen());
+ // Allow user-initiated fullscreen changes on the Window.
+ [test_window()
+ setCollectionBehavior:[test_window() collectionBehavior] |
+ NSWindowCollectionBehaviorFullScreenPrimary];
+
+ base::scoped_nsobject<NativeWidgetMacNotificationWaiter> waiter(
+ [[NativeWidgetMacNotificationWaiter alloc] initWithWindow:test_window()]);
+ const gfx::Rect restored_bounds = widget_->GetRestoredBounds();
+
+ // Simulate a user-initiated fullscreen. Note trying to to this again before
+ // spinning a runloop will cause Cocoa to emit text to stdio and ignore it.
+ [test_window() toggleFullScreen:nil];
+ EXPECT_TRUE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ // Note there's now an animation running. While that's happening, toggling the
+ // state should work as expected, but do "nothing".
+ widget_->SetFullscreen(false);
+ EXPECT_FALSE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+ widget_->SetFullscreen(false); // Same request - should no-op.
+ EXPECT_FALSE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ widget_->SetFullscreen(true);
+ EXPECT_TRUE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ // Always finish out of fullscreen. Otherwise there are 4 NSWindow objects
+ // that Cocoa creates which don't close themselves and will be seen by the Mac
+ // test harness on teardown. Note that the test harness will be waiting until
+ // all animations complete, since these temporary animation windows will not
+ // be removed from the window list until they do.
+ widget_->SetFullscreen(false);
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ // Now we must wait for the notifications. Since, if the widget is torn down,
+ // the NSWindowDelegate is removed, and the pending request to take out of
+ // fullscreen is lost. Since a message loop has not yet spun up in this test
+ // we can reliably say there will be one enter and one exit, despite all the
+ // toggling above.
+ base::MessageLoopForUI message_loop;
+ [waiter waitForEnterCount:1 exitCount:1];
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+}
+
+// Test fullscreen without overlapping calls and without changing collection
+// behavior on the test window.
+TEST_F(BridgedNativeWidgetTest, FullscreenEnterAndExit) {
+ base::MessageLoopForUI message_loop;
+ base::scoped_nsobject<NativeWidgetMacNotificationWaiter> waiter(
+ [[NativeWidgetMacNotificationWaiter alloc] initWithWindow:test_window()]);
+
+ EXPECT_FALSE(widget_->IsFullscreen());
+ const gfx::Rect restored_bounds = widget_->GetRestoredBounds();
+ EXPECT_FALSE(restored_bounds.IsEmpty());
+
+ // Ensure this works without having to change collection behavior as for the
+ // test above.
+ widget_->SetFullscreen(true);
+ EXPECT_TRUE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ // Should be zero until the runloop spins.
+ EXPECT_EQ(0, [waiter enterCount]);
+ [waiter waitForEnterCount:1 exitCount:0];
+
+ // Verify it hasn't exceeded.
+ EXPECT_EQ(1, [waiter enterCount]);
+ EXPECT_EQ(0, [waiter exitCount]);
+ EXPECT_TRUE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ widget_->SetFullscreen(false);
+ EXPECT_FALSE(widget_->IsFullscreen());
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+
+ [waiter waitForEnterCount:1 exitCount:1];
+ EXPECT_EQ(1, [waiter enterCount]);
+ EXPECT_EQ(1, [waiter exitCount]);
+ EXPECT_EQ(restored_bounds, widget_->GetRestoredBounds());
+}
+
+typedef BridgedNativeWidgetTestBase BridgedNativeWidgetSimulateFullscreenTest;
+
+// Simulate the notifications that AppKit would send out if a fullscreen
+// operation begins, and then fails and must abort. This notification sequence
+// was determined by posting delayed tasks to toggle fullscreen state and then
+// mashing Ctrl+Left/Right to keep OSX in a transition between Spaces to cause
+// the fullscreen transition to fail.
+TEST_F(BridgedNativeWidgetSimulateFullscreenTest, FailToEnterAndExit) {
+ base::scoped_nsobject<NSWindow> owned_window(
+ [[BridgedNativeWidgetTestFullScreenWindow alloc]
+ initWithContentRect:NSMakeRect(50, 50, 400, 300)
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:YES]);
+ [owned_window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
+ bridge()->Init(owned_window, Widget::InitParams()); // Transfers ownership.
+
+ BridgedNativeWidgetTestFullScreenWindow* window =
+ base::mac::ObjCCastStrict<BridgedNativeWidgetTestFullScreenWindow>(
+ widget_->GetNativeWindow());
+ widget_->Show();
+
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+
+ // Simulate an initial toggleFullScreen: (user- or Widget-initiated).
+ [center postNotificationName:NSWindowWillEnterFullScreenNotification
+ object:window];
+
+ // On a failure, Cocoa starts by sending an unexpected *exit* fullscreen, and
+ // BridgedNativeWidget will think it's just a delayed transition and try to go
+ // back into fullscreen but get ignored by Cocoa.
+ EXPECT_EQ(0, [window ignoredToggleFullScreenCount]);
+ EXPECT_TRUE(bridge()->target_fullscreen_state());
+ [center postNotificationName:NSWindowDidExitFullScreenNotification
+ object:window];
+ EXPECT_EQ(1, [window ignoredToggleFullScreenCount]);
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+
+ // Cocoa follows up with a failure notification.
+ [center postNotificationName:NSWindowDidFailToEnterFullScreenNotification
+ object:window];
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+
+ // Now perform a successful fullscreen operation.
+ [center postNotificationName:NSWindowWillEnterFullScreenNotification
+ object:window];
+ EXPECT_TRUE(bridge()->target_fullscreen_state());
+ [center postNotificationName:NSWindowDidEnterFullScreenNotification
+ object:window];
+ EXPECT_TRUE(bridge()->target_fullscreen_state());
+
+ // And try to get out.
+ [center postNotificationName:NSWindowWillExitFullScreenNotification
+ object:window];
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+
+ // On a failure, Cocoa sends a failure notification, but then just dumps the
+ // Window out of fullscreen anyway (in that order).
+ [center postNotificationName:NSWindowDidFailToExitFullScreenNotification
+ object:window];
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+ [center postNotificationName:NSWindowDidExitFullScreenNotification
+ object:window];
+ EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change.
+ EXPECT_FALSE(bridge()->target_fullscreen_state());
+
+ widget_->CloseNow();
+}
+
} // namespace test
} // namespace views
diff --git a/ui/views/cocoa/views_nswindow_delegate.mm b/ui/views/cocoa/views_nswindow_delegate.mm
index da577d6..50f0021 100644
--- a/ui/views/cocoa/views_nswindow_delegate.mm
+++ b/ui/views/cocoa/views_nswindow_delegate.mm
@@ -6,6 +6,7 @@
#include "base/logging.h"
#import "ui/views/cocoa/bridged_native_widget.h"
+#include "ui/views/widget/native_widget_mac.h"
@implementation ViewsNSWindowDelegate
@@ -23,9 +24,50 @@
// NSWindowDelegate implementation.
+- (void)windowDidFailToEnterFullScreen:(NSWindow*)window {
+ // Cocoa should already have sent an (unexpected) windowDidExitFullScreen:
+ // notification, and the attempt to get back into fullscreen should fail.
+ // Nothing to do except verify |parent_| is no longer trying to fullscreen.
+ DCHECK(!parent_->target_fullscreen_state());
+}
+
+- (void)windowDidFailToExitFullScreen:(NSWindow*)window {
+ // Unlike entering fullscreen, windowDidFailToExitFullScreen: is sent *before*
+ // windowDidExitFullScreen:. Also, failing to exit fullscreen just dumps the
+ // window out of fullscreen without an animation; still sending the expected,
+ // windowDidExitFullScreen: notification. So, again, nothing to do here.
+ DCHECK(!parent_->target_fullscreen_state());
+}
+
+- (void)windowDidBecomeKey:(NSNotification*)notification {
+ parent_->native_widget_mac()->GetWidget()->OnNativeWidgetActivationChanged(
+ true);
+}
+
+- (void)windowDidResignKey:(NSNotification*)notification {
+ parent_->native_widget_mac()->GetWidget()->OnNativeWidgetActivationChanged(
+ false);
+}
+
- (void)windowWillClose:(NSNotification*)notification {
DCHECK([parent_->ns_window() isEqual:[notification object]]);
parent_->OnWindowWillClose();
}
+- (void)windowWillEnterFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionStart(true);
+}
+
+- (void)windowDidEnterFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionComplete(true);
+}
+
+- (void)windowWillExitFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionStart(false);
+}
+
+- (void)windowDidExitFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionComplete(false);
+}
+
@end
diff --git a/ui/views/color_chooser/color_chooser_view.cc b/ui/views/color_chooser/color_chooser_view.cc
index 8efdb2a..680fd30 100644
--- a/ui/views/color_chooser/color_chooser_view.cc
+++ b/ui/views/color_chooser/color_chooser_view.cc
@@ -66,17 +66,17 @@
virtual void ProcessEventAtLocation(const gfx::Point& location) = 0;
// views::View overrides:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override {
ProcessEventAtLocation(event.location());
return true;
}
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE {
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override {
ProcessEventAtLocation(event.location());
return true;
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
if (event->type() == ui::ET_GESTURE_TAP ||
event->type() == ui::ET_GESTURE_TAP_DOWN ||
event->IsScrollGestureEvent()) {
@@ -123,11 +123,11 @@
private:
// LocatedEventHandlerView overrides:
- virtual void ProcessEventAtLocation(const gfx::Point& point) OVERRIDE;
+ virtual void ProcessEventAtLocation(const gfx::Point& point) override;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
ColorChooserView* chooser_view_;
int level_;
@@ -235,11 +235,11 @@
private:
// LocatedEventHandlerView overrides:
- virtual void ProcessEventAtLocation(const gfx::Point& point) OVERRIDE;
+ virtual void ProcessEventAtLocation(const gfx::Point& point) override;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
ColorChooserView* chooser_view_;
SkScalar hue_;
diff --git a/ui/views/color_chooser/color_chooser_view.h b/ui/views/color_chooser/color_chooser_view.h
index c4481d3..532e823 100644
--- a/ui/views/color_chooser/color_chooser_view.h
+++ b/ui/views/color_chooser/color_chooser_view.h
@@ -48,17 +48,17 @@
class SelectedColorPatchView;
// WidgetDelegate overrides:
- virtual bool CanMinimize() const OVERRIDE;
- virtual View* GetInitiallyFocusedView() OVERRIDE;
- virtual ui::ModalType GetModalType() const OVERRIDE;
- virtual void WindowClosing() OVERRIDE;
- virtual View* GetContentsView() OVERRIDE;
+ virtual bool CanMinimize() const override;
+ virtual View* GetInitiallyFocusedView() override;
+ virtual ui::ModalType GetModalType() const override;
+ virtual void WindowClosing() override;
+ virtual View* GetContentsView() override;
// TextfieldController overrides:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
virtual bool HandleKeyEvent(Textfield* sender,
- const ui::KeyEvent& key_event) OVERRIDE;
+ const ui::KeyEvent& key_event) override;
// The current color in HSV coordinate.
SkScalar hsv_[3];
diff --git a/ui/views/controls/button/blue_button.h b/ui/views/controls/button/blue_button.h
index 8c83c00..cad8245 100644
--- a/ui/views/controls/button/blue_button.h
+++ b/ui/views/controls/button/blue_button.h
@@ -20,9 +20,9 @@
private:
// Overridden from LabelButton:
- virtual void ResetColorsFromNativeTheme() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual scoped_ptr<LabelButtonBorder> CreateDefaultBorder() const OVERRIDE;
+ virtual void ResetColorsFromNativeTheme() override;
+ virtual const char* GetClassName() const override;
+ virtual scoped_ptr<LabelButtonBorder> CreateDefaultBorder() const override;
DISALLOW_COPY_AND_ASSIGN(BlueButton);
};
diff --git a/ui/views/controls/button/button.h b/ui/views/controls/button/button.h
index 37d639d..6347a43 100644
--- a/ui/views/controls/button/button.h
+++ b/ui/views/controls/button/button.h
@@ -57,8 +57,8 @@
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ base::string16* tooltip) const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
protected:
// Construct the Button with a Listener. The listener can be NULL. This can be
diff --git a/ui/views/controls/button/checkbox.h b/ui/views/controls/button/checkbox.h
index 7bfd5bc..8f473fa 100644
--- a/ui/views/controls/button/checkbox.h
+++ b/ui/views/controls/button/checkbox.h
@@ -32,12 +32,12 @@
protected:
// Overridden from LabelButton:
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual const gfx::ImageSkia& GetImage(ButtonState for_state) OVERRIDE;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual const gfx::ImageSkia& GetImage(ButtonState for_state) override;
// Set the image shown for each button state depending on whether it is
// [checked] or [focused].
@@ -48,11 +48,11 @@
private:
// Overridden from Button:
- virtual void NotifyClick(const ui::Event& event) OVERRIDE;
+ virtual void NotifyClick(const ui::Event& event) override;
- virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
+ virtual ui::NativeTheme::Part GetThemePart() const override;
virtual void GetExtraParams(
- ui::NativeTheme::ExtraParams* params) const OVERRIDE;
+ ui::NativeTheme::ExtraParams* params) const override;
// True if the checkbox is checked.
bool checked_;
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 6c9a162..5b29358 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -67,27 +67,27 @@
bool IsHotTracked() const;
// Overridden from View:
- virtual void OnEnabledChanged() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual void OnEnabledChanged() override;
+ virtual const char* GetClassName() const override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void OnMouseMoved(const ui::MouseEvent& event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
virtual void ShowContextMenu(const gfx::Point& p,
- ui::MenuSourceType source_type) OVERRIDE;
- virtual void OnDragDone() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE;
+ ui::MenuSourceType source_type) override;
+ virtual void OnDragDone() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void VisibilityChanged(View* starting_from, bool is_visible) override;
// Overridden from gfx::AnimationDelegate:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
// Takes ownership of the delegate.
void set_state_changed_delegate(CustomButtonStateChangedDelegate* delegate) {
@@ -115,8 +115,8 @@
// Overridden from View:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual void OnBlur() override;
// The button state (defined in implementation)
ButtonState state_;
diff --git a/ui/views/controls/button/image_button.h b/ui/views/controls/button/image_button.h
index fbdf429..dc861c4 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -69,14 +69,14 @@
}
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
protected:
// Overridden from View:
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
// Returns the image to paint. This is invoked from paint and returns a value
// from images.
@@ -141,14 +141,14 @@
void SetToggledTooltipText(const base::string16& tooltip);
// Overridden from ImageButton:
- virtual const gfx::ImageSkia& GetImage(ButtonState state) const OVERRIDE;
+ virtual const gfx::ImageSkia& GetImage(ButtonState state) const override;
virtual void SetImage(ButtonState state,
- const gfx::ImageSkia* image) OVERRIDE;
+ const gfx::ImageSkia* image) override;
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ base::string16* tooltip) const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
private:
// The parent class's images_ member is used for the current images,
diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h
index b614fe2..fbedf8b 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -86,11 +86,11 @@
Painter* focus_painter() { return focus_painter_.get(); }
// View:
- virtual void SetBorder(scoped_ptr<Border> border) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int w) const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual void SetBorder(scoped_ptr<Border> border) override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int w) const override;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
protected:
ImageView* image() const { return image_; }
@@ -101,10 +101,10 @@
virtual gfx::Rect GetChildAreaBounds();
// View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// Fill |params| with information about the button.
virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const;
@@ -124,7 +124,7 @@
void UpdateThemedBorder();
// NativeThemeDelegate:
- virtual gfx::Rect GetThemePaintRect() const OVERRIDE;
+ virtual gfx::Rect GetThemePaintRect() const override;
private:
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init);
@@ -134,20 +134,20 @@
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, FontList);
// CustomButton:
- virtual void StateChanged() OVERRIDE;
+ virtual void StateChanged() override;
// View:
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
// NativeThemeDelegate:
- virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
+ virtual ui::NativeTheme::Part GetThemePart() const override;
virtual ui::NativeTheme::State GetThemeState(
- ui::NativeTheme::ExtraParams* params) const OVERRIDE;
- virtual const gfx::Animation* GetThemeAnimation() const OVERRIDE;
+ ui::NativeTheme::ExtraParams* params) const override;
+ virtual const gfx::Animation* GetThemeAnimation() const override;
virtual ui::NativeTheme::State GetBackgroundThemeState(
- ui::NativeTheme::ExtraParams* params) const OVERRIDE;
+ ui::NativeTheme::ExtraParams* params) const override;
virtual ui::NativeTheme::State GetForegroundThemeState(
- ui::NativeTheme::ExtraParams* params) const OVERRIDE;
+ ui::NativeTheme::ExtraParams* params) const override;
// Resets |cached_preferred_size_| and marks |cached_preferred_size_valid_|
// as false.
diff --git a/ui/views/controls/button/label_button_border.h b/ui/views/controls/button/label_button_border.h
index a737ba7..936c898 100644
--- a/ui/views/controls/button/label_button_border.h
+++ b/ui/views/controls/button/label_button_border.h
@@ -24,9 +24,9 @@
Button::ButtonStyle style() const { return style_; }
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetMinimumSize() const override;
void set_insets(const gfx::Insets& insets) { insets_ = insets; }
diff --git a/ui/views/controls/button/menu_button.h b/ui/views/controls/button/menu_button.h
index 1eedc0f..a1baf05 100644
--- a/ui/views/controls/button/menu_button.h
+++ b/ui/views/controls/button/menu_button.h
@@ -65,25 +65,25 @@
virtual bool Activate();
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void OnMouseMoved(const ui::MouseEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
protected:
// Paint the menu marker image.
void PaintMenuMarker(gfx::Canvas* canvas);
// Overridden from LabelButton:
- virtual gfx::Rect GetChildAreaBounds() OVERRIDE;
+ virtual gfx::Rect GetChildAreaBounds() override;
// Offset of the associated menu position.
gfx::Point menu_offset_;
diff --git a/ui/views/controls/button/menu_button_unittest.cc b/ui/views/controls/button/menu_button_unittest.cc
index 9cff544..3b153ad 100644
--- a/ui/views/controls/button/menu_button_unittest.cc
+++ b/ui/views/controls/button/menu_button_unittest.cc
@@ -19,7 +19,7 @@
MenuButtonTest() : widget_(NULL), button_(NULL) {}
virtual ~MenuButtonTest() {}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
if (widget_ && !widget_->IsClosed())
widget_->Close();
@@ -85,7 +85,7 @@
last_event_type_(ui::ET_UNKNOWN) {}
virtual ~TestButtonListener() {}
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE {
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override {
last_sender_ = sender;
CustomButton* custom_button = CustomButton::AsCustomButton(sender);
DCHECK(custom_button);
@@ -111,7 +111,7 @@
virtual ~TestMenuButtonListener() {}
virtual void OnMenuButtonClicked(View* source,
- const gfx::Point& /*point*/) OVERRIDE {
+ const gfx::Point& /*point*/) override {
last_source_ = source;
CustomButton* custom_button = CustomButton::AsCustomButton(source);
DCHECK(custom_button);
diff --git a/ui/views/controls/button/radio_button.h b/ui/views/controls/button/radio_button.h
index edbb2c6..b24e0be 100644
--- a/ui/views/controls/button/radio_button.h
+++ b/ui/views/controls/button/radio_button.h
@@ -21,20 +21,20 @@
virtual ~RadioButton();
// Overridden from View:
- virtual const char* GetClassName() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual View* GetSelectedViewForGroup(int group) OVERRIDE;
- virtual bool IsGroupFocusTraversable() const OVERRIDE;
- virtual void OnFocus() OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual View* GetSelectedViewForGroup(int group) override;
+ virtual bool IsGroupFocusTraversable() const override;
+ virtual void OnFocus() override;
// Overridden from Button:
- virtual void NotifyClick(const ui::Event& event) OVERRIDE;
+ virtual void NotifyClick(const ui::Event& event) override;
// Overridden from LabelButton:
- virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
+ virtual ui::NativeTheme::Part GetThemePart() const override;
// Overridden from Checkbox:
- virtual void SetChecked(bool checked) OVERRIDE;
+ virtual void SetChecked(bool checked) override;
private:
DISALLOW_COPY_AND_ASSIGN(RadioButton);
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 81b3ae5..62b8ec3 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -94,7 +94,7 @@
}
virtual ~TransparentButton() {}
- virtual bool OnMousePressed(const ui::MouseEvent& mouse_event) OVERRIDE {
+ virtual bool OnMousePressed(const ui::MouseEvent& mouse_event) override {
parent()->RequestFocus();
return true;
}
diff --git a/ui/views/controls/combobox/combobox.h b/ui/views/controls/combobox/combobox.h
index 24011de..aabb476 100644
--- a/ui/views/controls/combobox/combobox.h
+++ b/ui/views/controls/combobox/combobox.h
@@ -93,36 +93,36 @@
bool invalid() const { return invalid_; }
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& e) OVERRIDE;
- virtual bool OnKeyReleased(const ui::KeyEvent& e) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
+ virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& e) override;
+ virtual bool OnKeyReleased(const ui::KeyEvent& e) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual ui::TextInputClient* GetTextInputClient() override;
+ virtual void Layout() override;
// Overridden from MenuDelegate:
- virtual bool IsItemChecked(int id) const OVERRIDE;
- virtual bool IsCommandEnabled(int id) const OVERRIDE;
- virtual void ExecuteCommand(int id) OVERRIDE;
+ virtual bool IsItemChecked(int id) const override;
+ virtual bool IsCommandEnabled(int id) const override;
+ virtual void ExecuteCommand(int id) override;
virtual bool GetAccelerator(int id,
- ui::Accelerator* accelerator) const OVERRIDE;
+ ui::Accelerator* accelerator) const override;
// Overridden from PrefixDelegate:
- virtual int GetRowCount() OVERRIDE;
- virtual int GetSelectedRow() OVERRIDE;
- virtual void SetSelectedRow(int row) OVERRIDE;
- virtual base::string16 GetTextForRow(int row) OVERRIDE;
+ virtual int GetRowCount() override;
+ virtual int GetSelectedRow() override;
+ virtual void SetSelectedRow(int row) override;
+ virtual base::string16 GetTextForRow(int row) override;
// Overriden from ComboboxModelObserver:
- virtual void OnComboboxModelChanged(ui::ComboboxModel* model) OVERRIDE;
+ virtual void OnComboboxModelChanged(ui::ComboboxModel* model) override;
// Overriden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
private:
FRIEND_TEST_ALL_PREFIXES(ComboboxTest, Click);
diff --git a/ui/views/controls/combobox/combobox_unittest.cc b/ui/views/controls/combobox/combobox_unittest.cc
index 5621525..8a2043f 100644
--- a/ui/views/controls/combobox/combobox_unittest.cc
+++ b/ui/views/controls/combobox/combobox_unittest.cc
@@ -40,7 +40,7 @@
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
ui::MenuSourceType source_type,
- int32 types) OVERRIDE {
+ int32 types) override {
executed_ = true;
return MenuRunner::NORMAL_EXIT;
}
@@ -60,13 +60,13 @@
key_handled_(false),
key_received_(false) {}
- virtual bool OnKeyPressed(const ui::KeyEvent& e) OVERRIDE {
+ virtual bool OnKeyPressed(const ui::KeyEvent& e) override {
key_received_ = true;
key_handled_ = Combobox::OnKeyPressed(e);
return key_handled_;
}
- virtual bool OnKeyReleased(const ui::KeyEvent& e) OVERRIDE {
+ virtual bool OnKeyReleased(const ui::KeyEvent& e) override {
key_received_ = true;
key_handled_ = Combobox::OnKeyReleased(e);
return key_handled_;
@@ -95,21 +95,21 @@
static const int kItemCount = 10;
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE {
+ virtual int GetItemCount() const override {
return kItemCount;
}
- virtual base::string16 GetItemAt(int index) OVERRIDE {
+ virtual base::string16 GetItemAt(int index) override {
if (IsItemSeparatorAt(index)) {
NOTREACHED();
return ASCIIToUTF16("SEPARATOR");
}
return ASCIIToUTF16(index % 2 == 0 ? "PEANUT BUTTER" : "JELLY");
}
- virtual bool IsItemSeparatorAt(int index) OVERRIDE {
+ virtual bool IsItemSeparatorAt(int index) override {
return separators_.find(index) != separators_.end();
}
- virtual int GetDefaultIndex() const OVERRIDE {
+ virtual int GetDefaultIndex() const override {
// Return the first index that is not a separator.
for (int index = 0; index < kItemCount; ++index) {
if (separators_.find(index) == separators_.end())
@@ -137,13 +137,13 @@
virtual ~VectorComboboxModel() {}
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE {
+ virtual int GetItemCount() const override {
return (int)values_->size();
}
- virtual base::string16 GetItemAt(int index) OVERRIDE {
+ virtual base::string16 GetItemAt(int index) override {
return ASCIIToUTF16(values_->at(index));
}
- virtual bool IsItemSeparatorAt(int index) OVERRIDE {
+ virtual bool IsItemSeparatorAt(int index) override {
return false;
}
@@ -157,7 +157,7 @@
virtual ~EvilListener() {};
// ComboboxListener:
- virtual void OnPerformAction(Combobox* combobox) OVERRIDE {
+ virtual void OnPerformAction(Combobox* combobox) override {
delete combobox;
deleted_ = true;
}
@@ -175,7 +175,7 @@
TestComboboxListener() : perform_action_index_(-1), actions_performed_(0) {}
virtual ~TestComboboxListener() {}
- virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE {
+ virtual void OnPerformAction(views::Combobox* combobox) override {
perform_action_index_ = combobox->selected_index();
actions_performed_++;
}
@@ -206,7 +206,7 @@
public:
ComboboxTest() : widget_(NULL), combobox_(NULL) {}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
if (widget_)
widget_->Close();
ViewsTestBase::TearDown();
diff --git a/ui/views/controls/focusable_border.h b/ui/views/controls/focusable_border.h
index b8f9aa7..9afa6ea 100644
--- a/ui/views/controls/focusable_border.h
+++ b/ui/views/controls/focusable_border.h
@@ -32,9 +32,9 @@
void UseDefaultColor();
// Overridden from Border:
- virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual void Paint(const View& view, gfx::Canvas* canvas) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetMinimumSize() const override;
private:
gfx::Insets insets_;
diff --git a/ui/views/controls/glow_hover_controller.h b/ui/views/controls/glow_hover_controller.h
index 2ac423e..59d27a7 100644
--- a/ui/views/controls/glow_hover_controller.h
+++ b/ui/views/controls/glow_hover_controller.h
@@ -65,8 +65,8 @@
void Draw(gfx::Canvas* canvas, const gfx::ImageSkia& mask_image) const;
// gfx::AnimationDelegate overrides:
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const gfx::Animation* animation) override;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
private:
// View we're drawing to.
diff --git a/ui/views/controls/image_view.h b/ui/views/controls/image_view.h
index a05b106..00b8209 100644
--- a/ui/views/controls/image_view.h
+++ b/ui/views/controls/image_view.h
@@ -80,14 +80,14 @@
void SetFocusPainter(scoped_ptr<Painter> focus_painter);
// Overriden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE;
+ base::string16* tooltip) const override;
+ virtual bool CanProcessEventsWithinSubtree() const override;
private:
void OnPaintImage(gfx::Canvas* canvas);
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index 755ca14..727b6db 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -120,17 +120,17 @@
const base::string16& GetLayoutTextForTesting() const;
// View:
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual int GetHeightForWidth(int w) const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual View* GetTooltipHandlerForPoint(const gfx::Point& point) OVERRIDE;
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual gfx::Insets GetInsets() const override;
+ virtual int GetBaseline() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual int GetHeightForWidth(int w) const override;
+ virtual const char* GetClassName() const override;
+ virtual View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
+ virtual bool CanProcessEventsWithinSubtree() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
+ base::string16* tooltip) const override;
protected:
// Called by Paint to paint the text.
@@ -144,9 +144,9 @@
SkColor disabled_color() const { return actual_disabled_color_; }
// View:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
private:
// These tests call CalculateDrawStringParams in order to verify the
diff --git a/ui/views/controls/link.h b/ui/views/controls/link.h
index 4d5cf6b..951de2d 100644
--- a/ui/views/controls/link.h
+++ b/ui/views/controls/link.h
@@ -34,24 +34,24 @@
void set_listener(LinkListener* listener) { listener_ = listener; }
// Label:
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
+ virtual bool CanProcessEventsWithinSubtree() const override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
virtual bool SkipDefaultKeyEventProcessing(
- const ui::KeyEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnEnabledChanged() OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void SetFontList(const gfx::FontList& font_list) OVERRIDE;
- virtual void SetText(const base::string16& text) OVERRIDE;
- virtual void SetEnabledColor(SkColor color) OVERRIDE;
+ const ui::KeyEvent& event) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnEnabledChanged() override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual void SetFontList(const gfx::FontList& font_list) override;
+ virtual void SetText(const base::string16& text) override;
+ virtual void SetEnabledColor(SkColor color) override;
void SetPressedColor(SkColor color);
void SetUnderline(bool underline);
diff --git a/ui/views/controls/menu/display_change_listener_aura.cc b/ui/views/controls/menu/display_change_listener_aura.cc
index e6df560..7bab443 100644
--- a/ui/views/controls/menu/display_change_listener_aura.cc
+++ b/ui/views/controls/menu/display_change_listener_aura.cc
@@ -22,8 +22,8 @@
// aura::WindowObserver overrides:
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
private:
MenuRunner* menu_runner_;
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index a020144..6da540d 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -164,7 +164,7 @@
void UpdateSubmenuSelection(SubmenuView* source);
// WidgetObserver overrides:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
// Only used for testing.
bool IsCancelAllTimerRunningForTest();
diff --git a/ui/views/controls/menu/menu_controller_unittest.cc b/ui/views/controls/menu/menu_controller_unittest.cc
index 334c431..ba4dd13 100644
--- a/ui/views/controls/menu/menu_controller_unittest.cc
+++ b/ui/views/controls/menu/menu_controller_unittest.cc
@@ -61,7 +61,7 @@
virtual ~TestNullTargeter() {}
virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
- ui::Event* event) OVERRIDE {
+ ui::Event* event) override {
return NULL;
}
@@ -82,7 +82,7 @@
virtual void PrepareNestedLoopClosures(
base::MessagePumpDispatcher* dispatcher,
base::Closure* run_closure,
- base::Closure* quit_closure) OVERRIDE {
+ base::Closure* quit_closure) override {
scoped_ptr<base::RunLoop> run_loop(new base::RunLoop());
*quit_closure = run_loop->QuitClosure();
*run_closure = base::Bind(&TestDispatcherClient::RunNestedDispatcher,
diff --git a/ui/views/controls/menu/menu_event_dispatcher_linux.h b/ui/views/controls/menu/menu_event_dispatcher_linux.h
index bdc76fd..a516d2e 100644
--- a/ui/views/controls/menu/menu_event_dispatcher_linux.h
+++ b/ui/views/controls/menu/menu_event_dispatcher_linux.h
@@ -20,8 +20,8 @@
private:
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
MenuController* menu_controller_;
diff --git a/ui/views/controls/menu/menu_host.h b/ui/views/controls/menu/menu_host.h
index a169661..31ad7de 100644
--- a/ui/views/controls/menu/menu_host.h
+++ b/ui/views/controls/menu/menu_host.h
@@ -56,12 +56,12 @@
private:
// Overridden from Widget:
- virtual internal::RootView* CreateRootView() OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnNativeWidgetDestroyed() OVERRIDE;
- virtual void OnOwnerClosing() OVERRIDE;
- virtual void OnDragWillStart() OVERRIDE;
- virtual void OnDragComplete() OVERRIDE;
+ virtual internal::RootView* CreateRootView() override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnNativeWidgetDestroyed() override;
+ virtual void OnOwnerClosing() override;
+ virtual void OnDragWillStart() override;
+ virtual void OnDragComplete() override;
// The view we contain.
SubmenuView* submenu_;
diff --git a/ui/views/controls/menu/menu_host_root_view.h b/ui/views/controls/menu/menu_host_root_view.h
index 4031dec..f08c813 100644
--- a/ui/views/controls/menu/menu_host_root_view.h
+++ b/ui/views/controls/menu/menu_host_root_view.h
@@ -25,15 +25,15 @@
void ClearSubmenu() { submenu_ = NULL; }
// Overridden from View:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseMoved(const ui::MouseEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
private:
// ui::EventProcessor:
- virtual void OnEventProcessingFinished(ui::Event* event) OVERRIDE;
+ virtual void OnEventProcessingFinished(ui::Event* event) override;
// Returns the MenuController for this MenuHostRootView.
MenuController* GetMenuController();
diff --git a/ui/views/controls/menu/menu_image_util.cc b/ui/views/controls/menu/menu_image_util.cc
index c85afd7..84f33bd 100644
--- a/ui/views/controls/menu/menu_image_util.cc
+++ b/ui/views/controls/menu/menu_image_util.cc
@@ -42,7 +42,7 @@
}
virtual ~RadioButtonImageSource() {}
- virtual void Draw(gfx::Canvas* canvas) OVERRIDE {
+ virtual void Draw(gfx::Canvas* canvas) override {
canvas->Translate(gfx::Vector2d(1, 1));
SkPoint gradient_points[3];
@@ -105,7 +105,7 @@
image_id_(image_id) {}
virtual ~SubmenuArrowImageSource() {}
- virtual void Draw(gfx::Canvas* canvas) OVERRIDE {
+ virtual void Draw(gfx::Canvas* canvas) override {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
const gfx::ImageSkia* r = rb.GetImageNamed(image_id_).ToImageSkia();
canvas->Scale(-1, 1);
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index a47557f..6b11d3a 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -49,7 +49,7 @@
}
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE {
+ base::string16* tooltip) const override {
// Empty menu items shouldn't have a tooltip.
return false;
}
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
index 97cf215..cc4150e 100644
--- a/ui/views/controls/menu/menu_item_view.h
+++ b/ui/views/controls/menu/menu_item_view.h
@@ -118,8 +118,8 @@
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ base::string16* tooltip) const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// Returns the preferred height of menu items. This is only valid when the
// menu is about to be shown.
@@ -260,15 +260,15 @@
int GetCommand() const { return command_; }
// Paints the menu item.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// Returns the preferred size of this item.
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
// Gets the preferred height for the given |width|. This is only different
// from GetPreferredSize().width() if the item has a child view with flexible
// dimensions.
- virtual int GetHeightForWidth(int width) const OVERRIDE;
+ virtual int GetHeightForWidth(int width) const override;
// Return the preferred dimensions of the item in pixel.
const MenuItemDimensions& GetDimensions() const;
@@ -305,7 +305,7 @@
void ChildrenChanged();
// Sizes any child views.
- virtual void Layout() OVERRIDE;
+ virtual void Layout() override;
// Returns true if the menu has mnemonics. This only useful on the root menu
// item.
@@ -330,9 +330,9 @@
// MenuRunner owns MenuItemView and should be the only one deleting it.
virtual ~MenuItemView();
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual const char* GetClassName() const override;
// Returns the preferred size (and padding) of any children.
virtual gfx::Size GetChildPreferredSize() const;
diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
index 23bf4e4..961d90c 100644
--- a/ui/views/controls/menu/menu_item_view_unittest.cc
+++ b/ui/views/controls/menu/menu_item_view_unittest.cc
@@ -19,10 +19,10 @@
virtual ~SquareView() {}
private:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(1, 1);
}
- virtual int GetHeightForWidth(int width) const OVERRIDE {
+ virtual int GetHeightForWidth(int width) const override {
return width;
}
};
diff --git a/ui/views/controls/menu/menu_message_loop_aura.cc b/ui/views/controls/menu/menu_message_loop_aura.cc
index 0d7e99a..a2b7651 100644
--- a/ui/views/controls/menu/menu_message_loop_aura.cc
+++ b/ui/views/controls/menu/menu_message_loop_aura.cc
@@ -61,16 +61,16 @@
// aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
+ aura::Window* lost_active) override {
if (!controller_->drag_in_progress())
controller_->CancelAll();
}
// aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { Cleanup(); }
+ virtual void OnWindowDestroying(aura::Window* window) override { Cleanup(); }
// ui::EventHandler:
- virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE {
+ virtual void OnCancelMode(ui::CancelModeEvent* event) override {
controller_->CancelAll();
}
diff --git a/ui/views/controls/menu/menu_message_loop_aura.h b/ui/views/controls/menu/menu_message_loop_aura.h
index 49e8a39..1e58059 100644
--- a/ui/views/controls/menu/menu_message_loop_aura.h
+++ b/ui/views/controls/menu/menu_message_loop_aura.h
@@ -28,13 +28,13 @@
// Overridden from MenuMessageLoop:
virtual void Run(MenuController* controller,
Widget* owner,
- bool nested_menu) OVERRIDE;
- virtual bool ShouldQuitNow() const OVERRIDE;
- virtual void QuitNow() OVERRIDE;
+ bool nested_menu) override;
+ virtual bool ShouldQuitNow() const override;
+ virtual void QuitNow() override;
virtual void RepostEventToWindow(const ui::LocatedEvent& event,
gfx::NativeWindow window,
- const gfx::Point& screen_loc) OVERRIDE;
- virtual void ClearOwner() OVERRIDE;
+ const gfx::Point& screen_loc) override;
+ virtual void ClearOwner() override;
private:
// Owner of child windows.
diff --git a/ui/views/controls/menu/menu_message_loop_mac.h b/ui/views/controls/menu/menu_message_loop_mac.h
index b77d263..5508e7d 100644
--- a/ui/views/controls/menu/menu_message_loop_mac.h
+++ b/ui/views/controls/menu/menu_message_loop_mac.h
@@ -18,13 +18,13 @@
// Overridden from MenuMessageLoop:
virtual void Run(MenuController* controller,
Widget* owner,
- bool nested_menu) OVERRIDE;
- virtual bool ShouldQuitNow() const OVERRIDE;
- virtual void QuitNow() OVERRIDE;
+ bool nested_menu) override;
+ virtual bool ShouldQuitNow() const override;
+ virtual void QuitNow() override;
virtual void RepostEventToWindow(const ui::LocatedEvent& event,
gfx::NativeWindow window,
- const gfx::Point& screen_loc) OVERRIDE;
- virtual void ClearOwner() OVERRIDE;
+ const gfx::Point& screen_loc) override;
+ virtual void ClearOwner() override;
private:
DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopMac);
diff --git a/ui/views/controls/menu/menu_message_pump_dispatcher_win.h b/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
index 31f1b36..9f84171 100644
--- a/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
+++ b/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
@@ -23,7 +23,7 @@
private:
// base::MessagePumpDispatcher:
- virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE;
+ virtual uint32_t Dispatch(const base::NativeEvent& event) override;
MenuController* menu_controller_;
diff --git a/ui/views/controls/menu/menu_model_adapter.h b/ui/views/controls/menu/menu_model_adapter.h
index 353d010..54ce037 100644
--- a/ui/views/controls/menu/menu_model_adapter.h
+++ b/ui/views/controls/menu/menu_model_adapter.h
@@ -62,20 +62,20 @@
int index);
// views::MenuDelegate implementation.
- virtual void ExecuteCommand(int id) OVERRIDE;
- virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE;
+ virtual void ExecuteCommand(int id) override;
+ virtual void ExecuteCommand(int id, int mouse_event_flags) override;
virtual bool IsTriggerableEvent(MenuItemView* source,
- const ui::Event& e) OVERRIDE;
+ const ui::Event& e) override;
virtual bool GetAccelerator(int id,
- ui::Accelerator* accelerator) const OVERRIDE;
- virtual base::string16 GetLabel(int id) const OVERRIDE;
- virtual const gfx::FontList* GetLabelFontList(int id) const OVERRIDE;
- virtual bool IsCommandEnabled(int id) const OVERRIDE;
- virtual bool IsCommandVisible(int id) const OVERRIDE;
- virtual bool IsItemChecked(int id) const OVERRIDE;
- virtual void SelectionChanged(MenuItemView* menu) OVERRIDE;
- virtual void WillShowMenu(MenuItemView* menu) OVERRIDE;
- virtual void WillHideMenu(MenuItemView* menu) OVERRIDE;
+ ui::Accelerator* accelerator) const override;
+ virtual base::string16 GetLabel(int id) const override;
+ virtual const gfx::FontList* GetLabelFontList(int id) const override;
+ virtual bool IsCommandEnabled(int id) const override;
+ virtual bool IsCommandVisible(int id) const override;
+ virtual bool IsItemChecked(int id) const override;
+ virtual void SelectionChanged(MenuItemView* menu) override;
+ virtual void WillShowMenu(MenuItemView* menu) override;
+ virtual void WillHideMenu(MenuItemView* menu) override;
private:
// Implementation of BuildMenu().
diff --git a/ui/views/controls/menu/menu_model_adapter_unittest.cc b/ui/views/controls/menu/menu_model_adapter_unittest.cc
index b3c4735..b98fba0 100644
--- a/ui/views/controls/menu/menu_model_adapter_unittest.cc
+++ b/ui/views/controls/menu/menu_model_adapter_unittest.cc
@@ -30,95 +30,95 @@
// ui::MenuModel implementation:
- virtual bool HasIcons() const OVERRIDE {
+ virtual bool HasIcons() const override {
return false;
}
- virtual int GetItemCount() const OVERRIDE {
+ virtual int GetItemCount() const override {
return static_cast<int>(items_.size());
}
- virtual ItemType GetTypeAt(int index) const OVERRIDE {
+ virtual ItemType GetTypeAt(int index) const override {
return items_[index].type;
}
virtual ui::MenuSeparatorType GetSeparatorTypeAt(
- int index) const OVERRIDE {
+ int index) const override {
return ui::NORMAL_SEPARATOR;
}
- virtual int GetCommandIdAt(int index) const OVERRIDE {
+ virtual int GetCommandIdAt(int index) const override {
return index + command_id_base_;
}
- virtual base::string16 GetLabelAt(int index) const OVERRIDE {
+ virtual base::string16 GetLabelAt(int index) const override {
return items_[index].label;
}
- virtual bool IsItemDynamicAt(int index) const OVERRIDE {
+ virtual bool IsItemDynamicAt(int index) const override {
return false;
}
- virtual const gfx::FontList* GetLabelFontListAt(int index) const OVERRIDE {
+ virtual const gfx::FontList* GetLabelFontListAt(int index) const override {
return NULL;
}
virtual bool GetAcceleratorAt(int index,
- ui::Accelerator* accelerator) const OVERRIDE {
+ ui::Accelerator* accelerator) const override {
return false;
}
- virtual bool IsItemCheckedAt(int index) const OVERRIDE {
+ virtual bool IsItemCheckedAt(int index) const override {
return false;
}
- virtual int GetGroupIdAt(int index) const OVERRIDE {
+ virtual int GetGroupIdAt(int index) const override {
return 0;
}
- virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE {
+ virtual bool GetIconAt(int index, gfx::Image* icon) override {
return false;
}
virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(
- int index) const OVERRIDE {
+ int index) const override {
return NULL;
}
- virtual bool IsEnabledAt(int index) const OVERRIDE {
+ virtual bool IsEnabledAt(int index) const override {
return true;
}
- virtual bool IsVisibleAt(int index) const OVERRIDE {
+ virtual bool IsVisibleAt(int index) const override {
return true;
}
- virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE {
+ virtual MenuModel* GetSubmenuModelAt(int index) const override {
return items_[index].submenu;
}
- virtual void HighlightChangedTo(int index) OVERRIDE {
+ virtual void HighlightChangedTo(int index) override {
}
- virtual void ActivatedAt(int index) OVERRIDE {
+ virtual void ActivatedAt(int index) override {
set_last_activation(index);
}
- virtual void ActivatedAt(int index, int event_flags) OVERRIDE {
+ virtual void ActivatedAt(int index, int event_flags) override {
ActivatedAt(index);
}
- virtual void MenuWillShow() OVERRIDE {
+ virtual void MenuWillShow() override {
}
- virtual void MenuClosed() OVERRIDE {
+ virtual void MenuClosed() override {
}
virtual void SetMenuModelDelegate(
- ui::MenuModelDelegate* delegate) OVERRIDE {
+ ui::MenuModelDelegate* delegate) override {
}
- virtual ui::MenuModelDelegate* GetMenuModelDelegate() const OVERRIDE {
+ virtual ui::MenuModelDelegate* GetMenuModelDelegate() const override {
return NULL;
}
diff --git a/ui/views/controls/menu/menu_runner_cocoa_unittest.mm b/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
index b43c6e8..bfd5723 100644
--- a/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
+++ b/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
@@ -17,7 +17,7 @@
MenuRunnerCocoaTest() : runner_(NULL) {}
virtual ~MenuRunnerCocoaTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
menu_.reset(new ui::SimpleMenuModel(NULL));
@@ -27,7 +27,7 @@
EXPECT_FALSE(runner_->IsRunning());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
if (runner_) {
runner_->Release();
runner_ = NULL;
diff --git a/ui/views/controls/menu/menu_runner_impl.h b/ui/views/controls/menu/menu_runner_impl.h
index 9df132a..910f4b7 100644
--- a/ui/views/controls/menu/menu_runner_impl.h
+++ b/ui/views/controls/menu/menu_runner_impl.h
@@ -27,19 +27,19 @@
public:
explicit MenuRunnerImpl(MenuItemView* menu);
- virtual bool IsRunning() const OVERRIDE;
- virtual void Release() OVERRIDE;
+ virtual bool IsRunning() const override;
+ virtual void Release() override;
virtual MenuRunner::RunResult RunMenuAt(Widget* parent,
MenuButton* button,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
- int32 run_types) OVERRIDE;
- virtual void Cancel() OVERRIDE;
- virtual base::TimeDelta GetClosingEventTime() const OVERRIDE;
+ int32 run_types) override;
+ virtual void Cancel() override;
+ virtual base::TimeDelta GetClosingEventTime() const override;
// MenuControllerDelegate:
- virtual void DropMenuClosed(NotifyType type, MenuItemView* menu) OVERRIDE;
- virtual void SiblingMenuCreated(MenuItemView* menu) OVERRIDE;
+ virtual void DropMenuClosed(NotifyType type, MenuItemView* menu) override;
+ virtual void SiblingMenuCreated(MenuItemView* menu) override;
private:
virtual ~MenuRunnerImpl();
diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.h b/ui/views/controls/menu/menu_runner_impl_adapter.h
index 3708de2..eba68c4 100644
--- a/ui/views/controls/menu/menu_runner_impl_adapter.h
+++ b/ui/views/controls/menu/menu_runner_impl_adapter.h
@@ -18,15 +18,15 @@
explicit MenuRunnerImplAdapter(ui::MenuModel* menu_model);
// MenuRunnerImplInterface:
- virtual bool IsRunning() const OVERRIDE;
- virtual void Release() OVERRIDE;
+ virtual bool IsRunning() const override;
+ virtual void Release() override;
virtual MenuRunner::RunResult RunMenuAt(Widget* parent,
MenuButton* button,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
- int32 types) OVERRIDE;
- virtual void Cancel() OVERRIDE;
- virtual base::TimeDelta GetClosingEventTime() const OVERRIDE;
+ int32 types) override;
+ virtual void Cancel() override;
+ virtual base::TimeDelta GetClosingEventTime() const override;
private:
virtual ~MenuRunnerImplAdapter();
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h
index a24c081..831d322 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.h
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h
@@ -20,15 +20,15 @@
public:
explicit MenuRunnerImplCocoa(ui::MenuModel* menu);
- virtual bool IsRunning() const OVERRIDE;
- virtual void Release() OVERRIDE;
+ virtual bool IsRunning() const override;
+ virtual void Release() override;
virtual MenuRunner::RunResult RunMenuAt(Widget* parent,
MenuButton* button,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
- int32 run_types) OVERRIDE;
- virtual void Cancel() OVERRIDE;
- virtual base::TimeDelta GetClosingEventTime() const OVERRIDE;
+ int32 run_types) override;
+ virtual void Cancel() override;
+ virtual base::TimeDelta GetClosingEventTime() const override;
private:
virtual ~MenuRunnerImplCocoa();
diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
index 451bd15..2d3db74 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
@@ -40,37 +40,37 @@
pref_height_(MenuItemView::pref_menu_height()) {
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(
host_->GetMenuItem()->GetMenuConfig().scroll_arrow_height * 2 - 1,
pref_height_);
}
- virtual bool CanDrop(const OSExchangeData& data) OVERRIDE {
+ virtual bool CanDrop(const OSExchangeData& data) override {
DCHECK(host_->GetMenuItem()->GetMenuController());
return true; // Always return true so that drop events are targeted to us.
}
- virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE {
+ virtual void OnDragEntered(const ui::DropTargetEvent& event) override {
DCHECK(host_->GetMenuItem()->GetMenuController());
host_->GetMenuItem()->GetMenuController()->OnDragEnteredScrollButton(
host_, is_up_);
}
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE {
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override {
return ui::DragDropTypes::DRAG_NONE;
}
- virtual void OnDragExited() OVERRIDE {
+ virtual void OnDragExited() override {
DCHECK(host_->GetMenuItem()->GetMenuController());
host_->GetMenuItem()->GetMenuController()->OnDragExitedScrollButton(host_);
}
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE {
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) override {
return ui::DragDropTypes::DRAG_NONE;
}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
const MenuConfig& config = host_->GetMenuItem()->GetMenuConfig();
// The background.
@@ -139,7 +139,7 @@
AddChildView(child);
}
- virtual void ScrollRectToVisible(const gfx::Rect& rect) OVERRIDE {
+ virtual void ScrollRectToVisible(const gfx::Rect& rect) override {
// NOTE: this assumes we only want to scroll in the y direction.
// If the rect is already visible, do not scroll.
diff --git a/ui/views/controls/menu/menu_scroll_view_container.h b/ui/views/controls/menu/menu_scroll_view_container.h
index dc7c1ac..fb0c2ff 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.h
+++ b/ui/views/controls/menu/menu_scroll_view_container.h
@@ -31,14 +31,14 @@
void SetBubbleArrowOffset(int offset);
// View overrides.
- virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void OnPaintBackground(gfx::Canvas* canvas) override;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
protected:
// View override.
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
private:
// Create the default border.
diff --git a/ui/views/controls/menu/menu_separator.h b/ui/views/controls/menu/menu_separator.h
index 93bf3d4..feb629a 100644
--- a/ui/views/controls/menu/menu_separator.h
+++ b/ui/views/controls/menu/menu_separator.h
@@ -20,8 +20,8 @@
parent_menu_item_(parent) {}
// View overrides.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual gfx::Size GetPreferredSize() const override;
private:
// Gets the bounds where the separator should be painted.
diff --git a/ui/views/controls/menu/native_menu_win.h b/ui/views/controls/menu/native_menu_win.h
index ce3a072..39dc37e 100644
--- a/ui/views/controls/menu/native_menu_win.h
+++ b/ui/views/controls/menu/native_menu_win.h
@@ -33,15 +33,15 @@
virtual ~NativeMenuWin();
// Overridden from MenuWrapper:
- virtual void RunMenuAt(const gfx::Point& point, int alignment) OVERRIDE;
- virtual void CancelMenu() OVERRIDE;
- virtual void Rebuild(MenuInsertionDelegateWin* delegate) OVERRIDE;
- virtual void UpdateStates() OVERRIDE;
- virtual HMENU GetNativeMenu() const OVERRIDE;
- virtual MenuAction GetMenuAction() const OVERRIDE;
- virtual void AddMenuListener(MenuListener* listener) OVERRIDE;
- virtual void RemoveMenuListener(MenuListener* listener) OVERRIDE;
- virtual void SetMinimumWidth(int width) OVERRIDE;
+ virtual void RunMenuAt(const gfx::Point& point, int alignment) override;
+ virtual void CancelMenu() override;
+ virtual void Rebuild(MenuInsertionDelegateWin* delegate) override;
+ virtual void UpdateStates() override;
+ virtual HMENU GetNativeMenu() const override;
+ virtual MenuAction GetMenuAction() const override;
+ virtual void AddMenuListener(MenuListener* listener) override;
+ virtual void RemoveMenuListener(MenuListener* listener) override;
+ virtual void SetMinimumWidth(int width) override;
private:
// IMPORTANT: Note about indices.
diff --git a/ui/views/controls/menu/submenu_view.h b/ui/views/controls/menu/submenu_view.h
index 1b7d362..c475988 100644
--- a/ui/views/controls/menu/submenu_view.h
+++ b/ui/views/controls/menu/submenu_view.h
@@ -54,40 +54,40 @@
// Positions and sizes the child views. This tiles the views vertically,
// giving each child the available width.
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
// Override from View.
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual ui::TextInputClient* GetTextInputClient() override;
// Painting.
virtual void PaintChildren(gfx::Canvas* canvas,
- const views::CullSet& cull_view) OVERRIDE;
+ const views::CullSet& cull_view) override;
// Drag and drop methods. These are forwarded to the MenuController.
virtual bool GetDropFormats(
int* formats,
- std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
- virtual bool AreDropTypesRequired() OVERRIDE;
- virtual bool CanDrop(const OSExchangeData& data) OVERRIDE;
- virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE;
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
- virtual void OnDragExited() OVERRIDE;
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
+ std::set<OSExchangeData::CustomFormat>* custom_formats) override;
+ virtual bool AreDropTypesRequired() override;
+ virtual bool CanDrop(const OSExchangeData& data) override;
+ virtual void OnDragEntered(const ui::DropTargetEvent& event) override;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override;
+ virtual void OnDragExited() override;
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) override;
// Scrolls on menu item boundaries.
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) override;
// Overridden from ui::EventHandler.
// Scrolls on menu item boundaries.
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from PrefixDelegate.
- virtual int GetRowCount() OVERRIDE;
- virtual int GetSelectedRow() OVERRIDE;
- virtual void SetSelectedRow(int row) OVERRIDE;
- virtual base::string16 GetTextForRow(int row) OVERRIDE;
+ virtual int GetRowCount() override;
+ virtual int GetSelectedRow() override;
+ virtual void SetSelectedRow(int row) override;
+ virtual base::string16 GetTextForRow(int row) override;
// Returns true if the menu is showing.
bool IsShowing();
@@ -118,7 +118,7 @@
void ReleaseCapture();
// Overriden from View to prevent tab from doing anything.
- virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) OVERRIDE;
+ virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override;
// Returns the parent menu item we're showing children for.
MenuItemView* GetMenuItem() const;
@@ -158,13 +158,13 @@
protected:
// Overridden from View:
- virtual const char* GetClassName() const OVERRIDE;
+ virtual const char* GetClassName() const override;
// View method. Overridden to schedule a paint. We do this so that when
// scrolling occurs, everything is repainted correctly.
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
private:
// Paints the drop indicator. This is only invoked if item is non-NULL and
@@ -181,7 +181,7 @@
MenuDelegate::DropPosition position);
// Implementation of ScrollDelegate
- virtual bool OnScroll(float dx, float dy) OVERRIDE;
+ virtual bool OnScroll(float dx, float dy) override;
// Parent menu item.
MenuItemView* parent_menu_item_;
diff --git a/ui/views/controls/message_box_view.h b/ui/views/controls/message_box_view.h
index b56b3d1..9123995 100644
--- a/ui/views/controls/message_box_view.h
+++ b/ui/views/controls/message_box_view.h
@@ -74,14 +74,14 @@
void SetLink(const base::string16& text, LinkListener* listener);
// View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
protected:
// View:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
// Handles Ctrl-C and writes the message in the system clipboard.
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
private:
// Sets up the layout manager and initializes the message labels and prompt
diff --git a/ui/views/controls/native/native_view_host.h b/ui/views/controls/native/native_view_host.h
index 6c1890b..db8d7bb 100644
--- a/ui/views/controls/native/native_view_host.h
+++ b/ui/views/controls/native/native_view_host.h
@@ -79,20 +79,20 @@
void NativeViewDestroyed();
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void VisibilityChanged(View* starting_from, bool is_visible) override;
+ virtual void OnFocus() override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
protected:
- virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const OVERRIDE;
- virtual void OnVisibleBoundsChanged() OVERRIDE;
+ virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const override;
+ virtual void OnVisibleBoundsChanged() override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual const char* GetClassName() const override;
private:
friend class test::NativeViewHostTestBase;
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index 3b36b98..75c281f 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -26,20 +26,20 @@
native_view_ = native_view;
}
- virtual gfx::Size GetMinimumSize() const OVERRIDE { return gfx::Size(); }
- virtual gfx::Size GetMaximumSize() const OVERRIDE { return gfx::Size(); }
+ virtual gfx::Size GetMinimumSize() const override { return gfx::Size(); }
+ virtual gfx::Size GetMaximumSize() const override { return gfx::Size(); }
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
+ const gfx::Rect& new_bounds) override {}
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override {
return gfx::kNullCursor;
}
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
+ virtual int GetNonClientComponent(const gfx::Point& point) const override {
return HTCLIENT;
}
virtual bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) OVERRIDE { return true; }
- virtual bool CanFocus() OVERRIDE {
+ const gfx::Point& location) override { return true; }
+ virtual bool CanFocus() override {
// Ask the hosted native view's delegate because directly calling
// aura::Window::CanFocus() will call back into this when checking whether
// parents can focus.
@@ -47,14 +47,14 @@
? native_view_->delegate()->CanFocus()
: true;
}
- virtual void OnCaptureLost() OVERRIDE {}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {}
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {}
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {}
- virtual bool HasHitTestMask() const OVERRIDE { return false; }
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
+ virtual void OnCaptureLost() override {}
+ virtual void OnPaint(gfx::Canvas* canvas) override {}
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
+ virtual void OnWindowDestroying(aura::Window* window) override {}
+ virtual void OnWindowDestroyed(aura::Window* window) override {}
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override {}
+ virtual bool HasHitTestMask() const override { return false; }
+ virtual void GetHitTestMask(gfx::Path* mask) const override {}
private:
aura::Window* native_view_;
diff --git a/ui/views/controls/native/native_view_host_aura.h b/ui/views/controls/native/native_view_host_aura.h
index 05c03d5..149bb41 100644
--- a/ui/views/controls/native/native_view_host_aura.h
+++ b/ui/views/controls/native/native_view_host_aura.h
@@ -24,18 +24,18 @@
virtual ~NativeViewHostAura();
// Overridden from NativeViewHostWrapper:
- virtual void AttachNativeView() OVERRIDE;
- virtual void NativeViewDetaching(bool destroyed) OVERRIDE;
- virtual void AddedToWidget() OVERRIDE;
- virtual void RemovedFromWidget() OVERRIDE;
- virtual void InstallClip(int x, int y, int w, int h) OVERRIDE;
- virtual bool HasInstalledClip() OVERRIDE;
- virtual void UninstallClip() OVERRIDE;
- virtual void ShowWidget(int x, int y, int w, int h) OVERRIDE;
- virtual void HideWidget() OVERRIDE;
- virtual void SetFocus() OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual gfx::NativeCursor GetCursor(int x, int y) OVERRIDE;
+ virtual void AttachNativeView() override;
+ virtual void NativeViewDetaching(bool destroyed) override;
+ virtual void AddedToWidget() override;
+ virtual void RemovedFromWidget() override;
+ virtual void InstallClip(int x, int y, int w, int h) override;
+ virtual bool HasInstalledClip() override;
+ virtual void UninstallClip() override;
+ virtual void ShowWidget(int x, int y, int w, int h) override;
+ virtual void HideWidget() override;
+ virtual void SetFocus() override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ virtual gfx::NativeCursor GetCursor(int x, int y) override;
private:
friend class NativeViewHostAuraTest;
@@ -43,8 +43,8 @@
class ClippingWindowDelegate;
// Overridden from aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
// Reparents the native view with the clipping window existing between it and
// its old parent, so that the fast resize path works.
diff --git a/ui/views/controls/native/native_view_host_aura_unittest.cc b/ui/views/controls/native/native_view_host_aura_unittest.cc
index 27ce142..1a40ab7 100644
--- a/ui/views/controls/native/native_view_host_aura_unittest.cc
+++ b/ui/views/controls/native/native_view_host_aura_unittest.cc
@@ -45,7 +45,7 @@
// aura::WindowObserver overrides
virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE {
+ bool visible) override {
EventDetails event;
event.type = visible ? EVENT_SHOWN : EVENT_HIDDEN;
event.window = window;
@@ -59,7 +59,7 @@
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
EventDetails event;
event.type = EVENT_BOUNDS_CHANGED;
event.window = window;
diff --git a/ui/views/controls/native/native_view_host_mac.h b/ui/views/controls/native/native_view_host_mac.h
index c15ce44..6880170 100644
--- a/ui/views/controls/native/native_view_host_mac.h
+++ b/ui/views/controls/native/native_view_host_mac.h
@@ -20,18 +20,18 @@
virtual ~NativeViewHostMac();
// Overridden from NativeViewHostWrapper:
- virtual void AttachNativeView() OVERRIDE;
- virtual void NativeViewDetaching(bool destroyed) OVERRIDE;
- virtual void AddedToWidget() OVERRIDE;
- virtual void RemovedFromWidget() OVERRIDE;
- virtual void InstallClip(int x, int y, int w, int h) OVERRIDE;
- virtual bool HasInstalledClip() OVERRIDE;
- virtual void UninstallClip() OVERRIDE;
- virtual void ShowWidget(int x, int y, int w, int h) OVERRIDE;
- virtual void HideWidget() OVERRIDE;
- virtual void SetFocus() OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual gfx::NativeCursor GetCursor(int x, int y) OVERRIDE;
+ virtual void AttachNativeView() override;
+ virtual void NativeViewDetaching(bool destroyed) override;
+ virtual void AddedToWidget() override;
+ virtual void RemovedFromWidget() override;
+ virtual void InstallClip(int x, int y, int w, int h) override;
+ virtual bool HasInstalledClip() override;
+ virtual void UninstallClip() override;
+ virtual void ShowWidget(int x, int y, int w, int h) override;
+ virtual void HideWidget() override;
+ virtual void SetFocus() override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ virtual gfx::NativeCursor GetCursor(int x, int y) override;
private:
// Our associated NativeViewHost. Owns this.
diff --git a/ui/views/controls/native/native_view_host_unittest.cc b/ui/views/controls/native/native_view_host_unittest.cc
index 4fa9a75..d5fb543 100644
--- a/ui/views/controls/native/native_view_host_unittest.cc
+++ b/ui/views/controls/native/native_view_host_unittest.cc
@@ -18,7 +18,7 @@
NativeViewHostTest() {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
CreateTopLevel();
}
@@ -43,7 +43,7 @@
int notification_count() const { return notification_count_; }
// Overriden from View:
- virtual void NativeViewHierarchyChanged() OVERRIDE {
+ virtual void NativeViewHierarchyChanged() override {
++notification_count_;
View::NativeViewHierarchyChanged();
}
@@ -74,7 +74,7 @@
// Overriden from NativeViewHost:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
+ const ViewHierarchyChangedDetails& details) override {
gfx::NativeView parent_before = native_view() ?
GetNativeParent(native_view()) : NULL;
NativeViewHost::ViewHierarchyChanged(details);
diff --git a/ui/views/controls/prefix_selector.h b/ui/views/controls/prefix_selector.h
index 255046f..615f239 100644
--- a/ui/views/controls/prefix_selector.h
+++ b/ui/views/controls/prefix_selector.h
@@ -26,37 +26,37 @@
// ui::TextInputClient:
virtual void SetCompositionText(
- const ui::CompositionText& composition) OVERRIDE;
- virtual void ConfirmCompositionText() OVERRIDE;
- virtual void ClearCompositionText() OVERRIDE;
- virtual void InsertText(const base::string16& text) OVERRIDE;
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE;
- virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
- virtual ui::TextInputType GetTextInputType() const OVERRIDE;
- virtual ui::TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual gfx::Rect GetCaretBounds() const OVERRIDE;
+ const ui::CompositionText& composition) override;
+ virtual void ConfirmCompositionText() override;
+ virtual void ClearCompositionText() override;
+ virtual void InsertText(const base::string16& text) override;
+ virtual void InsertChar(base::char16 ch, int flags) override;
+ virtual gfx::NativeWindow GetAttachedWindow() const override;
+ virtual ui::TextInputType GetTextInputType() const override;
+ virtual ui::TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual gfx::Rect GetCaretBounds() const override;
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE;
- virtual bool HasCompositionText() const OVERRIDE;
- virtual bool GetTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE;
- virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE;
- virtual bool DeleteRange(const gfx::Range& range) OVERRIDE;
+ gfx::Rect* rect) const override;
+ virtual bool HasCompositionText() const override;
+ virtual bool GetTextRange(gfx::Range* range) const override;
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override;
+ virtual bool GetSelectionRange(gfx::Range* range) const override;
+ virtual bool SetSelectionRange(const gfx::Range& range) override;
+ virtual bool DeleteRange(const gfx::Range& range) override;
virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const OVERRIDE;
- virtual void OnInputMethodChanged() OVERRIDE;
+ base::string16* text) const override;
+ virtual void OnInputMethodChanged() override;
virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) OVERRIDE;
- virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE;
- virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void OnCandidateWindowShown() OVERRIDE;
- virtual void OnCandidateWindowUpdated() OVERRIDE;
- virtual void OnCandidateWindowHidden() OVERRIDE;
+ base::i18n::TextDirection direction) override;
+ virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
+ virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
+ virtual void OnCandidateWindowShown() override;
+ virtual void OnCandidateWindowUpdated() override;
+ virtual void OnCandidateWindowHidden() override;
- virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE;
- virtual void ExecuteEditingCommand(int command_id) OVERRIDE;
+ virtual bool IsEditingCommandEnabled(int command_id) override;
+ virtual void ExecuteEditingCommand(int command_id) override;
private:
// Invoked when text is typed. Tries to change the selection appropriately.
diff --git a/ui/views/controls/prefix_selector_unittest.cc b/ui/views/controls/prefix_selector_unittest.cc
index 031c007..ce04180 100644
--- a/ui/views/controls/prefix_selector_unittest.cc
+++ b/ui/views/controls/prefix_selector_unittest.cc
@@ -26,19 +26,19 @@
virtual ~TestPrefixDelegate() {}
- virtual int GetRowCount() OVERRIDE {
+ virtual int GetRowCount() override {
return static_cast<int>(rows_.size());
}
- virtual int GetSelectedRow() OVERRIDE {
+ virtual int GetSelectedRow() override {
return selected_row_;
}
- virtual void SetSelectedRow(int row) OVERRIDE {
+ virtual void SetSelectedRow(int row) override {
selected_row_ = row;
}
- virtual base::string16 GetTextForRow(int row) OVERRIDE {
+ virtual base::string16 GetTextForRow(int row) override {
return rows_[row];
}
diff --git a/ui/views/controls/progress_bar.h b/ui/views/controls/progress_bar.h
index b6d3851..e844d2f 100644
--- a/ui/views/controls/progress_bar.h
+++ b/ui/views/controls/progress_bar.h
@@ -39,16 +39,16 @@
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ base::string16* tooltip) const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
private:
static const char kViewClassName[];
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// Inclusive range used when displaying values.
double min_display_value_;
diff --git a/ui/views/controls/resize_area.h b/ui/views/controls/resize_area.h
index 12ec310..661c2b6 100644
--- a/ui/views/controls/resize_area.h
+++ b/ui/views/controls/resize_area.h
@@ -26,13 +26,13 @@
virtual ~ResizeArea();
// Overridden from views::View:
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
private:
// Report the amount the user resized by to the delegate, accounting for
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
index d12c73b..8a05f92 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -24,7 +24,7 @@
ScrollViewWithBorder() {}
// View overrides;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE {
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override {
SetBorder(Border::CreateSolidBorder(
1,
theme->GetSystemColor(ui::NativeTheme::kColorId_UnfocusedBorderColor)));
@@ -38,7 +38,7 @@
public:
ScrollCornerView() {}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
ui::NativeTheme::ExtraParams ignored;
GetNativeTheme()->Paint(canvas->sk_canvas(),
ui::NativeTheme::kScrollbarCorner,
@@ -96,11 +96,11 @@
Viewport() {}
virtual ~Viewport() {}
- virtual const char* GetClassName() const OVERRIDE {
+ virtual const char* GetClassName() const override {
return "ScrollView::Viewport";
}
- virtual void ScrollRectToVisible(const gfx::Rect& rect) OVERRIDE {
+ virtual void ScrollRectToVisible(const gfx::Rect& rect) override {
if (!has_children() || !parent())
return;
@@ -111,7 +111,7 @@
scroll_rect);
}
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE {
+ virtual void ChildPreferredSizeChanged(View* child) override {
if (parent())
parent()->Layout();
}
diff --git a/ui/views/controls/scroll_view.h b/ui/views/controls/scroll_view.h
index f6e8564..4dfcdfc 100644
--- a/ui/views/controls/scroll_view.h
+++ b/ui/views/controls/scroll_view.h
@@ -75,21 +75,21 @@
void SetVerticalScrollBar(ScrollBar* vert_sb);
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual int GetHeightForWidth(int width) const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual int GetHeightForWidth(int width) const override;
+ virtual void Layout() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual const char* GetClassName() const override;
// ScrollBarController overrides:
- virtual void ScrollToPosition(ScrollBar* source, int position) OVERRIDE;
+ virtual void ScrollToPosition(ScrollBar* source, int position) override;
virtual int GetScrollIncrement(ScrollBar* source,
bool is_page,
- bool is_positive) OVERRIDE;
+ bool is_positive) override;
private:
FRIEND_TEST_ALL_PREFIXES(ScrollViewTest, CornerViewVisibility);
@@ -211,7 +211,7 @@
protected:
// Calculates the bounds of the row from the top margin and row height.
- virtual RowInfo GetRowInfo(int y) OVERRIDE;
+ virtual RowInfo GetRowInfo(int y) override;
private:
int top_margin_;
diff --git a/ui/views/controls/scroll_view_unittest.cc b/ui/views/controls/scroll_view_unittest.cc
index a2cba6f..9baa4d3 100644
--- a/ui/views/controls/scroll_view_unittest.cc
+++ b/ui/views/controls/scroll_view_unittest.cc
@@ -26,11 +26,11 @@
PreferredSizeChanged();
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return preferred_size_;
}
- virtual void Layout() OVERRIDE {
+ virtual void Layout() override {
gfx::Size pref = GetPreferredSize();
int width = pref.width();
int height = pref.height();
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.h b/ui/views/controls/scrollbar/base_scroll_bar.h
index 068ad4d..b68e22a 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.h
+++ b/ui/views/controls/scrollbar/base_scroll_bar.h
@@ -64,42 +64,42 @@
CustomButton::ButtonState new_state);
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE = 0;
- virtual void Layout() OVERRIDE = 0;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override = 0;
+ virtual void Layout() override = 0;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
// ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// ScrollBar overrides:
virtual void Update(int viewport_size,
int content_size,
- int contents_scroll_offset) OVERRIDE;
- virtual int GetLayoutSize() const OVERRIDE = 0;
- virtual int GetPosition() const OVERRIDE;
+ int contents_scroll_offset) override;
+ virtual int GetLayoutSize() const override = 0;
+ virtual int GetPosition() const override;
// ScrollDelegate overrides:
- virtual bool OnScroll(float dx, float dy) OVERRIDE;
+ virtual bool OnScroll(float dx, float dy) override;
// ContextMenuController overrides:
virtual void ShowContextMenuForView(View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
// Menu::Delegate overrides:
- virtual base::string16 GetLabel(int id) const OVERRIDE;
- virtual bool IsCommandEnabled(int id) const OVERRIDE;
- virtual void ExecuteCommand(int id) OVERRIDE;
+ virtual base::string16 GetLabel(int id) const override;
+ virtual bool IsCommandEnabled(int id) const override;
+ virtual void ExecuteCommand(int id) override;
protected:
// View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0;
+ virtual void OnPaint(gfx::Canvas* canvas) override = 0;
BaseScrollBarThumb* GetThumb() const;
CustomButton::ButtonState GetThumbTrackState() const;
diff --git a/ui/views/controls/scrollbar/base_scroll_bar_button.h b/ui/views/controls/scrollbar/base_scroll_bar_button.h
index b154d1e..b264e6d 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar_button.h
+++ b/ui/views/controls/scrollbar/base_scroll_bar_button.h
@@ -30,9 +30,9 @@
virtual ~BaseScrollBarButton();
protected:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
private:
void RepeaterNotifyClick();
diff --git a/ui/views/controls/scrollbar/base_scroll_bar_thumb.h b/ui/views/controls/scrollbar/base_scroll_bar_thumb.h
index c755441..5e9dbc6 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar_thumb.h
+++ b/ui/views/controls/scrollbar/base_scroll_bar_thumb.h
@@ -44,17 +44,17 @@
int GetPosition() const;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE = 0;
+ virtual gfx::Size GetPreferredSize() const override = 0;
protected:
// View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override = 0;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
CustomButton::ButtonState GetState() const;
// Update our state and schedule a repaint when the mouse moves over us.
diff --git a/ui/views/controls/scrollbar/kennedy_scroll_bar.cc b/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
index b3d1e6a..13a7823 100644
--- a/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
@@ -28,8 +28,8 @@
protected:
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
DISALLOW_COPY_AND_ASSIGN(KennedyScrollBarThumb);
diff --git a/ui/views/controls/scrollbar/kennedy_scroll_bar.h b/ui/views/controls/scrollbar/kennedy_scroll_bar.h
index ace3fae..bd67a05 100644
--- a/ui/views/controls/scrollbar/kennedy_scroll_bar.h
+++ b/ui/views/controls/scrollbar/kennedy_scroll_bar.h
@@ -19,15 +19,15 @@
protected:
// BaseScrollBar overrides:
- virtual gfx::Rect GetTrackBounds() const OVERRIDE;
+ virtual gfx::Rect GetTrackBounds() const override;
// ScrollBar overrides:
- virtual int GetLayoutSize() const OVERRIDE;
+ virtual int GetLayoutSize() const override;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
DISALLOW_COPY_AND_ASSIGN(KennedyScrollBar);
diff --git a/ui/views/controls/scrollbar/native_scroll_bar.h b/ui/views/controls/scrollbar/native_scroll_bar.h
index 058784d..8536111 100644
--- a/ui/views/controls/scrollbar/native_scroll_bar.h
+++ b/ui/views/controls/scrollbar/native_scroll_bar.h
@@ -40,25 +40,25 @@
FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, Scrolling);
// Overridden from View.
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual const char* GetClassName() const override;
// Overrideen from View for keyboard UI purpose.
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) override;
// Overridden from ui::EventHandler.
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from ScrollBar.
virtual void Update(int viewport_size,
int content_size,
- int current_pos) OVERRIDE;
- virtual int GetPosition() const OVERRIDE;
- virtual int GetLayoutSize() const OVERRIDE;
+ int current_pos) override;
+ virtual int GetPosition() const override;
+ virtual int GetLayoutSize() const override;
// init border
NativeScrollBarWrapper* native_wrapper_;
diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
index b4f83cc..4ffa8df 100644
--- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc
+++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
@@ -32,13 +32,13 @@
ScrollBarButton(ButtonListener* listener, Type type);
virtual ~ScrollBarButton();
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override {
return "ScrollBarButton";
}
protected:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
ui::NativeTheme::ExtraParams GetNativeThemeParams() const;
@@ -54,13 +54,13 @@
explicit ScrollBarThumb(BaseScrollBar* scroll_bar);
virtual ~ScrollBarThumb();
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override {
return "ScrollBarThumb";
}
protected:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
ui::NativeTheme::ExtraParams GetNativeThemeParams() const;
diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.h b/ui/views/controls/scrollbar/native_scroll_bar_views.h
index 38dbe0b..9dd6b6d 100644
--- a/ui/views/controls/scrollbar/native_scroll_bar_views.h
+++ b/ui/views/controls/scrollbar/native_scroll_bar_views.h
@@ -34,32 +34,32 @@
private:
// View overrides:
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
// ScrollBar overrides:
- virtual int GetLayoutSize() const OVERRIDE;
+ virtual int GetLayoutSize() const override;
// BaseScrollBar overrides:
- virtual void ScrollToPosition(int position) OVERRIDE;
- virtual int GetScrollIncrement(bool is_page, bool is_positive) OVERRIDE;
+ virtual void ScrollToPosition(int position) override;
+ virtual int GetScrollIncrement(bool is_page, bool is_positive) override;
// BaseButton::ButtonListener overrides:
virtual void ButtonPressed(Button* sender,
- const ui::Event& event) OVERRIDE;
+ const ui::Event& event) override;
// NativeScrollBarWrapper overrides:
- virtual int GetPosition() const OVERRIDE;
- virtual View* GetView() OVERRIDE;
+ virtual int GetPosition() const override;
+ virtual View* GetView() override;
virtual void Update(int viewport_size,
int content_size,
- int current_pos) OVERRIDE;
+ int current_pos) override;
// Returns the area for the track. This is the area of the scrollbar minus
// the size of the arrow buttons.
- virtual gfx::Rect GetTrackBounds() const OVERRIDE;
+ virtual gfx::Rect GetTrackBounds() const override;
// The NativeScrollBar we are bound to.
NativeScrollBar* native_scroll_bar_;
diff --git a/ui/views/controls/scrollbar/overlay_scroll_bar.cc b/ui/views/controls/scrollbar/overlay_scroll_bar.cc
index 1396bd1..ad54fd7 100644
--- a/ui/views/controls/scrollbar/overlay_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/overlay_scroll_bar.cc
@@ -30,11 +30,11 @@
protected:
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
private:
double animation_opacity_;
diff --git a/ui/views/controls/scrollbar/overlay_scroll_bar.h b/ui/views/controls/scrollbar/overlay_scroll_bar.h
index 428a277..20cb755 100644
--- a/ui/views/controls/scrollbar/overlay_scroll_bar.h
+++ b/ui/views/controls/scrollbar/overlay_scroll_bar.h
@@ -18,19 +18,19 @@
protected:
// BaseScrollBar overrides:
- virtual gfx::Rect GetTrackBounds() const OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual gfx::Rect GetTrackBounds() const override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// ScrollBar overrides:
- virtual int GetLayoutSize() const OVERRIDE;
- virtual int GetContentOverlapSize() const OVERRIDE;
- virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExitedScrollView(const ui::MouseEvent& event) OVERRIDE;
+ virtual int GetLayoutSize() const override;
+ virtual int GetContentOverlapSize() const override;
+ virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event) override;
+ virtual void OnMouseExitedScrollView(const ui::MouseEvent& event) override;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
gfx::SlideAnimation animation_;
diff --git a/ui/views/controls/scrollbar/scroll_bar.h b/ui/views/controls/scrollbar/scroll_bar.h
index c8a31c4..2a711d6 100644
--- a/ui/views/controls/scrollbar/scroll_bar.h
+++ b/ui/views/controls/scrollbar/scroll_bar.h
@@ -60,7 +60,7 @@
virtual ~ScrollBar();
// Overridden from View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// Returns whether this scrollbar is horizontal.
bool IsHorizontal() const;
diff --git a/ui/views/controls/scrollbar/scrollbar_unittest.cc b/ui/views/controls/scrollbar/scrollbar_unittest.cc
index c3c96df..295ac2c 100644
--- a/ui/views/controls/scrollbar/scrollbar_unittest.cc
+++ b/ui/views/controls/scrollbar/scrollbar_unittest.cc
@@ -17,14 +17,14 @@
virtual ~TestScrollBarController() {}
virtual void ScrollToPosition(views::ScrollBar* source,
- int position) OVERRIDE {
+ int position) override {
last_source = source;
last_position = position;
}
virtual int GetScrollIncrement(views::ScrollBar* source,
bool is_page,
- bool is_positive) OVERRIDE {
+ bool is_positive) override {
last_source = source;
last_is_page = is_page;
last_is_positive = is_positive;
diff --git a/ui/views/controls/separator.h b/ui/views/controls/separator.h
index 6f45f8c..7c964b7 100644
--- a/ui/views/controls/separator.h
+++ b/ui/views/controls/separator.h
@@ -28,11 +28,11 @@
virtual ~Separator();
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
virtual void Paint(gfx::Canvas* canvas,
- const views::CullSet& cull_set) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ const views::CullSet& cull_set) override;
+ virtual const char* GetClassName() const override;
private:
const Orientation orientation_;
diff --git a/ui/views/controls/single_split_view.h b/ui/views/controls/single_split_view.h
index c03c834..4581e40 100644
--- a/ui/views/controls/single_split_view.h
+++ b/ui/views/controls/single_split_view.h
@@ -31,17 +31,17 @@
Orientation orientation,
SingleSplitViewListener* listener);
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// SingleSplitView's preferred size is the sum of the preferred widths
// and the max of the heights.
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
// Overriden to return a resize cursor when over the divider.
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
Orientation orientation() const {
return is_horizontal_ ? HORIZONTAL_SPLIT : VERTICAL_SPLIT;
@@ -81,10 +81,10 @@
protected:
// View overrides.
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
private:
// This test calls OnMouse* functions.
diff --git a/ui/views/controls/single_split_view_unittest.cc b/ui/views/controls/single_split_view_unittest.cc
index cfea48e..ca48b9a 100644
--- a/ui/views/controls/single_split_view_unittest.cc
+++ b/ui/views/controls/single_split_view_unittest.cc
@@ -45,7 +45,7 @@
public:
SingleSplitViewListenerImpl() : count_(0) {}
- virtual bool SplitHandleMoved(views::SingleSplitView* sender) OVERRIDE {
+ virtual bool SplitHandleMoved(views::SingleSplitView* sender) override {
++count_;
return false;
}
@@ -64,7 +64,7 @@
private:
gfx::Size min_size_;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
};
gfx::Size MinimumSizedView::GetMinimumSize() const {
diff --git a/ui/views/controls/slide_out_view.h b/ui/views/controls/slide_out_view.h
index 04a8f8a..46b4135 100644
--- a/ui/views/controls/slide_out_view.h
+++ b/ui/views/controls/slide_out_view.h
@@ -23,7 +23,7 @@
virtual void OnSlideOut() = 0;
// Overridden from views::View.
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
private:
enum SlideDirection {
@@ -38,7 +38,7 @@
void SlideOutAndClose(SlideDirection direction);
// Overridden from ImplicitAnimationObserver.
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
float gesture_scroll_amount_;
diff --git a/ui/views/controls/slider.h b/ui/views/controls/slider.h
index 33a760b..e6a521a 100644
--- a/ui/views/controls/slider.h
+++ b/ui/views/controls/slider.h
@@ -94,21 +94,21 @@
void OnSliderDragEnded();
// views::View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
// ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationProgressed(const gfx::Animation* animation) override;
void set_listener(SliderListener* listener) {
listener_ = listener;
diff --git a/ui/views/controls/slider_unittest.cc b/ui/views/controls/slider_unittest.cc
index efa4112..23be9e9 100644
--- a/ui/views/controls/slider_unittest.cc
+++ b/ui/views/controls/slider_unittest.cc
@@ -56,9 +56,9 @@
virtual void SliderValueChanged(views::Slider* sender,
float value,
float old_value,
- views::SliderChangeReason reason) OVERRIDE;
- virtual void SliderDragStarted(views::Slider* sender) OVERRIDE;
- virtual void SliderDragEnded(views::Slider* sender) OVERRIDE;
+ views::SliderChangeReason reason) override;
+ virtual void SliderDragStarted(views::Slider* sender) override;
+ virtual void SliderDragEnded(views::Slider* sender) override;
private:
// The epoch of the last event.
@@ -143,8 +143,8 @@
virtual void ClickAt(int x, int y);
// testing::Test:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
ui::test::EventGenerator* event_generator() {
return event_generator_.get();
diff --git a/ui/views/controls/styled_label.h b/ui/views/controls/styled_label.h
index ce1004c..8382b8e 100644
--- a/ui/views/controls/styled_label.h
+++ b/ui/views/controls/styled_label.h
@@ -91,13 +91,13 @@
}
// View implementation:
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual int GetHeightForWidth(int w) const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void PreferredSizeChanged() OVERRIDE;
+ virtual gfx::Insets GetInsets() const override;
+ virtual int GetHeightForWidth(int w) const override;
+ virtual void Layout() override;
+ virtual void PreferredSizeChanged() override;
// LinkListener implementation:
- virtual void LinkClicked(Link* source, int event_flags) OVERRIDE;
+ virtual void LinkClicked(Link* source, int event_flags) override;
private:
struct StyleRange {
diff --git a/ui/views/controls/styled_label_unittest.cc b/ui/views/controls/styled_label_unittest.cc
index 624c146..144e03f 100644
--- a/ui/views/controls/styled_label_unittest.cc
+++ b/ui/views/controls/styled_label_unittest.cc
@@ -28,7 +28,7 @@
// StyledLabelListener implementation.
virtual void StyledLabelLinkClicked(const gfx::Range& range,
- int event_flags) OVERRIDE {}
+ int event_flags) override {}
protected:
StyledLabel* styled() { return styled_.get(); }
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc
index 3d181e0..aa4b307 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc
@@ -43,12 +43,12 @@
void SetSelected(bool selected);
// Overridden from View:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
private:
enum TabState {
@@ -76,9 +76,9 @@
virtual ~TabStrip();
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
TabbedPane* tabbed_pane_;
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.h b/ui/views/controls/tabbed_pane/tabbed_pane.h
index 83c7fef..c404808 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane.h
+++ b/ui/views/controls/tabbed_pane/tabbed_pane.h
@@ -54,8 +54,8 @@
void SelectTab(Tab* tab);
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
private:
friend class TabStrip;
@@ -64,12 +64,12 @@
Tab* GetTabAt(int index);
// Overridden from View:
- virtual void Layout() OVERRIDE;
+ virtual void Layout() override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ virtual void OnFocus() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
// A listener notified when tab selection changes. Weak, not owned.
TabbedPaneListener* listener_;
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
index f81c2a8..8a4acd4 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
@@ -22,7 +22,7 @@
: size_(size) {}
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return size_;
}
diff --git a/ui/views/controls/table/table_header.h b/ui/views/controls/table/table_header.h
index a595de9..55c0949 100644
--- a/ui/views/controls/table/table_header.h
+++ b/ui/views/controls/table/table_header.h
@@ -28,15 +28,15 @@
const gfx::FontList& font_list() const { return font_list_; }
// views::View overrides.
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void Layout() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
private:
// Used to track the column being resized.
diff --git a/ui/views/controls/table/table_view.h b/ui/views/controls/table/table_view.h
index 9626806..c1a9162 100644
--- a/ui/views/controls/table/table_view.h
+++ b/ui/views/controls/table/table_view.h
@@ -165,28 +165,28 @@
int row_height() const { return row_height_; }
// View overrides:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
+ base::string16* tooltip) const override;
virtual bool GetTooltipTextOrigin(const gfx::Point& p,
- gfx::Point* loc) const OVERRIDE;
+ gfx::Point* loc) const override;
// ui::TableModelObserver overrides:
- virtual void OnModelChanged() OVERRIDE;
- virtual void OnItemsChanged(int start, int length) OVERRIDE;
- virtual void OnItemsAdded(int start, int length) OVERRIDE;
- virtual void OnItemsRemoved(int start, int length) OVERRIDE;
+ virtual void OnModelChanged() override;
+ virtual void OnItemsChanged(int start, int length) override;
+ virtual void OnItemsAdded(int start, int length) override;
+ virtual void OnItemsRemoved(int start, int length) override;
protected:
// View overrides:
- virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual gfx::Point GetKeyboardContextMenuLocation() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
private:
friend class TableViewTestHelper;
diff --git a/ui/views/controls/table/table_view_unittest.cc b/ui/views/controls/table/table_view_unittest.cc
index 6ce06c8..535c650 100644
--- a/ui/views/controls/table/table_view_unittest.cc
+++ b/ui/views/controls/table/table_view_unittest.cc
@@ -66,10 +66,10 @@
void ChangeRow(int row, int c1_value, int c2_value);
// ui::TableModel:
- virtual int RowCount() OVERRIDE;
- virtual base::string16 GetText(int row, int column_id) OVERRIDE;
- virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
- virtual int CompareValues(int row1, int row2, int column_id) OVERRIDE;
+ virtual int RowCount() override;
+ virtual base::string16 GetText(int row, int column_id) override;
+ virtual void SetObserver(ui::TableModelObserver* observer) override;
+ virtual int CompareValues(int row1, int row2, int column_id) override;
private:
ui::TableModelObserver* observer_;
@@ -157,7 +157,7 @@
}
// View overrides:
- virtual bool HasFocus() const OVERRIDE {
+ virtual bool HasFocus() const override {
// Overriden so key processing works.
return true;
}
@@ -172,7 +172,7 @@
public:
TableViewTest() : table_(NULL) {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
model_.reset(new TestTableModel2);
std::vector<ui::TableColumn> columns(2);
columns[0].title = base::ASCIIToUTF16("Title Column 0");
@@ -410,7 +410,7 @@
}
// TableGrouper overrides:
- virtual void GetGroupRange(int model_index, GroupRange* range) OVERRIDE {
+ virtual void GetGroupRange(int model_index, GroupRange* range) override {
int offset = 0;
size_t range_index = 0;
for (; range_index < ranges_.size() && offset < model_index; ++range_index)
@@ -514,7 +514,7 @@
}
// TableViewObserver overrides:
- virtual void OnSelectionChanged() OVERRIDE {
+ virtual void OnSelectionChanged() override {
selection_changed_count_++;
}
diff --git a/ui/views/controls/table/test_table_model.h b/ui/views/controls/table/test_table_model.h
index 8338aae..a06db77 100644
--- a/ui/views/controls/table/test_table_model.h
+++ b/ui/views/controls/table/test_table_model.h
@@ -14,10 +14,10 @@
virtual ~TestTableModel();
// ui::TableModel overrides:
- virtual int RowCount() OVERRIDE;
- virtual base::string16 GetText(int row, int column_id) OVERRIDE;
- virtual gfx::ImageSkia GetIcon(int row) OVERRIDE;
- virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
+ virtual int RowCount() override;
+ virtual base::string16 GetText(int row, int column_id) override;
+ virtual gfx::ImageSkia GetIcon(int row) override;
+ virtual void SetObserver(ui::TableModelObserver* observer) override;
private:
int row_count_;
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index d577d90..53f0ee6 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -205,110 +205,110 @@
bool HasTextBeingDragged();
// View overrides:
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual int GetBaseline() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
+ virtual gfx::Insets GetInsets() const override;
+ virtual int GetBaseline() const override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual const char* GetClassName() const override;
+ virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual ui::TextInputClient* GetTextInputClient() override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual void AboutToRequestFocusFromTabTraversal(bool reverse) override;
virtual bool SkipDefaultKeyEventProcessing(
- const ui::KeyEvent& event) OVERRIDE;
+ const ui::KeyEvent& event) override;
virtual bool GetDropFormats(
int* formats,
- std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
- virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
- virtual void OnDragExited() OVERRIDE;
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
- virtual void OnDragDone() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const OVERRIDE;
- virtual void OnVisibleBoundsChanged() OVERRIDE;
- virtual void OnEnabledChanged() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ std::set<ui::OSExchangeData::CustomFormat>* custom_formats) override;
+ virtual bool CanDrop(const ui::OSExchangeData& data) override;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override;
+ virtual void OnDragExited() override;
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) override;
+ virtual void OnDragDone() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const override;
+ virtual void OnVisibleBoundsChanged() override;
+ virtual void OnEnabledChanged() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
+ virtual gfx::Point GetKeyboardContextMenuLocation() override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// TextfieldModel::Delegate overrides:
- virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE;
+ virtual void OnCompositionTextConfirmedOrCleared() override;
// ContextMenuController overrides:
virtual void ShowContextMenuForView(View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
// DragController overrides:
virtual void WriteDragDataForView(View* sender,
const gfx::Point& press_pt,
- ui::OSExchangeData* data) OVERRIDE;
+ ui::OSExchangeData* data) override;
virtual int GetDragOperationsForView(View* sender,
- const gfx::Point& p) OVERRIDE;
+ const gfx::Point& p) override;
virtual bool CanStartDragForView(View* sender,
const gfx::Point& press_pt,
- const gfx::Point& p) OVERRIDE;
+ const gfx::Point& p) override;
// ui::TouchEditable overrides:
virtual void SelectRect(const gfx::Point& start,
- const gfx::Point& end) OVERRIDE;
- virtual void MoveCaretTo(const gfx::Point& point) OVERRIDE;
- virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) OVERRIDE;
- virtual gfx::Rect GetBounds() OVERRIDE;
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual void ConvertPointToScreen(gfx::Point* point) OVERRIDE;
- virtual void ConvertPointFromScreen(gfx::Point* point) OVERRIDE;
- virtual bool DrawsHandles() OVERRIDE;
- virtual void OpenContextMenu(const gfx::Point& anchor) OVERRIDE;
- virtual void DestroyTouchSelection() OVERRIDE;
+ const gfx::Point& end) override;
+ virtual void MoveCaretTo(const gfx::Point& point) override;
+ virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) override;
+ virtual gfx::Rect GetBounds() override;
+ virtual gfx::NativeView GetNativeView() const override;
+ virtual void ConvertPointToScreen(gfx::Point* point) override;
+ virtual void ConvertPointFromScreen(gfx::Point* point) override;
+ virtual bool DrawsHandles() override;
+ virtual void OpenContextMenu(const gfx::Point& anchor) override;
+ virtual void DestroyTouchSelection() override;
// ui::SimpleMenuModel::Delegate overrides:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
// ui::TextInputClient overrides:
virtual void SetCompositionText(
- const ui::CompositionText& composition) OVERRIDE;
- virtual void ConfirmCompositionText() OVERRIDE;
- virtual void ClearCompositionText() OVERRIDE;
- virtual void InsertText(const base::string16& text) OVERRIDE;
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE;
- virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
- virtual ui::TextInputType GetTextInputType() const OVERRIDE;
- virtual ui::TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual gfx::Rect GetCaretBounds() const OVERRIDE;
+ const ui::CompositionText& composition) override;
+ virtual void ConfirmCompositionText() override;
+ virtual void ClearCompositionText() override;
+ virtual void InsertText(const base::string16& text) override;
+ virtual void InsertChar(base::char16 ch, int flags) override;
+ virtual gfx::NativeWindow GetAttachedWindow() const override;
+ virtual ui::TextInputType GetTextInputType() const override;
+ virtual ui::TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual gfx::Rect GetCaretBounds() const override;
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE;
- virtual bool HasCompositionText() const OVERRIDE;
- virtual bool GetTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE;
- virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE;
- virtual bool DeleteRange(const gfx::Range& range) OVERRIDE;
+ gfx::Rect* rect) const override;
+ virtual bool HasCompositionText() const override;
+ virtual bool GetTextRange(gfx::Range* range) const override;
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override;
+ virtual bool GetSelectionRange(gfx::Range* range) const override;
+ virtual bool SetSelectionRange(const gfx::Range& range) override;
+ virtual bool DeleteRange(const gfx::Range& range) override;
virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const OVERRIDE;
- virtual void OnInputMethodChanged() OVERRIDE;
+ base::string16* text) const override;
+ virtual void OnInputMethodChanged() override;
virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) OVERRIDE;
- virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE;
- virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void OnCandidateWindowShown() OVERRIDE;
- virtual void OnCandidateWindowUpdated() OVERRIDE;
- virtual void OnCandidateWindowHidden() OVERRIDE;
- virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE;
- virtual void ExecuteEditingCommand(int command_id) OVERRIDE;
+ base::i18n::TextDirection direction) override;
+ virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
+ virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
+ virtual void OnCandidateWindowShown() override;
+ virtual void OnCandidateWindowUpdated() override;
+ virtual void OnCandidateWindowHidden() override;
+ virtual bool IsEditingCommandEnabled(int command_id) override;
+ virtual void ExecuteEditingCommand(int command_id) override;
protected:
// Returns the TextfieldModel's text/cursor/selection rendering model.
diff --git a/ui/views/controls/textfield/textfield_model.cc b/ui/views/controls/textfield/textfield_model.cc
index 1e5bab5..fba7e11 100644
--- a/ui/views/controls/textfield/textfield_model.cc
+++ b/ui/views/controls/textfield/textfield_model.cc
@@ -160,7 +160,7 @@
}
// Edit implementation.
- virtual bool DoMerge(const Edit* edit) OVERRIDE {
+ virtual bool DoMerge(const Edit* edit) override {
if (edit->type() != INSERT_EDIT || new_text_end() != edit->new_text_start_)
return false;
// If continuous edit, merge it.
@@ -193,7 +193,7 @@
}
// Edit implementation.
- virtual bool DoMerge(const Edit* edit) OVERRIDE {
+ virtual bool DoMerge(const Edit* edit) override {
if (edit->type() == DELETE_EDIT ||
new_text_end() != edit->old_text_start_ ||
edit->old_text_start_ != edit->new_text_start_)
@@ -223,7 +223,7 @@
}
// Edit implementation.
- virtual bool DoMerge(const Edit* edit) OVERRIDE {
+ virtual bool DoMerge(const Edit* edit) override {
if (edit->type() != DELETE_EDIT)
return false;
diff --git a/ui/views/controls/textfield/textfield_model_unittest.cc b/ui/views/controls/textfield/textfield_model_unittest.cc
index 0239516..e5b1dfd 100644
--- a/ui/views/controls/textfield/textfield_model_unittest.cc
+++ b/ui/views/controls/textfield/textfield_model_unittest.cc
@@ -50,7 +50,7 @@
composition_text_confirmed_or_cleared_(false) {
}
- virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE {
+ virtual void OnCompositionTextConfirmedOrCleared() override {
composition_text_confirmed_or_cleared_ = true;
}
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index 56f4c5d..560bb41 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -64,7 +64,7 @@
key_received_(false),
weak_ptr_factory_(this) {}
- virtual bool OnKeyPressed(const ui::KeyEvent& e) OVERRIDE {
+ virtual bool OnKeyPressed(const ui::KeyEvent& e) override {
key_received_ = true;
// Since OnKeyPressed() might destroy |this|, get a weak pointer and
@@ -80,7 +80,7 @@
return key_handled_;
}
- virtual bool OnKeyReleased(const ui::KeyEvent& e) OVERRIDE {
+ virtual bool OnKeyReleased(const ui::KeyEvent& e) override {
key_received_ = true;
key_handled_ = views::Textfield::OnKeyReleased(e);
return key_handled_;
@@ -123,7 +123,7 @@
// views::TextfieldController:
virtual bool HandleKeyEvent(views::Textfield* sender,
- const ui::KeyEvent& key_event) OVERRIDE {
+ const ui::KeyEvent& key_event) override {
target_.reset();
return false;
}
@@ -177,22 +177,22 @@
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE {
+ const base::string16& new_contents) override {
// Paste calls TextfieldController::ContentsChanged() explicitly even if the
// paste action did not change the content. So |new_contents| may match
// |last_contents_|. For more info, see http://crbug.com/79002
last_contents_ = new_contents;
}
- virtual void OnBeforeUserAction(Textfield* sender) OVERRIDE {
+ virtual void OnBeforeUserAction(Textfield* sender) override {
++on_before_user_action_;
}
- virtual void OnAfterUserAction(Textfield* sender) OVERRIDE {
+ virtual void OnAfterUserAction(Textfield* sender) override {
++on_after_user_action_;
}
- virtual void OnAfterCutOrCopy(ui::ClipboardType clipboard_type) OVERRIDE {
+ virtual void OnAfterCutOrCopy(ui::ClipboardType clipboard_type) override {
copied_to_clipboard_ = clipboard_type;
}
@@ -632,7 +632,7 @@
virtual bool MatchEvent(
const ui::Event& event,
- std::vector<ui::TextEditCommandAuraLinux>* commands) OVERRIDE {
+ std::vector<ui::TextEditCommandAuraLinux>* commands) override {
return false;
}
diff --git a/ui/views/controls/throbber.h b/ui/views/controls/throbber.h
index 08188c3..493cffe 100644
--- a/ui/views/controls/throbber.h
+++ b/ui/views/controls/throbber.h
@@ -37,8 +37,8 @@
void SetFrames(const gfx::ImageSkia* frames);
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
protected:
// Specifies whether the throbber is currently animating or not
@@ -67,8 +67,8 @@
SmoothedThrobber(int frame_delay_ms, gfx::ImageSkia* frames);
virtual ~SmoothedThrobber();
- virtual void Start() OVERRIDE;
- virtual void Stop() OVERRIDE;
+ virtual void Start() override;
+ virtual void Stop() override;
void set_start_delay_ms(int value) { start_delay_ms_ = value; }
void set_stop_delay_ms(int value) { stop_delay_ms_ = value; }
@@ -108,7 +108,7 @@
void SetChecked(bool checked);
// Overridden from Throbber:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
private:
static const int kFrameTimeMs = 30;
diff --git a/ui/views/controls/tree/tree_view.h b/ui/views/controls/tree/tree_view.h
index 3cae3b5..dcecc9f 100644
--- a/ui/views/controls/tree/tree_view.h
+++ b/ui/views/controls/tree/tree_view.h
@@ -120,54 +120,54 @@
views::Textfield* editor() { return editor_; }
// View overrides:
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual ui::TextInputClient* GetTextInputClient() override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
virtual void ShowContextMenu(const gfx::Point& p,
- ui::MenuSourceType source_type) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ ui::MenuSourceType source_type) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual const char* GetClassName() const override;
// TreeModelObserver overrides:
virtual void TreeNodesAdded(ui::TreeModel* model,
ui::TreeModelNode* parent,
int start,
- int count) OVERRIDE;
+ int count) override;
virtual void TreeNodesRemoved(ui::TreeModel* model,
ui::TreeModelNode* parent,
int start,
- int count) OVERRIDE;
+ int count) override;
virtual void TreeNodeChanged(ui::TreeModel* model,
- ui::TreeModelNode* model_node) OVERRIDE;
+ ui::TreeModelNode* model_node) override;
// TextfieldController overrides:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
virtual bool HandleKeyEvent(Textfield* sender,
- const ui::KeyEvent& key_event) OVERRIDE;
+ const ui::KeyEvent& key_event) override;
// FocusChangeListener overrides:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
// PrefixDelegate overrides:
- virtual int GetRowCount() OVERRIDE;
- virtual int GetSelectedRow() OVERRIDE;
- virtual void SetSelectedRow(int row) OVERRIDE;
- virtual base::string16 GetTextForRow(int row) OVERRIDE;
+ virtual int GetRowCount() override;
+ virtual int GetSelectedRow() override;
+ virtual void SetSelectedRow(int row) override;
+ virtual base::string16 GetTextForRow(int row) override;
protected:
// View overrides:
- virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual gfx::Point GetKeyboardContextMenuLocation() override;
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
private:
friend class TreeViewTest;
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
index 93bd360..6671139 100644
--- a/ui/views/controls/webview/BUILD.gn
+++ b/ui/views/controls/webview/BUILD.gn
@@ -57,7 +57,6 @@
"//ipc:test_support",
"//skia",
"//testing/gtest",
- "//ui/aura",
"//ui/base",
"//ui/events",
"//ui/gfx",
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index 2e69ad3..40d7616 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -52,69 +52,69 @@
content::WebContents* web_contents();
// Overridden from views::ClientView:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
virtual bool AcceleratorPressed(const ui::Accelerator& accelerator)
- OVERRIDE;
+ override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual bool CanClose() OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual bool CanClose() override;
// Overridden from views::WidgetDelegate:
- virtual bool CanResize() const OVERRIDE;
- virtual ui::ModalType GetModalType() const OVERRIDE;
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual std::string GetWindowName() const OVERRIDE;
- virtual void WindowClosing() OVERRIDE;
- virtual views::View* GetContentsView() OVERRIDE;
- virtual ClientView* CreateClientView(views::Widget* widget) OVERRIDE;
- virtual views::View* GetInitiallyFocusedView() OVERRIDE;
- virtual bool ShouldShowWindowTitle() const OVERRIDE;
- virtual views::Widget* GetWidget() OVERRIDE;
- virtual const views::Widget* GetWidget() const OVERRIDE;
+ virtual bool CanResize() const override;
+ virtual ui::ModalType GetModalType() const override;
+ virtual base::string16 GetWindowTitle() const override;
+ virtual std::string GetWindowName() const override;
+ virtual void WindowClosing() override;
+ virtual views::View* GetContentsView() override;
+ virtual ClientView* CreateClientView(views::Widget* widget) override;
+ virtual views::View* GetInitiallyFocusedView() override;
+ virtual bool ShouldShowWindowTitle() const override;
+ virtual views::Widget* GetWidget() override;
+ virtual const views::Widget* GetWidget() const override;
// Overridden from ui::WebDialogDelegate:
- virtual ui::ModalType GetDialogModalType() const OVERRIDE;
- virtual base::string16 GetDialogTitle() const OVERRIDE;
- virtual GURL GetDialogContentURL() const OVERRIDE;
+ virtual ui::ModalType GetDialogModalType() const override;
+ virtual base::string16 GetDialogTitle() const override;
+ virtual GURL GetDialogContentURL() const override;
virtual void GetWebUIMessageHandlers(
- std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
- virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
- virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE;
- virtual std::string GetDialogArgs() const OVERRIDE;
+ std::vector<content::WebUIMessageHandler*>* handlers) const override;
+ virtual void GetDialogSize(gfx::Size* size) const override;
+ virtual void GetMinimumDialogSize(gfx::Size* size) const override;
+ virtual std::string GetDialogArgs() const override;
virtual void OnDialogShown(
content::WebUI* webui,
- content::RenderViewHost* render_view_host) OVERRIDE;
- virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
+ content::RenderViewHost* render_view_host) override;
+ virtual void OnDialogClosed(const std::string& json_retval) override;
virtual void OnDialogCloseFromWebUI(
- const std::string& json_retval) OVERRIDE;
+ const std::string& json_retval) override;
virtual void OnCloseContents(content::WebContents* source,
- bool* out_close_dialog) OVERRIDE;
- virtual bool ShouldShowDialogTitle() const OVERRIDE;
+ bool* out_close_dialog) override;
+ virtual bool ShouldShowDialogTitle() const override;
virtual bool HandleContextMenu(
- const content::ContextMenuParams& params) OVERRIDE;
+ const content::ContextMenuParams& params) override;
// Overridden from content::WebContentsDelegate:
virtual void MoveContents(content::WebContents* source,
- const gfx::Rect& pos) OVERRIDE;
+ const gfx::Rect& pos) override;
virtual void HandleKeyboardEvent(
content::WebContents* source,
- const content::NativeWebKeyboardEvent& event) OVERRIDE;
- virtual void CloseContents(content::WebContents* source) OVERRIDE;
+ const content::NativeWebKeyboardEvent& event) override;
+ virtual void CloseContents(content::WebContents* source) override;
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
- const content::OpenURLParams& params) OVERRIDE;
+ const content::OpenURLParams& params) override;
virtual void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture,
- bool* was_blocked) OVERRIDE;
+ bool* was_blocked) override;
virtual void LoadingStateChanged(content::WebContents* source,
- bool to_different_document) OVERRIDE;
+ bool to_different_document) override;
virtual void BeforeUnloadFired(content::WebContents* tab,
bool proceed,
- bool* proceed_to_fire_unload) OVERRIDE;
+ bool* proceed_to_fire_unload) override;
private:
FRIEND_TEST_ALL_PREFIXES(WebDialogBrowserTest, WebContentRendered);
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index 7e31097..f17c534 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -13,7 +13,6 @@
#include "ipc/ipc_message.h"
#include "ui/accessibility/ax_enums.h"
#include "ui/accessibility/ax_view_state.h"
-#include "ui/aura/window.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/events/event.h"
#include "ui/views/accessibility/native_view_accessibility.h"
@@ -303,14 +302,8 @@
if (holder_->native_view() == view_to_attach)
return;
- // The WCV needs to be parented before making it visible.
holder_->Attach(view_to_attach);
- // Fullscreen widgets are not parented by a WebContentsView. Their visibility
- // is controlled by content i.e. (RenderWidgetHost)
- if (!is_embedding_fullscreen_widget_)
- view_to_attach->Show();
-
// The view will not be focused automatically when it is attached, so we need
// to pass on focus to it if the FocusManager thinks the view is focused. Note
// that not every Widget has a focus manager.
@@ -328,11 +321,6 @@
void WebView::DetachWebContents() {
if (web_contents()) {
- // Fullscreen widgets are not parented by a WebContentsView. Their
- // visibility is controlled by content i.e. (RenderWidgetHost).
- if (!is_embedding_fullscreen_widget_)
- web_contents()->GetNativeView()->Hide();
-
holder_->Detach();
#if defined(OS_WIN)
if (!is_embedding_fullscreen_widget_)
diff --git a/ui/views/controls/webview/webview.gyp b/ui/views/controls/webview/webview.gyp
index afd1ae2..af284b7 100644
--- a/ui/views/controls/webview/webview.gyp
+++ b/ui/views/controls/webview/webview.gyp
@@ -12,7 +12,6 @@
'target_name': 'webview',
'type': '<(component)',
'dependencies': [
- '../../../aura/aura.gyp:aura',
'../../../../base/base.gyp:base',
'../../../../base/base.gyp:base_i18n',
'../../../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
diff --git a/ui/views/controls/webview/webview.h b/ui/views/controls/webview/webview.h
index 850b2ba..32d423a 100644
--- a/ui/views/controls/webview/webview.h
+++ b/ui/views/controls/webview/webview.h
@@ -89,8 +89,8 @@
void SetPreferredSize(const gfx::Size& preferred_size);
// Overridden from View:
- virtual const char* GetClassName() const OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
+ virtual const char* GetClassName() const override;
+ virtual ui::TextInputClient* GetTextInputClient() override;
protected:
// Swaps the owned WebContents |wc_owner_| with |new_web_contents|. Returns
@@ -99,38 +99,38 @@
scoped_ptr<content::WebContents> new_web_contents);
// Overridden from View:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
virtual bool SkipDefaultKeyEventProcessing(
- const ui::KeyEvent& event) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ const ui::KeyEvent& event) override;
+ virtual void OnFocus() override;
+ virtual void AboutToRequestFocusFromTabTraversal(bool reverse) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ virtual gfx::Size GetPreferredSize() const override;
// Overridden from content::WebContentsDelegate:
- virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE;
- virtual bool EmbedsFullscreenWidget() const OVERRIDE;
+ virtual void WebContentsFocused(content::WebContents* web_contents) override;
+ virtual bool EmbedsFullscreenWidget() const override;
// Overridden from content::WebContentsObserver:
virtual void RenderViewDeleted(
- content::RenderViewHost* render_view_host) OVERRIDE;
- virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
+ content::RenderViewHost* render_view_host) override;
+ virtual void RenderProcessGone(base::TerminationStatus status) override;
virtual void RenderViewHostChanged(
content::RenderViewHost* old_host,
- content::RenderViewHost* new_host) OVERRIDE;
- virtual void DidShowFullscreenWidget(int routing_id) OVERRIDE;
- virtual void DidDestroyFullscreenWidget(int routing_id) OVERRIDE;
- virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE;
- virtual void DidAttachInterstitialPage() OVERRIDE;
- virtual void DidDetachInterstitialPage() OVERRIDE;
+ content::RenderViewHost* new_host) override;
+ virtual void DidShowFullscreenWidget(int routing_id) override;
+ virtual void DidDestroyFullscreenWidget(int routing_id) override;
+ virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) override;
+ virtual void DidAttachInterstitialPage() override;
+ virtual void DidDetachInterstitialPage() override;
// Workaround for MSVC++ linker bug/feature that requires
// instantiation of the inline IPC::Listener methods in all translation units.
- virtual void OnChannelConnected(int32 peer_id) OVERRIDE {}
- virtual void OnChannelError() OVERRIDE {}
- virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE {}
+ virtual void OnChannelConnected(int32 peer_id) override {}
+ virtual void OnChannelError() override {}
+ virtual void OnBadMessageReceived(const IPC::Message& message) override {}
private:
void AttachWebContents();
diff --git a/ui/views/controls/webview/webview_interactive_uitest.cc b/ui/views/controls/webview/webview_interactive_uitest.cc
index f1179b8..1ccfc33 100644
--- a/ui/views/controls/webview/webview_interactive_uitest.cc
+++ b/ui/views/controls/webview/webview_interactive_uitest.cc
@@ -22,7 +22,7 @@
WebViewInteractiveUiTest()
: ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
gfx::GLSurface::InitializeOneOffForTests();
WidgetTest::SetUp();
}
diff --git a/ui/views/controls/webview/webview_unittest.cc b/ui/views/controls/webview/webview_unittest.cc
index a6a250d..93cb915 100644
--- a/ui/views/controls/webview/webview_unittest.cc
+++ b/ui/views/controls/webview/webview_unittest.cc
@@ -26,7 +26,7 @@
// Overriden from TestViewsDelegate.
virtual content::WebContents* CreateWebContents(
content::BrowserContext* browser_context,
- content::SiteInstance* site_instance) OVERRIDE {
+ content::SiteInstance* site_instance) override {
return content::WebContentsTester::CreateTestWebContents(browser_context,
site_instance);
}
@@ -46,7 +46,7 @@
virtual ~WebViewUnitTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
// The ViewsDelegate is deleted when the ViewsTestBase class is torn down.
WidgetTest::set_views_delegate(new WebViewTestViewsDelegate);
browser_context_.reset(new content::TestBrowserContext);
@@ -56,7 +56,7 @@
SetBrowserClientForTesting(&test_browser_client_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
browser_context_.reset(NULL);
// Flush the message loop to execute pending relase tasks as this would
// upset ASAN and Valgrind.
@@ -95,20 +95,20 @@
content::WebContentsObserver::Observe(NULL);
}
- virtual void WebContentsDestroyed() OVERRIDE {
+ virtual void WebContentsDestroyed() override {
DCHECK(web_contents_);
content::WebContentsObserver::Observe(NULL);
web_contents_ = NULL;
}
- virtual void WasShown() OVERRIDE {
+ virtual void WasShown() override {
valid_root_while_shown_ =
web_contents()->GetNativeView()->GetRootWindow() != NULL;
was_shown_ = true;
++shown_count_;
}
- virtual void WasHidden() OVERRIDE {
+ virtual void WasHidden() override {
was_shown_ = false;
++hidden_count_;
}
@@ -136,10 +136,14 @@
// WebContents visible and hidden respectively.
TEST_F(WebViewUnitTest, TestWebViewAttachDetachWebContents) {
// Create a top level widget and a webview as its content.
- views::Widget* widget = CreateTopLevelFramelessPlatformWidget();
+ views::Widget* parent = CreateTopLevelFramelessPlatformWidget();
+ parent->SetBounds(gfx::Rect(0, 10, 100, 100));
+
+ views::Widget* widget = CreateChildNativeWidgetWithParent(parent);
widget->SetBounds(gfx::Rect(0, 10, 100, 100));
views::WebView* webview = new views::WebView(browser_context());
widget->SetContentsView(webview);
+ parent->Show();
widget->Show();
// Case 1: Create a new WebContents and set it in the webview via
@@ -179,7 +183,48 @@
EXPECT_EQ(observer2.shown_count(), 1);
EXPECT_EQ(observer2.hidden_count(), 0);
+ // Case 3: Test that attaching to a hidden webview does not show the web
+ // contents.
+ webview->SetVisible(false);
+ EXPECT_EQ(1, observer2.hidden_count()); // Now hidden.
+
+ EXPECT_EQ(1, observer1.shown_count());
+ webview->SetWebContents(web_contents1.get());
+ EXPECT_EQ(1, observer1.shown_count());
+
+ // Nothing else should change.
+ EXPECT_EQ(1, observer1.hidden_count());
+ EXPECT_EQ(1, observer2.shown_count());
+ EXPECT_EQ(1, observer2.hidden_count());
+
+ // Case 4: Test that making the webview visible when a window has an invisible
+ // parent does not make the web contents visible.
+ parent->Hide();
+ webview->SetVisible(true);
+ // TODO(tapted): The following line is wrong, the shown_count() should still
+ // be 1, until the parent window is made visible on the line after.
+ EXPECT_EQ(2, observer1.shown_count());
+ parent->Show();
+ EXPECT_EQ(2, observer1.shown_count());
+ parent->Hide();
+ EXPECT_EQ(2, observer1.hidden_count());
+
+ // Case 5: Test that moving from a hidden parent to a visible parent makes the
+ // web contents visible.
+ views::Widget* parent2 = CreateTopLevelFramelessPlatformWidget();
+ parent2->SetBounds(gfx::Rect(0, 10, 100, 100));
+ parent2->Show();
+
+ EXPECT_EQ(2, observer1.shown_count());
+ // Note: that reparenting the windows directly, after the windows have been
+ // created, e.g., views::Widget::ReparentNativeView(widget, parent2), is not a
+ // supported use case. Instead, move the WebView over.
+ parent2->SetContentsView(webview);
+ EXPECT_EQ(3, observer1.shown_count());
+
widget->Close();
+ parent->Close();
+ parent2->Close();
RunPendingMessages();
}
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index 9a536ae..da2ca72 100644
--- a/ui/views/corewm/capture_controller_unittest.cc
+++ b/ui/views/corewm/capture_controller_unittest.cc
@@ -30,7 +30,7 @@
public:
CaptureControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
capture_controller_.reset(new wm::ScopedCaptureClient(root_window()));
@@ -50,7 +50,7 @@
#endif
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
RunAllPendingInMessageLoop();
#if !defined(OS_CHROMEOS)
diff --git a/ui/views/corewm/desktop_capture_controller_unittest.cc b/ui/views/corewm/desktop_capture_controller_unittest.cc
index 3baf0f4..85c9c79 100644
--- a/ui/views/corewm/desktop_capture_controller_unittest.cc
+++ b/ui/views/corewm/desktop_capture_controller_unittest.cc
@@ -32,7 +32,7 @@
DesktopCaptureControllerTest() {}
virtual ~DesktopCaptureControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
base::FilePath ui_test_pak_path;
@@ -50,7 +50,7 @@
DesktopViewInputTest()
: received_gesture_event_(false) {}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
received_gesture_event_ = true;
return View::OnGestureEvent(event);
}
diff --git a/ui/views/corewm/tooltip_aura.h b/ui/views/corewm/tooltip_aura.h
index 9e8c5fa..24976b9 100644
--- a/ui/views/corewm/tooltip_aura.h
+++ b/ui/views/corewm/tooltip_aura.h
@@ -51,13 +51,13 @@
// Tooltip:
virtual void SetText(aura::Window* window,
const base::string16& tooltip_text,
- const gfx::Point& location) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual bool IsVisible() OVERRIDE;
+ const gfx::Point& location) override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual bool IsVisible() override;
// WidgetObserver:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
const gfx::ScreenType screen_type_;
diff --git a/ui/views/corewm/tooltip_controller.h b/ui/views/corewm/tooltip_controller.h
index e045334..8242725 100644
--- a/ui/views/corewm/tooltip_controller.h
+++ b/ui/views/corewm/tooltip_controller.h
@@ -38,19 +38,19 @@
virtual ~TooltipController();
// Overridden from aura::client::TooltipClient.
- virtual void UpdateTooltip(aura::Window* target) OVERRIDE;
+ virtual void UpdateTooltip(aura::Window* target) override;
virtual void SetTooltipShownTimeout(aura::Window* target,
- int timeout_in_ms) OVERRIDE;
- virtual void SetTooltipsEnabled(bool enable) OVERRIDE;
+ int timeout_in_ms) override;
+ virtual void SetTooltipsEnabled(bool enable) override;
// Overridden from ui::EventHandler.
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override;
+ virtual void OnCancelMode(ui::CancelModeEvent* event) override;
// Overridden from aura::WindowObserver.
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
const gfx::Point& mouse_location() const { return curr_mouse_loc_; }
diff --git a/ui/views/corewm/tooltip_controller_test_helper.h b/ui/views/corewm/tooltip_controller_test_helper.h
index 4451ff3..310a00c 100644
--- a/ui/views/corewm/tooltip_controller_test_helper.h
+++ b/ui/views/corewm/tooltip_controller_test_helper.h
@@ -57,7 +57,7 @@
// Overridden from views::View
virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE;
+ base::string16* tooltip) const override;
private:
base::string16 tooltip_text_;
diff --git a/ui/views/corewm/tooltip_controller_unittest.cc b/ui/views/corewm/tooltip_controller_unittest.cc
index 43f5c80..e083439 100644
--- a/ui/views/corewm/tooltip_controller_unittest.cc
+++ b/ui/views/corewm/tooltip_controller_unittest.cc
@@ -77,7 +77,7 @@
TooltipControllerTest() : view_(NULL) {}
virtual ~TooltipControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
#if defined(OS_CHROMEOS)
views_delegate_.reset(new TestViewsDelegate);
#else
@@ -103,7 +103,7 @@
generator_.reset(new ui::test::EventGenerator(GetRootWindow()));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
#if defined(OS_CHROMEOS)
root_window()->RemovePreTargetHandler(controller_.get());
aura::client::SetTooltipClient(root_window(), NULL);
@@ -418,18 +418,18 @@
// ScreenPositionClient overrides:
virtual void ConvertPointToScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE {
+ gfx::Point* point) override {
}
virtual void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE {
+ gfx::Point* point) override {
}
virtual void ConvertHostPointToScreen(aura::Window* root_gwindow,
- gfx::Point* point) OVERRIDE {
+ gfx::Point* point) override {
NOTREACHED();
}
virtual void SetBounds(aura::Window* window,
const gfx::Rect& bounds,
- const gfx::Display& display) OVERRIDE {
+ const gfx::Display& display) override {
window->SetBounds(bounds);
}
@@ -444,7 +444,7 @@
TooltipControllerCaptureTest() {}
virtual ~TooltipControllerCaptureTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
TooltipControllerTest::SetUp();
aura::client::SetScreenPositionClient(GetRootWindow(),
&screen_position_client_);
@@ -455,7 +455,7 @@
#endif
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
#if !defined(OS_CHROMEOS)
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen());
desktop_screen_.reset();
@@ -559,17 +559,17 @@
// Tooltip:
virtual void SetText(aura::Window* window,
const base::string16& tooltip_text,
- const gfx::Point& location) OVERRIDE {
+ const gfx::Point& location) override {
tooltip_text_ = tooltip_text;
location_ = location;
}
- virtual void Show() OVERRIDE {
+ virtual void Show() override {
is_visible_ = true;
}
- virtual void Hide() OVERRIDE {
+ virtual void Hide() override {
is_visible_ = false;
}
- virtual bool IsVisible() OVERRIDE {
+ virtual bool IsVisible() override {
return is_visible_;
}
const gfx::Point& location() { return location_; }
@@ -590,7 +590,7 @@
TooltipControllerTest2() : test_tooltip_(new TestTooltip) {}
virtual ~TooltipControllerTest2() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
wm_state_.reset(new wm::WMState);
aura::test::AuraTestBase::SetUp();
new wm::DefaultActivationClient(root_window());
@@ -602,7 +602,7 @@
generator_.reset(new ui::test::EventGenerator(root_window()));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
root_window()->RemovePreTargetHandler(controller_.get());
aura::client::SetTooltipClient(root_window(), NULL);
controller_.reset();
@@ -665,7 +665,7 @@
TooltipControllerTest3() : test_tooltip_(new TestTooltip) {}
virtual ~TooltipControllerTest3() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
wm_state_.reset(new wm::WMState);
aura::test::AuraTestBase::SetUp();
new wm::DefaultActivationClient(root_window());
@@ -687,7 +687,7 @@
SetTooltipClient(GetRootWindow(), controller_.get());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
GetRootWindow()->RemovePreTargetHandler(controller_.get());
aura::client::SetTooltipClient(GetRootWindow(), NULL);
diff --git a/ui/views/corewm/tooltip_win.h b/ui/views/corewm/tooltip_win.h
index b031a32..23ee640 100644
--- a/ui/views/corewm/tooltip_win.h
+++ b/ui/views/corewm/tooltip_win.h
@@ -39,10 +39,10 @@
// Tooltip:
virtual void SetText(aura::Window* window,
const base::string16& tooltip_text,
- const gfx::Point& location) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual bool IsVisible() OVERRIDE;
+ const gfx::Point& location) override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual bool IsVisible() override;
// The window |tooltip_hwnd_| is parented to.
HWND parent_hwnd_;
diff --git a/ui/views/examples/bubble_example.cc b/ui/views/examples/bubble_example.cc
index 49a60e5..907611a 100644
--- a/ui/views/examples/bubble_example.cc
+++ b/ui/views/examples/bubble_example.cc
@@ -54,7 +54,7 @@
: BubbleDelegateView(anchor, arrow) {}
protected:
- virtual void Init() OVERRIDE {
+ virtual void Init() override {
SetLayoutManager(new BoxLayout(BoxLayout::kVertical, 50, 50, 0));
AddChildView(new Label(GetArrowName(arrow())));
}
diff --git a/ui/views/examples/bubble_example.h b/ui/views/examples/bubble_example.h
index d9ad66d..eb5625c 100644
--- a/ui/views/examples/bubble_example.h
+++ b/ui/views/examples/bubble_example.h
@@ -19,11 +19,11 @@
virtual ~BubbleExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
Button* no_shadow_;
Button* big_shadow_;
diff --git a/ui/views/examples/button_example.h b/ui/views/examples/button_example.h
index 4e01a8a..8fc2c60 100644
--- a/ui/views/examples/button_example.h
+++ b/ui/views/examples/button_example.h
@@ -24,13 +24,13 @@
virtual ~ButtonExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
void LabelButtonPressed(const ui::Event& event);
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
// Example buttons.
LabelButton* label_button_;
diff --git a/ui/views/examples/checkbox_example.h b/ui/views/examples/checkbox_example.h
index a5a8964..d95f1f4 100644
--- a/ui/views/examples/checkbox_example.h
+++ b/ui/views/examples/checkbox_example.h
@@ -22,11 +22,11 @@
virtual ~CheckboxExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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/combobox_example.h b/ui/views/examples/combobox_example.h
index 89ccff2..3ea1c24 100644
--- a/ui/views/examples/combobox_example.h
+++ b/ui/views/examples/combobox_example.h
@@ -20,8 +20,8 @@
virtual ~ComboboxModelExample();
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE;
- virtual base::string16 GetItemAt(int index) OVERRIDE;
+ virtual int GetItemCount() const override;
+ virtual base::string16 GetItemAt(int index) override;
private:
DISALLOW_COPY_AND_ASSIGN(ComboboxModelExample);
@@ -34,11 +34,11 @@
virtual ~ComboboxExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ComboboxListener:
- virtual void OnPerformAction(Combobox* combobox) OVERRIDE;
+ virtual void OnPerformAction(Combobox* combobox) override;
ComboboxModelExample combobox_model_;
Combobox* combobox_;
diff --git a/ui/views/examples/double_split_view_example.cc b/ui/views/examples/double_split_view_example.cc
index 8ff40df..dc794e6 100644
--- a/ui/views/examples/double_split_view_example.cc
+++ b/ui/views/examples/double_split_view_example.cc
@@ -22,7 +22,7 @@
void SetColor(SkColor from, SkColor to);
// View:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
private:
DISALLOW_COPY_AND_ASSIGN(SplittedView);
diff --git a/ui/views/examples/double_split_view_example.h b/ui/views/examples/double_split_view_example.h
index fe37c79..c83b8cb 100644
--- a/ui/views/examples/double_split_view_example.h
+++ b/ui/views/examples/double_split_view_example.h
@@ -19,7 +19,7 @@
virtual ~DoubleSplitViewExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// The SingleSplitViews to be embedded.
diff --git a/ui/views/examples/example_base.cc b/ui/views/examples/example_base.cc
index a06fc1d..bb216f9 100644
--- a/ui/views/examples/example_base.cc
+++ b/ui/views/examples/example_base.cc
@@ -29,7 +29,7 @@
private:
// View:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
+ const ViewHierarchyChangedDetails& details) override {
View::ViewHierarchyChanged(details);
// We're not using child == this because a Widget may not be
// available when this is added to the hierarchy.
diff --git a/ui/views/examples/example_combobox_model.h b/ui/views/examples/example_combobox_model.h
index 3b23332..4988c60 100644
--- a/ui/views/examples/example_combobox_model.h
+++ b/ui/views/examples/example_combobox_model.h
@@ -17,8 +17,8 @@
virtual ~ExampleComboboxModel();
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE;
- virtual base::string16 GetItemAt(int index) OVERRIDE;
+ virtual int GetItemCount() const override;
+ virtual base::string16 GetItemAt(int index) override;
private:
const char** strings_;
diff --git a/ui/views/examples/examples_window.cc b/ui/views/examples/examples_window.cc
index 596cb75..040fcdc 100644
--- a/ui/views/examples/examples_window.cc
+++ b/ui/views/examples/examples_window.cc
@@ -105,8 +105,8 @@
}
// ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE { return example_list_.size(); }
- virtual base::string16 GetItemAt(int index) OVERRIDE {
+ virtual int GetItemCount() const override { return example_list_.size(); }
+ virtual base::string16 GetItemAt(int index) override {
return base::UTF8ToUTF16(example_list_[index]->example_title());
}
@@ -172,21 +172,21 @@
private:
// WidgetDelegateView:
- virtual bool CanResize() const OVERRIDE { return true; }
- virtual bool CanMaximize() const OVERRIDE { return true; }
- virtual bool CanMinimize() const OVERRIDE { return true; }
- virtual base::string16 GetWindowTitle() const OVERRIDE {
+ virtual bool CanResize() const override { return true; }
+ virtual bool CanMaximize() const override { return true; }
+ virtual bool CanMinimize() const override { return true; }
+ virtual base::string16 GetWindowTitle() const override {
return base::ASCIIToUTF16("Views Examples");
}
- virtual View* GetContentsView() OVERRIDE { return this; }
- virtual void WindowClosing() OVERRIDE {
+ virtual View* GetContentsView() override { return this; }
+ virtual void WindowClosing() override {
instance_ = NULL;
if (operation_ == QUIT_ON_CLOSE)
base::MessageLoopForUI::current()->Quit();
}
// ComboboxListener:
- virtual void OnPerformAction(Combobox* combobox) OVERRIDE {
+ virtual void OnPerformAction(Combobox* combobox) override {
DCHECK_EQ(combobox, combobox_);
DCHECK(combobox->selected_index() < combobox_model_.GetItemCount());
example_shown_->RemoveAllChildViews(false);
diff --git a/ui/views/examples/label_example.cc b/ui/views/examples/label_example.cc
index 178b62b..89e3223 100644
--- a/ui/views/examples/label_example.cc
+++ b/ui/views/examples/label_example.cc
@@ -37,7 +37,7 @@
virtual ~PreferredSizeLabel() {}
// Label:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(50, Label::GetPreferredSize().height());
}
diff --git a/ui/views/examples/label_example.h b/ui/views/examples/label_example.h
index ea6cd94..f597742 100644
--- a/ui/views/examples/label_example.h
+++ b/ui/views/examples/label_example.h
@@ -30,17 +30,17 @@
virtual ~LabelExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
// ButtonListener:
- virtual void ButtonPressed(Button* button, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* button, const ui::Event& event) override;
// ComboboxListener:
- virtual void OnPerformAction(Combobox* combobox) OVERRIDE;
+ virtual void OnPerformAction(Combobox* combobox) override;
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
private:
// Add a customizable label and various controls to modify its presentation.
diff --git a/ui/views/examples/link_example.h b/ui/views/examples/link_example.h
index fd6e924..fa6bb57 100644
--- a/ui/views/examples/link_example.h
+++ b/ui/views/examples/link_example.h
@@ -19,11 +19,11 @@
virtual ~LinkExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// LinkListener:
- virtual void LinkClicked(Link* source, int event_flags) OVERRIDE;
+ virtual void LinkClicked(Link* source, int event_flags) override;
Link* link_;
diff --git a/ui/views/examples/menu_example.cc b/ui/views/examples/menu_example.cc
index bc8845e..1b95457 100644
--- a/ui/views/examples/menu_example.cc
+++ b/ui/views/examples/menu_example.cc
@@ -28,12 +28,12 @@
ExampleMenuModel();
// ui::SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
private:
enum GroupID {
@@ -66,7 +66,7 @@
private:
// MenuButtonListener:
virtual void OnMenuButtonClicked(View* source,
- const gfx::Point& point) OVERRIDE;
+ const gfx::Point& point) override;
ui::SimpleMenuModel* GetMenuModel();
diff --git a/ui/views/examples/menu_example.h b/ui/views/examples/menu_example.h
index 3ed5d37..af370b3 100644
--- a/ui/views/examples/menu_example.h
+++ b/ui/views/examples/menu_example.h
@@ -19,7 +19,7 @@
virtual ~MenuExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
DISALLOW_COPY_AND_ASSIGN(MenuExample);
diff --git a/ui/views/examples/message_box_example.h b/ui/views/examples/message_box_example.h
index 692ae22..fe3ba67 100644
--- a/ui/views/examples/message_box_example.h
+++ b/ui/views/examples/message_box_example.h
@@ -24,11 +24,11 @@
virtual ~MessageBoxExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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/multiline_example.cc b/ui/views/examples/multiline_example.cc
index 8c86d9e..d2d69cc 100644
--- a/ui/views/examples/multiline_example.cc
+++ b/ui/views/examples/multiline_example.cc
@@ -35,7 +35,7 @@
virtual ~PreferredSizeLabel() {}
// Label:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(50, Label::GetPreferredSize().height());
}
@@ -55,12 +55,12 @@
SetBorder(Border::CreateSolidBorder(2, SK_ColorGRAY));
}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
View::OnPaint(canvas);
render_text_->Draw(canvas);
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
// Turn off multiline mode to get the single-line text size, which is the
// preferred size for this view.
render_text_->SetMultiline(false);
@@ -71,7 +71,7 @@
return size;
}
- virtual int GetHeightForWidth(int w) const OVERRIDE {
+ virtual int GetHeightForWidth(int w) const override {
// TODO(ckocagil): Why does this happen?
if (w == 0)
return View::GetHeightForWidth(w);
@@ -104,7 +104,7 @@
}
private:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE {
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
gfx::Rect bounds = GetLocalBounds();
bounds.Inset(GetInsets());
render_text_->SetDisplayRect(bounds);
diff --git a/ui/views/examples/multiline_example.h b/ui/views/examples/multiline_example.h
index 94f4770..8b0888c 100644
--- a/ui/views/examples/multiline_example.h
+++ b/ui/views/examples/multiline_example.h
@@ -26,17 +26,17 @@
virtual ~MultilineExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
private:
class RenderTextView;
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
RenderTextView* render_text_view_;
Label* label_;
diff --git a/ui/views/examples/progress_bar_example.h b/ui/views/examples/progress_bar_example.h
index 8533b7a..c3291d1 100644
--- a/ui/views/examples/progress_bar_example.h
+++ b/ui/views/examples/progress_bar_example.h
@@ -21,11 +21,11 @@
virtual ~ProgressBarExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* button, const ui::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.h b/ui/views/examples/radio_button_example.h
index cc14522..844e315 100644
--- a/ui/views/examples/radio_button_example.h
+++ b/ui/views/examples/radio_button_example.h
@@ -25,11 +25,11 @@
virtual ~RadioButtonExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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 127442f..f6abfce 100644
--- a/ui/views/examples/scroll_view_example.cc
+++ b/ui/views/examples/scroll_view_example.cc
@@ -27,7 +27,7 @@
AddChildView(new RadioButton(ASCIIToUTF16("Radio Button"), 0));
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(width(), height());
}
@@ -41,7 +41,7 @@
view->SetBounds(0, y, size.width(), size.height());
}
- virtual void Layout() OVERRIDE {
+ virtual void Layout() override {
PlaceChildY(0, 0);
PlaceChildY(1, height() / 2);
SizeToPreferredSize();
diff --git a/ui/views/examples/scroll_view_example.h b/ui/views/examples/scroll_view_example.h
index d850b01..b3fd3bf 100644
--- a/ui/views/examples/scroll_view_example.h
+++ b/ui/views/examples/scroll_view_example.h
@@ -25,11 +25,11 @@
virtual ~ScrollViewExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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/single_split_view_example.cc b/ui/views/examples/single_split_view_example.cc
index 7e390b5..21dd88e 100644
--- a/ui/views/examples/single_split_view_example.cc
+++ b/ui/views/examples/single_split_view_example.cc
@@ -22,9 +22,9 @@
private:
// View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Layout() override;
DISALLOW_COPY_AND_ASSIGN(SplittedView);
};
diff --git a/ui/views/examples/single_split_view_example.h b/ui/views/examples/single_split_view_example.h
index 603482c..b53c5c3 100644
--- a/ui/views/examples/single_split_view_example.h
+++ b/ui/views/examples/single_split_view_example.h
@@ -20,11 +20,11 @@
virtual ~SingleSplitViewExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// SingleSplitViewListener:
- virtual bool SplitHandleMoved(SingleSplitView* sender) OVERRIDE;
+ virtual bool SplitHandleMoved(SingleSplitView* sender) override;
SingleSplitView* single_split_view_;
diff --git a/ui/views/examples/slider_example.h b/ui/views/examples/slider_example.h
index 32950f9..b27099b 100644
--- a/ui/views/examples/slider_example.h
+++ b/ui/views/examples/slider_example.h
@@ -21,14 +21,14 @@
virtual ~SliderExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// SliderListener:
virtual void SliderValueChanged(Slider* sender,
float value,
float old_value,
- SliderChangeReason reason) OVERRIDE;
+ SliderChangeReason reason) override;
Slider* slider_;
Label* label_;
diff --git a/ui/views/examples/tabbed_pane_example.h b/ui/views/examples/tabbed_pane_example.h
index f23f6b3..a211a75 100644
--- a/ui/views/examples/tabbed_pane_example.h
+++ b/ui/views/examples/tabbed_pane_example.h
@@ -26,14 +26,14 @@
virtual ~TabbedPaneExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
// TabbedPaneListener:
- virtual void TabSelectedAt(int index) OVERRIDE;
+ virtual void TabSelectedAt(int index) override;
// Print the status of the tab in the status area.
void PrintStatus();
diff --git a/ui/views/examples/table_example.h b/ui/views/examples/table_example.h
index 06ac3c0..5f51316 100644
--- a/ui/views/examples/table_example.h
+++ b/ui/views/examples/table_example.h
@@ -36,25 +36,25 @@
virtual ~TableExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
// ui::TableModel:
- virtual int RowCount() OVERRIDE;
- virtual base::string16 GetText(int row, int column_id) OVERRIDE;
- virtual gfx::ImageSkia GetIcon(int row) OVERRIDE;
- virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
+ virtual int RowCount() override;
+ virtual base::string16 GetText(int row, int column_id) override;
+ virtual gfx::ImageSkia GetIcon(int row) override;
+ virtual void SetObserver(ui::TableModelObserver* observer) override;
// TableGrouper:
- virtual void GetGroupRange(int model_index, GroupRange* range) OVERRIDE;
+ virtual void GetGroupRange(int model_index, GroupRange* range) override;
// TableViewObserver:
- virtual void OnSelectionChanged() OVERRIDE;
- virtual void OnDoubleClick() OVERRIDE;
- virtual void OnMiddleClick() OVERRIDE;
- virtual void OnKeyDown(ui::KeyboardCode virtual_keycode) OVERRIDE;
+ virtual void OnSelectionChanged() override;
+ virtual void OnDoubleClick() override;
+ virtual void OnMiddleClick() override;
+ virtual void OnKeyDown(ui::KeyboardCode virtual_keycode) override;
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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 3145cfc..4dcf113 100644
--- a/ui/views/examples/text_example.cc
+++ b/ui/views/examples/text_example.cc
@@ -69,7 +69,7 @@
elide_(gfx::NO_ELIDE) {
}
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
View::OnPaint(canvas);
const gfx::Rect bounds = GetContentsBounds();
const SkColor color = SK_ColorDKGRAY;
diff --git a/ui/views/examples/text_example.h b/ui/views/examples/text_example.h
index 18ebaab..dd4bffc 100644
--- a/ui/views/examples/text_example.h
+++ b/ui/views/examples/text_example.h
@@ -27,7 +27,7 @@
virtual ~TextExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// Creates and adds a check box to the layout.
@@ -40,10 +40,10 @@
int count);
// ButtonListener:
- virtual void ButtonPressed(Button* button, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* button, const ui::Event& event) override;
// ComboboxListener:
- virtual void OnPerformAction(Combobox* combobox) OVERRIDE;
+ virtual void OnPerformAction(Combobox* combobox) override;
class TextExampleView;
// The content of the scroll view.
diff --git a/ui/views/examples/textfield_example.h b/ui/views/examples/textfield_example.h
index db5e199..31aaaa9 100644
--- a/ui/views/examples/textfield_example.h
+++ b/ui/views/examples/textfield_example.h
@@ -27,19 +27,19 @@
virtual ~TextfieldExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) OVERRIDE;
+ const base::string16& new_contents) override;
virtual bool HandleKeyEvent(Textfield* sender,
- const ui::KeyEvent& key_event) OVERRIDE;
+ const ui::KeyEvent& key_event) override;
virtual bool HandleMouseEvent(Textfield* sender,
- const ui::MouseEvent& mouse_event) OVERRIDE;
+ const ui::MouseEvent& mouse_event) override;
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::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/throbber_example.cc b/ui/views/examples/throbber_example.cc
index 7bd18a2..51bbf3d 100644
--- a/ui/views/examples/throbber_example.cc
+++ b/ui/views/examples/throbber_example.cc
@@ -25,11 +25,11 @@
throbber_->Start();
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(width(), height());
}
- virtual void Layout() OVERRIDE {
+ virtual void Layout() override {
View* child = child_at(0);
gfx::Size ps = child->GetPreferredSize();
child->SetBounds((width() - ps.width()) / 2,
diff --git a/ui/views/examples/throbber_example.h b/ui/views/examples/throbber_example.h
index 3c4f9c0..dcac287 100644
--- a/ui/views/examples/throbber_example.h
+++ b/ui/views/examples/throbber_example.h
@@ -17,7 +17,7 @@
virtual ~ThrobberExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
DISALLOW_COPY_AND_ASSIGN(ThrobberExample);
diff --git a/ui/views/examples/tree_view_example.h b/ui/views/examples/tree_view_example.h
index 55af17f..4678b2a 100644
--- a/ui/views/examples/tree_view_example.h
+++ b/ui/views/examples/tree_view_example.h
@@ -31,7 +31,7 @@
virtual ~TreeViewExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// IDs used by the context menu.
@@ -48,24 +48,24 @@
bool IsCommandIdEnabled(int command_id);
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
// TreeViewController:
- virtual void OnTreeViewSelectionChanged(TreeView* tree_view) OVERRIDE;
- virtual bool CanEdit(TreeView* tree_view, ui::TreeModelNode* node) OVERRIDE;
+ virtual void OnTreeViewSelectionChanged(TreeView* tree_view) override;
+ virtual bool CanEdit(TreeView* tree_view, ui::TreeModelNode* node) override;
// ContextMenuController:
virtual void ShowContextMenuForView(View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
+ ui::MenuSourceType source_type) override;
// SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdChecked(int command_id) const override;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ ui::Accelerator* accelerator) override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
// The tree view to be tested.
TreeView* tree_view_;
diff --git a/ui/views/examples/webview_example.h b/ui/views/examples/webview_example.h
index 3e35fe9..e55aced 100644
--- a/ui/views/examples/webview_example.h
+++ b/ui/views/examples/webview_example.h
@@ -23,7 +23,7 @@
virtual ~WebViewExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
WebView* webview_;
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 1109a5a..2c061b7 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -24,10 +24,10 @@
public:
DialogExample();
virtual ~DialogExample();
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual View* CreateExtraView() OVERRIDE;
- virtual View* CreateTitlebarExtraView() OVERRIDE;
- virtual View* CreateFootnoteView() OVERRIDE;
+ virtual base::string16 GetWindowTitle() const override;
+ virtual View* CreateExtraView() override;
+ virtual View* CreateTitlebarExtraView() override;
+ virtual View* CreateFootnoteView() override;
};
DialogExample::DialogExample() {
diff --git a/ui/views/examples/widget_example.h b/ui/views/examples/widget_example.h
index ff08d70..44e1840 100644
--- a/ui/views/examples/widget_example.h
+++ b/ui/views/examples/widget_example.h
@@ -23,7 +23,7 @@
virtual ~WidgetExample();
// ExampleBase:
- virtual void CreateExampleView(View* container) OVERRIDE;
+ virtual void CreateExampleView(View* container) override;
private:
// Button tags used to identify various commands.
@@ -41,7 +41,7 @@
void ShowWidget(View* sender, Widget::InitParams params);
// ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
DISALLOW_COPY_AND_ASSIGN(WidgetExample);
};
diff --git a/ui/views/focus/external_focus_tracker.h b/ui/views/focus/external_focus_tracker.h
index e4d9172..3cfacb3 100644
--- a/ui/views/focus/external_focus_tracker.h
+++ b/ui/views/focus/external_focus_tracker.h
@@ -33,9 +33,9 @@
// FocusChangeListener:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
// Focuses last focused view which is not a child of parent view and is not
// parent view itself. Returns true if focus for a view was requested, false
diff --git a/ui/views/focus/focus_manager_factory.cc b/ui/views/focus/focus_manager_factory.cc
index 62770d7..bcbbfba 100644
--- a/ui/views/focus/focus_manager_factory.cc
+++ b/ui/views/focus/focus_manager_factory.cc
@@ -18,7 +18,7 @@
protected:
virtual FocusManager* CreateFocusManager(Widget* widget,
- bool desktop_widget) OVERRIDE {
+ bool desktop_widget) override {
return new FocusManager(widget, NULL /* delegate */);
}
diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc
index 289ed23..f6d9a43 100644
--- a/ui/views/focus/focus_manager_unittest.cc
+++ b/ui/views/focus/focus_manager_unittest.cc
@@ -48,11 +48,11 @@
set_id(view_id);
}
- virtual void OnFocus() OVERRIDE {
+ virtual void OnFocus() override {
event_list_->push_back(FocusTestEvent(ON_FOCUS, id()));
}
- virtual void OnBlur() OVERRIDE {
+ virtual void OnBlur() override {
event_list_->push_back(FocusTestEvent(ON_BLUR, id()));
}
@@ -165,12 +165,12 @@
process_accelerator_(process_accelerator),
can_handle_accelerators_(true) {}
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE {
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override {
++accelerator_count_;
return process_accelerator_;
}
- virtual bool CanHandleAccelerators() const OVERRIDE {
+ virtual bool CanHandleAccelerators() const override {
return can_handle_accelerators_;
}
@@ -425,13 +425,13 @@
accelerator_count_(0) {
}
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE {
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override {
++accelerator_count_;
focus_manager_->UnregisterAccelerator(accelerator, this);
return true;
}
- virtual bool CanHandleAccelerators() const OVERRIDE {
+ virtual bool CanHandleAccelerators() const override {
return true;
}
@@ -499,7 +499,7 @@
}
virtual FocusManager* CreateFocusManager(Widget* widget,
- bool desktop_widget) OVERRIDE {
+ bool desktop_widget) override {
return new FocusManagerDtorTracked(widget, dtor_tracker_);
}
@@ -568,7 +568,7 @@
void set_view_to_focus(View* view) { view_to_focus_ = view; }
- virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE {
+ virtual void AboutToRequestFocusFromTabTraversal(bool reverse) override {
view_to_focus_->RequestFocus();
}
@@ -706,13 +706,13 @@
virtual ~FocusManagerArrowKeyTraversalTest() {}
// FocusManagerTest overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
FocusManagerTest::SetUp();
previous_arrow_key_traversal_enabled_ =
FocusManager::arrow_key_traversal_enabled();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
FocusManager::set_arrow_key_traversal_enabled(
previous_arrow_key_traversal_enabled_);
FocusManagerTest::TearDown();
@@ -786,7 +786,7 @@
public:
TextInputTestView() {}
- virtual ui::TextInputClient* GetTextInputClient() OVERRIDE {
+ virtual ui::TextInputClient* GetTextInputClient() override {
return &text_input_client_;
}
@@ -852,11 +852,11 @@
}
// WidgetDelegate overrides:
- virtual bool ShouldAdvanceFocusToTopLevelWidget() const OVERRIDE {
+ virtual bool ShouldAdvanceFocusToTopLevelWidget() const override {
return should_advance_focus_to_parent_;
}
- virtual Widget* GetWidget() OVERRIDE { return widget_; }
- virtual const Widget* GetWidget() const OVERRIDE { return widget_; }
+ virtual Widget* GetWidget() override { return widget_; }
+ virtual const Widget* GetWidget() const override { return widget_; }
private:
Widget* widget_;
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc
index ea68b16..db55e9d 100644
--- a/ui/views/focus/focus_traversal_unittest.cc
+++ b/ui/views/focus/focus_traversal_unittest.cc
@@ -89,8 +89,8 @@
class DummyComboboxModel : public ui::ComboboxModel {
public:
// Overridden from ui::ComboboxModel:
- virtual int GetItemCount() const OVERRIDE { return 10; }
- virtual base::string16 GetItemAt(int index) OVERRIDE {
+ virtual int GetItemCount() const override { return 10; }
+ virtual base::string16 GetItemAt(int index) override {
return ASCIIToUTF16("Item ") + base::IntToString16(index);
}
};
@@ -108,7 +108,7 @@
}
// Overridden from View:
- virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE {
+ virtual FocusTraversable* GetPaneFocusTraversable() override {
if (focus_search_)
return this;
else
@@ -116,13 +116,13 @@
}
// Overridden from FocusTraversable:
- virtual views::FocusSearch* GetFocusSearch() OVERRIDE {
+ virtual views::FocusSearch* GetFocusSearch() override {
return focus_search_;
}
- virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE {
+ virtual FocusTraversable* GetFocusTraversableParent() override {
return NULL;
}
- virtual View* GetFocusTraversableParentView() OVERRIDE {
+ virtual View* GetFocusTraversableParentView() override {
return NULL;
}
@@ -146,12 +146,12 @@
return static_cast<internal::RootView*>(widget_->GetRootView());
}
- virtual FocusTraversable* GetFocusTraversable() OVERRIDE {
+ virtual FocusTraversable* GetFocusTraversable() override {
return static_cast<internal::RootView*>(widget_->GetRootView());
}
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
+ const ViewHierarchyChangedDetails& details) override {
NativeViewHost::ViewHierarchyChanged(details);
if (details.child == this && details.is_add) {
@@ -185,7 +185,7 @@
public:
virtual ~FocusTraversalTest();
- virtual void InitContentView() OVERRIDE;
+ virtual void InitContentView() override;
protected:
FocusTraversalTest();
diff --git a/ui/views/ime/input_method_base.h b/ui/views/ime/input_method_base.h
index da454fb..4410796 100644
--- a/ui/views/ime/input_method_base.h
+++ b/ui/views/ime/input_method_base.h
@@ -29,16 +29,16 @@
virtual ~InputMethodBase();
// Overridden from InputMethod.
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE;
- virtual void Init(Widget* widget) OVERRIDE;
- virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE;
- virtual ui::TextInputType GetTextInputType() const OVERRIDE;
- virtual bool IsMock() const OVERRIDE;
+ virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ virtual void Init(Widget* widget) override;
+ virtual void OnTextInputTypeChanged(View* view) override;
+ virtual ui::TextInputClient* GetTextInputClient() const override;
+ virtual ui::TextInputType GetTextInputType() const override;
+ virtual bool IsMock() const override;
// Overridden from FocusChangeListener.
- virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE;
- virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE;
+ virtual void OnWillChangeFocus(View* focused_before, View* focused) override;
+ virtual void OnDidChangeFocus(View* focused_before, View* focused) override;
protected:
internal::InputMethodDelegate* delegate() const { return delegate_; }
diff --git a/ui/views/ime/input_method_bridge.cc b/ui/views/ime/input_method_bridge.cc
index 97b0400..8e321f0 100644
--- a/ui/views/ime/input_method_bridge.cc
+++ b/ui/views/ime/input_method_bridge.cc
@@ -24,16 +24,16 @@
virtual ~HostObserver();
virtual void OnTextInputTypeChanged(
- const ui::TextInputClient* client) OVERRIDE {}
- virtual void OnFocus() OVERRIDE {}
- virtual void OnBlur() OVERRIDE {}
+ const ui::TextInputClient* client) override {}
+ virtual void OnFocus() override {}
+ virtual void OnBlur() override {}
virtual void OnCaretBoundsChanged(
- const ui::TextInputClient* client) OVERRIDE {}
+ const ui::TextInputClient* client) override {}
virtual void OnTextInputStateChanged(
- const ui::TextInputClient* client) OVERRIDE {}
+ const ui::TextInputClient* client) override {}
virtual void OnInputMethodDestroyed(
- const ui::InputMethod* input_method) OVERRIDE;
- virtual void OnShowImeIfNeeded() OVERRIDE {}
+ const ui::InputMethod* input_method) override;
+ virtual void OnShowImeIfNeeded() override {}
private:
InputMethodBridge* bridge_;
diff --git a/ui/views/ime/input_method_bridge.h b/ui/views/ime/input_method_bridge.h
index cdabecd..43fb947 100644
--- a/ui/views/ime/input_method_bridge.h
+++ b/ui/views/ime/input_method_bridge.h
@@ -35,56 +35,56 @@
virtual ~InputMethodBridge();
// Overridden from InputMethod:
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
- virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
- virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
- virtual void CancelComposition(View* view) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
+ NativeEventResult* result) override;
+ virtual void DispatchKeyEvent(const ui::KeyEvent& key) override;
+ virtual void OnTextInputTypeChanged(View* view) override;
+ virtual void OnCaretBoundsChanged(View* view) override;
+ virtual void CancelComposition(View* view) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
+ virtual void ShowImeIfNeeded() override;
// Overridden from TextInputClient:
virtual void SetCompositionText(
- const ui::CompositionText& composition) OVERRIDE;
- virtual void ConfirmCompositionText() OVERRIDE;
- virtual void ClearCompositionText() OVERRIDE;
- virtual void InsertText(const base::string16& text) OVERRIDE;
- virtual void InsertChar(base::char16 ch, int flags) OVERRIDE;
- virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
- virtual ui::TextInputType GetTextInputType() const OVERRIDE;
- virtual ui::TextInputMode GetTextInputMode() const OVERRIDE;
- virtual bool CanComposeInline() const OVERRIDE;
- virtual gfx::Rect GetCaretBounds() const OVERRIDE;
+ const ui::CompositionText& composition) override;
+ virtual void ConfirmCompositionText() override;
+ virtual void ClearCompositionText() override;
+ virtual void InsertText(const base::string16& text) override;
+ virtual void InsertChar(base::char16 ch, int flags) override;
+ virtual gfx::NativeWindow GetAttachedWindow() const override;
+ virtual ui::TextInputType GetTextInputType() const override;
+ virtual ui::TextInputMode GetTextInputMode() const override;
+ virtual bool CanComposeInline() const override;
+ virtual gfx::Rect GetCaretBounds() const override;
virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const OVERRIDE;
- virtual bool HasCompositionText() const OVERRIDE;
- virtual bool GetTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE;
- virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE;
- virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE;
- virtual bool DeleteRange(const gfx::Range& range) OVERRIDE;
+ gfx::Rect* rect) const override;
+ virtual bool HasCompositionText() const override;
+ virtual bool GetTextRange(gfx::Range* range) const override;
+ virtual bool GetCompositionTextRange(gfx::Range* range) const override;
+ virtual bool GetSelectionRange(gfx::Range* range) const override;
+ virtual bool SetSelectionRange(const gfx::Range& range) override;
+ virtual bool DeleteRange(const gfx::Range& range) override;
virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const OVERRIDE;
- virtual void OnInputMethodChanged() OVERRIDE;
+ base::string16* text) const override;
+ virtual void OnInputMethodChanged() override;
virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) OVERRIDE;
- virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE;
- virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void OnCandidateWindowShown() OVERRIDE;
- virtual void OnCandidateWindowUpdated() OVERRIDE;
- virtual void OnCandidateWindowHidden() OVERRIDE;
- virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE;
- virtual void ExecuteEditingCommand(int command_id) OVERRIDE;
+ base::i18n::TextDirection direction) override;
+ virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
+ virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
+ virtual void OnCandidateWindowShown() override;
+ virtual void OnCandidateWindowUpdated() override;
+ virtual void OnCandidateWindowHidden() override;
+ virtual bool IsEditingCommandEnabled(int command_id) override;
+ virtual void ExecuteEditingCommand(int command_id) override;
// Overridden from FocusChangeListener.
- virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE;
- virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE;
+ virtual void OnWillChangeFocus(View* focused_before, View* focused) override;
+ virtual void OnDidChangeFocus(View* focused_before, View* focused) override;
ui::InputMethod* GetHostInputMethod() const;
diff --git a/ui/views/ime/mock_input_method.h b/ui/views/ime/mock_input_method.h
index 013742c..e55c4df 100644
--- a/ui/views/ime/mock_input_method.h
+++ b/ui/views/ime/mock_input_method.h
@@ -23,21 +23,21 @@
virtual ~MockInputMethod();
// Overridden from InputMethod:
- virtual void Init(Widget* widget) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void Init(Widget* widget) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
- virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
- virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
- virtual void CancelComposition(View* view) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
- virtual bool IsMock() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual void DispatchKeyEvent(const ui::KeyEvent& key) override;
+ virtual void OnTextInputTypeChanged(View* view) override;
+ virtual void OnCaretBoundsChanged(View* view) override;
+ virtual void CancelComposition(View* view) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual bool IsCandidatePopupOpen() const override;
+ virtual void ShowImeIfNeeded() override;
+ virtual bool IsMock() const override;
bool focus_changed() const { return focus_changed_; }
bool untranslated_ime_message_called() const {
@@ -59,7 +59,7 @@
private:
// Overridden from InputMethodBase.
- virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE;
+ virtual void OnWillChangeFocus(View* focused_before, View* focused) override;
// Clears boolean states defined below.
void ClearStates();
diff --git a/ui/views/ime/null_input_method.h b/ui/views/ime/null_input_method.h
index 49234d3..29142e6 100644
--- a/ui/views/ime/null_input_method.h
+++ b/ui/views/ime/null_input_method.h
@@ -22,24 +22,24 @@
NullInputMethod();
// Overridden from InputMethod:
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE;
- virtual void Init(Widget* widget) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
+ virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ virtual void Init(Widget* widget) override;
+ virtual void OnFocus() override;
+ virtual void OnBlur() override;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) OVERRIDE;
- virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
- virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
- virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
- virtual void CancelComposition(View* view) OVERRIDE;
- virtual void OnInputLocaleChanged() OVERRIDE;
- virtual std::string GetInputLocale() OVERRIDE;
- virtual bool IsActive() OVERRIDE;
- virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE;
- virtual ui::TextInputType GetTextInputType() const OVERRIDE;
- virtual bool IsCandidatePopupOpen() const OVERRIDE;
- virtual void ShowImeIfNeeded() OVERRIDE;
- virtual bool IsMock() const OVERRIDE;
+ NativeEventResult* result) override;
+ virtual void DispatchKeyEvent(const ui::KeyEvent& key) override;
+ virtual void OnTextInputTypeChanged(View* view) override;
+ virtual void OnCaretBoundsChanged(View* view) override;
+ virtual void CancelComposition(View* view) override;
+ virtual void OnInputLocaleChanged() override;
+ virtual std::string GetInputLocale() override;
+ virtual bool IsActive() override;
+ virtual ui::TextInputClient* GetTextInputClient() const override;
+ virtual ui::TextInputType GetTextInputType() const override;
+ virtual bool IsCandidatePopupOpen() const override;
+ virtual void ShowImeIfNeeded() override;
+ virtual bool IsMock() const override;
private:
DISALLOW_COPY_AND_ASSIGN(NullInputMethod);
diff --git a/ui/views/layout/box_layout.h b/ui/views/layout/box_layout.h
index 1bcbcf9..b07afaf 100644
--- a/ui/views/layout/box_layout.h
+++ b/ui/views/layout/box_layout.h
@@ -98,13 +98,13 @@
void SetDefaultFlex(int default_flex);
// Overridden from views::LayoutManager:
- virtual void Installed(View* host) OVERRIDE;
- virtual void Uninstalled(View* host) OVERRIDE;
- virtual void ViewRemoved(View* host, View* view) OVERRIDE;
- virtual void Layout(View* host) OVERRIDE;
- virtual gfx::Size GetPreferredSize(const View* host) const OVERRIDE;
+ virtual void Installed(View* host) override;
+ virtual void Uninstalled(View* host) override;
+ virtual void ViewRemoved(View* host, View* view) override;
+ virtual void Layout(View* host) override;
+ virtual gfx::Size GetPreferredSize(const View* host) const override;
virtual int GetPreferredHeightForWidth(const View* host,
- int width) const OVERRIDE;
+ int width) const override;
private:
// Returns the flex for the specified |view|.
diff --git a/ui/views/layout/box_layout_unittest.cc b/ui/views/layout/box_layout_unittest.cc
index c5a5edd..708d2fe 100644
--- a/ui/views/layout/box_layout_unittest.cc
+++ b/ui/views/layout/box_layout_unittest.cc
@@ -14,7 +14,7 @@
class BoxLayoutTest : public testing::Test {
public:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
host_.reset(new View);
}
diff --git a/ui/views/layout/fill_layout.h b/ui/views/layout/fill_layout.h
index f50bde0..7496f7c 100644
--- a/ui/views/layout/fill_layout.h
+++ b/ui/views/layout/fill_layout.h
@@ -24,10 +24,10 @@
virtual ~FillLayout();
// Overridden from LayoutManager:
- virtual void Layout(View* host) OVERRIDE;
- virtual gfx::Size GetPreferredSize(const View* host) const OVERRIDE;
+ virtual void Layout(View* host) override;
+ virtual gfx::Size GetPreferredSize(const View* host) const override;
virtual int GetPreferredHeightForWidth(const View* host,
- int width) const OVERRIDE;
+ int width) const override;
private:
DISALLOW_COPY_AND_ASSIGN(FillLayout);
diff --git a/ui/views/layout/grid_layout.cc b/ui/views/layout/grid_layout.cc
index 7ab8108..99b39f2 100644
--- a/ui/views/layout/grid_layout.cc
+++ b/ui/views/layout/grid_layout.cc
@@ -178,7 +178,7 @@
GridLayout::Alignment h_align() { return h_align_; }
GridLayout::Alignment v_align() { return v_align_; }
- virtual void ResetSize() OVERRIDE;
+ virtual void ResetSize() override;
private:
friend class ColumnSet;
@@ -190,7 +190,7 @@
// to that size. This should only be used for the master column.
void UnifySameSizedColumnSizes();
- virtual void AdjustSize(int size) OVERRIDE;
+ virtual void AdjustSize(int size) override;
const GridLayout::Alignment h_align_;
const GridLayout::Alignment v_align_;
@@ -269,7 +269,7 @@
virtual ~Row() {}
- virtual void ResetSize() OVERRIDE {
+ virtual void ResetSize() override {
max_ascent_ = max_descent_ = 0;
SetSize(height_);
}
diff --git a/ui/views/layout/grid_layout.h b/ui/views/layout/grid_layout.h
index ea578c8..ad228d5 100644
--- a/ui/views/layout/grid_layout.h
+++ b/ui/views/layout/grid_layout.h
@@ -162,26 +162,26 @@
// Notification we've been installed on a particular host. Checks that host
// is the same as the View supplied in the constructor.
- virtual void Installed(View* host) OVERRIDE;
+ virtual void Installed(View* host) override;
// Notification we've been uninstalled on a particular host. Checks that host
// is the same as the View supplied in the constructor.
- virtual void Uninstalled(View* host) OVERRIDE;
+ virtual void Uninstalled(View* host) override;
// Notification that a view has been added.
- virtual void ViewAdded(View* host, View* view) OVERRIDE;
+ virtual void ViewAdded(View* host, View* view) override;
// Notification that a view has been removed.
- virtual void ViewRemoved(View* host, View* view) OVERRIDE;
+ virtual void ViewRemoved(View* host, View* view) override;
// Layouts out the components.
- virtual void Layout(View* host) OVERRIDE;
+ virtual void Layout(View* host) override;
// Returns the preferred size for the GridLayout.
- virtual gfx::Size GetPreferredSize(const View* host) const OVERRIDE;
+ virtual gfx::Size GetPreferredSize(const View* host) const override;
virtual int GetPreferredHeightForWidth(const View* host,
- int width) const OVERRIDE;
+ int width) const override;
void set_minimum_size(const gfx::Size& size) { minimum_size_ = size; }
diff --git a/ui/views/layout/grid_layout_unittest.cc b/ui/views/layout/grid_layout_unittest.cc
index ea7d231..72f5053 100644
--- a/ui/views/layout/grid_layout_unittest.cc
+++ b/ui/views/layout/grid_layout_unittest.cc
@@ -24,7 +24,7 @@
pref_ = pref;
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return pref_;
}
@@ -39,11 +39,11 @@
circumference_ = circumference;
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(0, circumference_ / 2);
}
- virtual int GetHeightForWidth(int width) const OVERRIDE {
+ virtual int GetHeightForWidth(int width) const override {
return std::max(0, circumference_ / 2 - width);
}
diff --git a/ui/views/linux_ui/window_button_order_provider.cc b/ui/views/linux_ui/window_button_order_provider.cc
index 9032478..fa65cab 100644
--- a/ui/views/linux_ui/window_button_order_provider.cc
+++ b/ui/views/linux_ui/window_button_order_provider.cc
@@ -20,7 +20,7 @@
// WindowButtonOrderObserver:
virtual void OnWindowButtonOrderingChange(
const std::vector<views::FrameButton>& leading_buttons,
- const std::vector<views::FrameButton>& trailing_buttons) OVERRIDE;
+ const std::vector<views::FrameButton>& trailing_buttons) override;
private:
DISALLOW_COPY_AND_ASSIGN(WindowButtonOrderObserverDelegate);
};
diff --git a/ui/views/masked_targeter_delegate.h b/ui/views/masked_targeter_delegate.h
index 548a364..ee8701c 100644
--- a/ui/views/masked_targeter_delegate.h
+++ b/ui/views/masked_targeter_delegate.h
@@ -32,7 +32,7 @@
// ViewTargeterDelegate:
virtual bool DoesIntersectRect(const View* target,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
private:
DISALLOW_COPY_AND_ASSIGN(MaskedTargeterDelegate);
diff --git a/ui/views/mouse_watcher_aura.cc b/ui/views/mouse_watcher_aura.cc
index 3793f0e..6fa463b 100644
--- a/ui/views/mouse_watcher_aura.cc
+++ b/ui/views/mouse_watcher_aura.cc
@@ -36,7 +36,7 @@
}
// ui::EventHandler implementation:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
switch (event->type()) {
case ui::ET_MOUSE_MOVED:
case ui::ET_MOUSE_DRAGGED:
diff --git a/ui/views/mouse_watcher_view_host.h b/ui/views/mouse_watcher_view_host.h
index f19aa8f..ada3444 100644
--- a/ui/views/mouse_watcher_view_host.h
+++ b/ui/views/mouse_watcher_view_host.h
@@ -23,7 +23,7 @@
// MouseWatcherHost.
virtual bool Contains(const gfx::Point& screen_point,
- MouseEventType type) OVERRIDE;
+ MouseEventType type) override;
private:
bool IsCursorInViewZone(const gfx::Point& screen_point);
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index df67030..37a5a30 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -30,8 +30,8 @@
virtual ~DashedFocusPainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
const gfx::Insets insets_;
@@ -64,8 +64,8 @@
virtual ~SolidFocusPainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
const SkColor color_;
@@ -104,8 +104,8 @@
virtual ~GradientPainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
// If |horizontal_| is true then the gradient is painted horizontally.
@@ -175,8 +175,8 @@
virtual ~ImagePainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
scoped_ptr<gfx::NineImagePainter> nine_painter_;
diff --git a/ui/views/painter.h b/ui/views/painter.h
index 6efd281..e703150 100644
--- a/ui/views/painter.h
+++ b/ui/views/painter.h
@@ -100,8 +100,8 @@
virtual ~HorizontalPainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
// The image chunks.
diff --git a/ui/views/round_rect_painter.h b/ui/views/round_rect_painter.h
index b7ee6cc..e498e8c 100644
--- a/ui/views/round_rect_painter.h
+++ b/ui/views/round_rect_painter.h
@@ -24,8 +24,8 @@
virtual ~RoundRectPainter();
// Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
const SkColor border_color_;
diff --git a/ui/views/run_all_unittests.cc b/ui/views/run_all_unittests.cc
index e5d7b9d..bf7624c 100644
--- a/ui/views/run_all_unittests.cc
+++ b/ui/views/run_all_unittests.cc
@@ -18,7 +18,7 @@
ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
base::TestSuite::Initialize();
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
@@ -28,7 +28,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/views/shadow_border.h b/ui/views/shadow_border.h
index 60439f5..b6aff3f 100644
--- a/ui/views/shadow_border.h
+++ b/ui/views/shadow_border.h
@@ -22,9 +22,9 @@
protected:
// Overridden from views::Border:
- virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual void Paint(const views::View& view, gfx::Canvas* canvas) override;
+ virtual gfx::Insets GetInsets() const override;
+ virtual gfx::Size GetMinimumSize() const override;
private:
// Blur amount of the shadow in pixels. For details on how blur is defined see
diff --git a/ui/views/test/capture_tracking_view.h b/ui/views/test/capture_tracking_view.h
index fa914d1..a80cab0 100644
--- a/ui/views/test/capture_tracking_view.h
+++ b/ui/views/test/capture_tracking_view.h
@@ -26,8 +26,8 @@
void reset() { got_press_ = got_capture_lost_ = false; }
// Overridden from views::View
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
private:
// See description above getters.
diff --git a/ui/views/test/desktop_test_views_delegate.h b/ui/views/test/desktop_test_views_delegate.h
index 32f2ad7..26d24c2 100644
--- a/ui/views/test/desktop_test_views_delegate.h
+++ b/ui/views/test/desktop_test_views_delegate.h
@@ -19,7 +19,7 @@
// Overridden from ViewsDelegate:
virtual void OnBeforeWidgetInit(Widget::InitParams* params,
- internal::NativeWidgetDelegate* delegate) OVERRIDE;
+ internal::NativeWidgetDelegate* delegate) override;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopTestViewsDelegate);
diff --git a/ui/views/test/event_generator_delegate_mac.mm b/ui/views/test/event_generator_delegate_mac.mm
index db94d34..d156aa5 100644
--- a/ui/views/test/event_generator_delegate_mac.mm
+++ b/ui/views/test/event_generator_delegate_mac.mm
@@ -243,47 +243,47 @@
}
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE { return true; }
- virtual ui::EventTarget* GetParentTarget() OVERRIDE { return NULL; }
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual ui::EventTargeter* GetEventTargeter() OVERRIDE {
+ virtual bool CanAcceptEvent(const ui::Event& event) override { return true; }
+ virtual ui::EventTarget* GetParentTarget() override { return NULL; }
+ virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ virtual ui::EventTargeter* GetEventTargeter() override {
return this;
}
// Overridden from ui::EventHandler (via ui::EventTarget):
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
// Overridden from ui::EventSource:
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE { return this; }
+ virtual ui::EventProcessor* GetEventProcessor() override { return this; }
// Overridden from ui::EventProcessor:
- virtual ui::EventTarget* GetRootTarget() OVERRIDE { return this; }
+ virtual ui::EventTarget* GetRootTarget() override { return this; }
// Overridden from ui::EventDispatcherDelegate (via ui::EventProcessor):
- virtual bool CanDispatchToTarget(EventTarget* target) OVERRIDE {
+ virtual bool CanDispatchToTarget(EventTarget* target) override {
return true;
}
// Overridden from ui::test::EventGeneratorDelegate:
virtual void SetContext(ui::test::EventGenerator* owner,
gfx::NativeWindow root_window,
- gfx::NativeWindow window) OVERRIDE;
- virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) OVERRIDE {
+ gfx::NativeWindow window) override;
+ virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) override {
return this;
}
- virtual ui::EventSource* GetEventSource(ui::EventTarget* target) OVERRIDE {
+ virtual ui::EventSource* GetEventSource(ui::EventTarget* target) override {
return this;
}
virtual gfx::Point CenterOfTarget(
- const ui::EventTarget* target) const OVERRIDE;
- virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const OVERRIDE;
+ const ui::EventTarget* target) const override;
+ virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const override;
virtual void ConvertPointFromTarget(const ui::EventTarget* target,
- gfx::Point* point) const OVERRIDE {}
+ gfx::Point* point) const override {}
virtual void ConvertPointToTarget(const ui::EventTarget* target,
- gfx::Point* point) const OVERRIDE {}
+ gfx::Point* point) const override {}
virtual void ConvertPointFromHost(const ui::EventTarget* hosted_target,
- gfx::Point* point) const OVERRIDE {}
+ gfx::Point* point) const override {}
private:
friend struct DefaultSingletonTraits<EventGeneratorDelegateMac>;
diff --git a/ui/views/test/focus_manager_test.h b/ui/views/test/focus_manager_test.h
index 380d6f3..39184d2 100644
--- a/ui/views/test/focus_manager_test.h
+++ b/ui/views/test/focus_manager_test.h
@@ -23,14 +23,14 @@
FocusManager* GetFocusManager();
// Overridden from ViewsTestBase:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
// Overridden from WidgetDelegate:
- virtual View* GetContentsView() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual void GetAccessiblePanes(std::vector<View*>* panes) OVERRIDE;
+ virtual View* GetContentsView() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
+ virtual void GetAccessiblePanes(std::vector<View*>* panes) override;
protected:
// Called after the Widget is initialized and the content view is added.
@@ -65,9 +65,9 @@
// Overridden from FocusChangeListener:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
private:
// A vector of which views lost/gained focus.
@@ -91,7 +91,7 @@
// Overridden from WidgetFocusChangeListener:
virtual void OnNativeFocusChange(gfx::NativeView focused_before,
- gfx::NativeView focused_now) OVERRIDE;
+ gfx::NativeView focused_now) override;
private:
// Pairs of (focused_before, focused_now) parameters we've received via calls
diff --git a/ui/views/test/test_views.h b/ui/views/test/test_views.h
index be6f778..429e59f 100644
--- a/ui/views/test/test_views.h
+++ b/ui/views/test/test_views.h
@@ -16,7 +16,7 @@
explicit StaticSizedView(const gfx::Size& size);
virtual ~StaticSizedView();
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
private:
gfx::Size size_;
@@ -32,8 +32,8 @@
void set_preferred_width(int width) { preferred_width_ = width; }
- virtual int GetHeightForWidth(int w) const OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual int GetHeightForWidth(int w) const override;
+ virtual gfx::Size GetPreferredSize() const override;
private:
// The multiplicative factor between width and height, i.e.
diff --git a/ui/views/test/test_views_delegate.h b/ui/views/test/test_views_delegate.h
index 626bc79..20802e7 100644
--- a/ui/views/test/test_views_delegate.h
+++ b/ui/views/test/test_views_delegate.h
@@ -33,7 +33,7 @@
// ViewsDelegate:
virtual void OnBeforeWidgetInit(
Widget::InitParams* params,
- internal::NativeWidgetDelegate* delegate) OVERRIDE;
+ internal::NativeWidgetDelegate* delegate) override;
private:
bool use_desktop_native_widgets_;
diff --git a/ui/views/test/test_widget_observer.h b/ui/views/test/test_widget_observer.h
index 84bf185..064db84 100644
--- a/ui/views/test/test_widget_observer.h
+++ b/ui/views/test/test_widget_observer.h
@@ -24,7 +24,7 @@
private:
// WidgetObserver overrides:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
Widget* widget_;
diff --git a/ui/views/test/ui_controls_factory_desktop_aurax11.cc b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
index a7982bf..201f884 100644
--- a/ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -77,7 +77,7 @@
bool control,
bool shift,
bool alt,
- bool command) OVERRIDE {
+ bool command) override {
DCHECK(!command); // No command key on Aura
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
@@ -90,7 +90,7 @@
bool shift,
bool alt,
bool command,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
DCHECK(!command); // No command key on Aura
aura::WindowTreeHost* host = window->GetHost();
@@ -124,13 +124,13 @@
return true;
}
- virtual bool SendMouseMove(long screen_x, long screen_y) OVERRIDE {
+ virtual bool SendMouseMove(long screen_x, long screen_y) override {
return SendMouseMoveNotifyWhenDone(screen_x, screen_y, base::Closure());
}
virtual bool SendMouseMoveNotifyWhenDone(
long screen_x,
long screen_y,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
gfx::Point screen_location(screen_x, screen_y);
gfx::Point root_location = screen_location;
aura::Window* root_window = RootWindowForPoint(screen_location);
@@ -165,13 +165,13 @@
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseEvents(MouseButton type, int state) OVERRIDE {
+ virtual bool SendMouseEvents(MouseButton type, int state) override {
return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
}
virtual bool SendMouseEventsNotifyWhenDone(
MouseButton type,
int state,
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
XEvent xevent = {0};
XButtonEvent* xbutton = &xevent.xbutton;
gfx::Point mouse_loc = aura::Env::GetInstance()->last_mouse_location();
@@ -211,11 +211,11 @@
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseClick(MouseButton type) OVERRIDE {
+ virtual bool SendMouseClick(MouseButton type) override {
return SendMouseEvents(type, UP | DOWN);
}
virtual void RunClosureAfterAllPendingUIEvents(
- const base::Closure& closure) OVERRIDE {
+ const base::Closure& closure) override {
if (closure.is_null())
return;
static XEvent* marker_event = NULL;
diff --git a/ui/views/test/views_test_base.h b/ui/views/test/views_test_base.h
index 6664cba..9339da3 100644
--- a/ui/views/test/views_test_base.h
+++ b/ui/views/test/views_test_base.h
@@ -27,8 +27,8 @@
virtual ~ViewsTestBase();
// testing::Test:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
void RunPendingMessages();
diff --git a/ui/views/test/views_test_helper_aura.h b/ui/views/test/views_test_helper_aura.h
index 77733bb..87d48ae 100644
--- a/ui/views/test/views_test_helper_aura.h
+++ b/ui/views/test/views_test_helper_aura.h
@@ -33,9 +33,9 @@
virtual ~ViewsTestHelperAura();
// Overridden from ViewsTestHelper:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
- virtual gfx::NativeWindow GetContext() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
+ virtual gfx::NativeWindow GetContext() override;
private:
ui::ContextFactory* context_factory_;
diff --git a/ui/views/test/widget_test.h b/ui/views/test/widget_test.h
index 1c06fac..dfeca47 100644
--- a/ui/views/test/widget_test.h
+++ b/ui/views/test/widget_test.h
@@ -51,9 +51,9 @@
explicit NativeWidgetCapture(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetCapture();
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual bool HasCapture() const override;
private:
bool mouse_capture_;
diff --git a/ui/views/test/x11_property_change_waiter.h b/ui/views/test/x11_property_change_waiter.h
index 366b9cb..af4ef71 100644
--- a/ui/views/test/x11_property_change_waiter.h
+++ b/ui/views/test/x11_property_change_waiter.h
@@ -37,8 +37,8 @@
private:
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
XID x_window_;
const char* property_;
diff --git a/ui/views/touchui/touch_editing_menu.h b/ui/views/touchui/touch_editing_menu.h
index 19f0d34..0dfff49 100644
--- a/ui/views/touchui/touch_editing_menu.h
+++ b/ui/views/touchui/touch_editing_menu.h
@@ -58,13 +58,13 @@
gfx::NativeView context);
// views::WidgetDelegate overrides:
- virtual void WindowClosing() OVERRIDE;
+ virtual void WindowClosing() override;
// Overridden from ButtonListener.
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
// Overridden from BubbleDelegateView.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
// Queries the |controller_| for what elements to show in the menu and sizes
// the menu appropriately.
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index 4b09762..36b73d1 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -138,7 +138,7 @@
private:
// wm::MaskedWindowTargeter:
virtual bool GetHitTestMask(aura::Window* window,
- gfx::Path* mask) const OVERRIDE;
+ gfx::Path* mask) const override;
EditingHandleView* handle_view_;
@@ -170,11 +170,11 @@
}
// Overridden from views::WidgetDelegateView:
- virtual bool WidgetHasHitTestMask() const OVERRIDE {
+ virtual bool WidgetHasHitTestMask() const override {
return true;
}
- virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE {
+ virtual void GetWidgetHitTestMask(gfx::Path* mask) const override {
gfx::Size image_size = GetHandleImageSize();
mask->addRect(SkIntToScalar(0), SkIntToScalar(selection_rect_.height()),
SkIntToScalar(image_size.width()) + 2 * kSelectionHandleHorizPadding,
@@ -182,12 +182,12 @@
kSelectionHandleVertPadding));
}
- virtual void DeleteDelegate() OVERRIDE {
+ virtual void DeleteDelegate() override {
// We are owned and deleted by TouchSelectionController.
}
// Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
if (draw_invisible_)
return;
gfx::Size image_size = GetHandleImageSize();
@@ -205,7 +205,7 @@
kSelectionHandleHorizPadding, selection_rect_.height());
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
event->SetHandled();
switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
@@ -230,7 +230,7 @@
}
}
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
gfx::Size image_size = GetHandleImageSize();
return gfx::Size(image_size.width() + 2 * kSelectionHandleHorizPadding,
image_size.height() + selection_rect_.height() +
diff --git a/ui/views/touchui/touch_selection_controller_impl.h b/ui/views/touchui/touch_selection_controller_impl.h
index 353c949..158666c 100644
--- a/ui/views/touchui/touch_selection_controller_impl.h
+++ b/ui/views/touchui/touch_selection_controller_impl.h
@@ -37,9 +37,9 @@
virtual ~TouchSelectionControllerImpl();
// TextSelectionController.
- virtual void SelectionChanged() OVERRIDE;
- virtual bool IsHandleDragInProgress() OVERRIDE;
- virtual void HideHandles(bool quick) OVERRIDE;
+ virtual void SelectionChanged() override;
+ virtual bool IsHandleDragInProgress() override;
+ virtual void HideHandles(bool quick) override;
private:
friend class TouchSelectionControllerImplTest;
@@ -65,26 +65,26 @@
bool ShouldShowHandleFor(const gfx::Rect& rect) const;
// Overridden from TouchEditingMenuController.
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
- virtual void OpenContextMenu() OVERRIDE;
- virtual void OnMenuClosed(TouchEditingMenuView* menu) OVERRIDE;
+ virtual bool IsCommandIdEnabled(int command_id) const override;
+ virtual void ExecuteCommand(int command_id, int event_flags) override;
+ virtual void OpenContextMenu() override;
+ virtual void OnMenuClosed(TouchEditingMenuView* menu) override;
// Overriden from aura::WindowObserver.
virtual void OnAncestorWindowTransformed(aura::Window* source,
- aura::Window* window) OVERRIDE;
+ aura::Window* window) override;
// Overridden from WidgetObserver. We will observe the widget backing the
// |client_view_| so that when its moved/resized, we can update the selection
// handles appropriately.
- virtual void OnWidgetClosing(Widget* widget) OVERRIDE;
+ virtual void OnWidgetClosing(Widget* widget) override;
virtual void OnWidgetBoundsChanged(Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
// Overriden from ui::EventHandler.
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
// Time to show context menu.
void ContextMenuTimerFired();
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index b268d2c..214b3c7 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -575,59 +575,59 @@
private:
// Overridden from ui::TouchEditable.
virtual void SelectRect(
- const gfx::Point& start, const gfx::Point& end) OVERRIDE {
+ const gfx::Point& start, const gfx::Point& end) override {
NOTREACHED();
}
- virtual void MoveCaretTo(const gfx::Point& point) OVERRIDE {
+ virtual void MoveCaretTo(const gfx::Point& point) override {
NOTREACHED();
}
- virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) OVERRIDE {
+ virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) override {
*p1 = *p2 = cursor_rect_;
}
- virtual gfx::Rect GetBounds() OVERRIDE {
+ virtual gfx::Rect GetBounds() override {
return gfx::Rect(bounds_.size());
}
- virtual gfx::NativeView GetNativeView() const OVERRIDE {
+ virtual gfx::NativeView GetNativeView() const override {
return window_;
}
- virtual void ConvertPointToScreen(gfx::Point* point) OVERRIDE {
+ virtual void ConvertPointToScreen(gfx::Point* point) override {
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(window_->GetRootWindow());
if (screen_position_client)
screen_position_client->ConvertPointToScreen(window_, point);
}
- virtual void ConvertPointFromScreen(gfx::Point* point) OVERRIDE {
+ virtual void ConvertPointFromScreen(gfx::Point* point) override {
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(window_->GetRootWindow());
if (screen_position_client)
screen_position_client->ConvertPointFromScreen(window_, point);
}
- virtual bool DrawsHandles() OVERRIDE {
+ virtual bool DrawsHandles() override {
return false;
}
- virtual void OpenContextMenu(const gfx::Point& anchor) OVERRIDE {
+ virtual void OpenContextMenu(const gfx::Point& anchor) override {
NOTREACHED();
}
- virtual void DestroyTouchSelection() OVERRIDE {
+ virtual void DestroyTouchSelection() override {
NOTREACHED();
}
// Overridden from ui::SimpleMenuModel::Delegate.
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE {
+ virtual bool IsCommandIdChecked(int command_id) const override {
NOTREACHED();
return false;
}
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
+ virtual bool IsCommandIdEnabled(int command_id) const override {
NOTREACHED();
return false;
}
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) OVERRIDE {
+ ui::Accelerator* accelerator) override {
NOTREACHED();
return false;
}
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {
+ virtual void ExecuteCommand(int command_id, int event_flags) override {
NOTREACHED();
}
@@ -733,18 +733,18 @@
virtual ~TestTouchEditingMenuController() {}
// Overriden from TouchEditingMenuController.
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
+ virtual bool IsCommandIdEnabled(int command_id) const override {
// Return true, since we want the menu to have all |kMenuCommandCount|
// available commands.
return true;
}
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {
+ virtual void ExecuteCommand(int command_id, int event_flags) override {
NOTREACHED();
}
- virtual void OpenContextMenu() OVERRIDE {
+ virtual void OpenContextMenu() override {
NOTREACHED();
}
- virtual void OnMenuClosed(TouchEditingMenuView* menu) OVERRIDE {}
+ virtual void OnMenuClosed(TouchEditingMenuView* menu) override {}
private:
DISALLOW_COPY_AND_ASSIGN(TestTouchEditingMenuController);
diff --git a/ui/views/view.h b/ui/views/view.h
index d9a0acf..5ae0c02 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -714,19 +714,19 @@
ViewTargeter* targeter() const { return targeter_.get(); }
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
- virtual ui::EventTarget* GetParentTarget() OVERRIDE;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
+ virtual bool CanAcceptEvent(const ui::Event& event) override;
+ virtual ui::EventTarget* GetParentTarget() override;
+ virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ virtual ui::EventTargeter* GetEventTargeter() override;
virtual void ConvertEventToTarget(ui::EventTarget* target,
- ui::LocatedEvent* event) OVERRIDE;
+ ui::LocatedEvent* event) override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE FINAL;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override final;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Accelerators --------------------------------------------------------------
@@ -744,12 +744,12 @@
virtual void ResetAccelerators();
// Overridden from AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
// Returns whether accelerators are enabled for this view. Accelerators are
// enabled if the containing widget is visible and the view is enabled() and
// IsDrawn()
- virtual bool CanHandleAccelerators() const OVERRIDE;
+ virtual bool CanHandleAccelerators() const override;
// Focus ---------------------------------------------------------------------
@@ -1117,11 +1117,11 @@
void UpdateChildLayerBounds(const gfx::Vector2d& offset);
// Overridden from ui::LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override;
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE;
+ const gfx::Rect& damage_rect_in_dip) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual base::Closure PrepareForLayerBoundsChange() override;
// Finds the layer that this view paints to (it may belong to an ancestor
// view), then reorders the immediate children of that layer to match the
diff --git a/ui/views/view_targeter.h b/ui/views/view_targeter.h
index 79f5ca6..de87909 100644
--- a/ui/views/view_targeter.h
+++ b/ui/views/view_targeter.h
@@ -33,15 +33,15 @@
protected:
// ui::EventTargeter:
virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
- ui::Event* event) OVERRIDE;
+ ui::Event* event) override;
virtual ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target,
- ui::Event* event) OVERRIDE;
+ ui::Event* event) override;
virtual bool SubtreeCanAcceptEvent(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
virtual bool EventLocationInsideBounds(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
private:
// TODO(tdanderson): Un-friend RootView once RootView::DispatchGestureEvent()
diff --git a/ui/views/view_targeter_unittest.cc b/ui/views/view_targeter_unittest.cc
index 15d65ad..a3acb46 100644
--- a/ui/views/view_targeter_unittest.cc
+++ b/ui/views/view_targeter_unittest.cc
@@ -34,7 +34,7 @@
}
// View:
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE {
+ virtual bool CanProcessEventsWithinSubtree() const override {
return can_process_events_within_subtree_;
}
@@ -58,7 +58,7 @@
private:
// MaskedTargeterDelegate:
- virtual bool GetHitTestMask(gfx::Path* mask) const OVERRIDE {
+ virtual bool GetHitTestMask(gfx::Path* mask) const override {
DCHECK(mask);
SkScalar w = SkIntToScalar(width());
SkScalar h = SkIntToScalar(height());
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index fccb4fc..4f15a21 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -219,23 +219,23 @@
can_process_events_within_subtree_ = can_process;
}
- virtual bool CanProcessEventsWithinSubtree() const OVERRIDE {
+ virtual bool CanProcessEventsWithinSubtree() const override {
return can_process_events_within_subtree_;
}
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
- virtual void Paint(gfx::Canvas* canvas, const CullSet& cull_set) OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual void Paint(gfx::Canvas* canvas, const CullSet& cull_set) override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
virtual void OnNativeThemeChanged(const ui::NativeTheme* native_theme)
- OVERRIDE;
+ override;
// OnBoundsChanged.
bool did_change_bounds_;
@@ -1495,14 +1495,14 @@
// View overrides:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
+ const ViewHierarchyChangedDetails& details) override {
if (details.is_add) {
toplevel_ = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
} else {
toplevel_ = NULL;
}
}
- virtual void NativeViewHierarchyChanged() OVERRIDE {
+ virtual void NativeViewHierarchyChanged() override {
toplevel_ = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
}
@@ -1569,7 +1569,7 @@
gfx::Rect scheduled_paint_rect() const { return scheduled_paint_rect_; }
// Overridden from View:
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE {
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override {
gfx::Rect xrect = ConvertRectToParent(rect);
scheduled_paint_rect_.Union(xrect);
}
@@ -1808,10 +1808,10 @@
private:
// Overridden from View:
- virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const OVERRIDE {
+ virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const override {
return true;
}
- virtual void OnVisibleBoundsChanged() OVERRIDE {
+ virtual void OnVisibleBoundsChanged() override {
received_notification_ = true;
}
@@ -2233,7 +2233,7 @@
private:
// View:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
bool has_add_details_;
bool has_remove_details_;
@@ -2652,7 +2652,7 @@
ActiveWidget() {}
virtual ~ActiveWidget() {}
- virtual bool IsActive() const OVERRIDE {
+ virtual bool IsActive() const override {
return true;
}
@@ -2718,7 +2718,7 @@
const gfx::Rect& last_bounds() const { return last_bounds_; }
// LayerAnimator.
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
protected:
virtual ~TestLayerAnimator() { }
@@ -2751,7 +2751,7 @@
return widget()->GetLayer();
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewTest::SetUp();
widget_ = new Widget;
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
@@ -2761,7 +2761,7 @@
widget_->GetRootView()->SetBounds(0, 0, 200, 200);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
widget_->CloseNow();
ViewsTestBase::TearDown();
}
@@ -3070,7 +3070,7 @@
bool painted() const { return painted_; }
void set_painted(bool value) { painted_ = value; }
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnPaint(gfx::Canvas* canvas) override {
painted_ = true;
}
@@ -3309,7 +3309,7 @@
BoundsTreeTestView() {}
virtual void PaintChildren(gfx::Canvas* canvas,
- const CullSet& cull_set) OVERRIDE {
+ const CullSet& cull_set) override {
// Save out a copy of the cull_set before calling the base implementation.
last_cull_set_.clear();
if (cull_set.cull_set_) {
diff --git a/ui/views/views_touch_selection_controller_factory.h b/ui/views/views_touch_selection_controller_factory.h
index 6b02c1e..9ddaa8f 100644
--- a/ui/views/views_touch_selection_controller_factory.h
+++ b/ui/views/views_touch_selection_controller_factory.h
@@ -17,7 +17,7 @@
// Overridden from ui::TouchSelectionControllerFactory.
virtual ui::TouchSelectionController* create(
- ui::TouchEditable* client_view) OVERRIDE;
+ ui::TouchEditable* client_view) override;
};
} // namespace views
diff --git a/ui/views/widget/OWNERS b/ui/views/widget/OWNERS
new file mode 100644
index 0000000..c487030
--- /dev/null
+++ b/ui/views/widget/OWNERS
@@ -0,0 +1 @@
+per-file native_widget_mac*=tapted@chromium.org
diff --git a/ui/views/widget/desktop_aura/desktop_capture_client.h b/ui/views/widget/desktop_aura/desktop_capture_client.h
index 24d2029..26c21d9 100644
--- a/ui/views/widget/desktop_aura/desktop_capture_client.h
+++ b/ui/views/widget/desktop_aura/desktop_capture_client.h
@@ -38,10 +38,10 @@
virtual ~DesktopCaptureClient();
// Overridden from aura::client::CaptureClient:
- virtual void SetCapture(aura::Window* window) OVERRIDE;
- virtual void ReleaseCapture(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetCaptureWindow() OVERRIDE;
- virtual aura::Window* GetGlobalCaptureWindow() OVERRIDE;
+ virtual void SetCapture(aura::Window* window) override;
+ virtual void ReleaseCapture(aura::Window* window) override;
+ virtual aura::Window* GetCaptureWindow() override;
+ virtual aura::Window* GetGlobalCaptureWindow() override;
private:
typedef std::set<DesktopCaptureClient*> CaptureClients;
diff --git a/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h b/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h
index c367518..3b496f9 100644
--- a/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h
+++ b/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h
@@ -18,9 +18,9 @@
// Overridden from DesktopCursorLoaderUpdater:
virtual void OnCreate(float device_scale_factor,
- ui::CursorLoader* loader) OVERRIDE;
+ ui::CursorLoader* loader) override;
virtual void OnDisplayUpdated(const gfx::Display& display,
- ui::CursorLoader* loader) OVERRIDE;
+ ui::CursorLoader* loader) override;
};
} // namespace views
diff --git a/ui/views/widget/desktop_aura/desktop_dispatcher_client.h b/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
index 284e81c..5e5ec01 100644
--- a/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
+++ b/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
@@ -22,7 +22,7 @@
virtual void PrepareNestedLoopClosures(
base::MessagePumpDispatcher* dispatcher,
base::Closure* run_closure,
- base::Closure* quit_closure) OVERRIDE;
+ base::Closure* quit_closure) override;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopDispatcherClient);
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
index 5dbc2b5..ed7059a 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
@@ -144,8 +144,8 @@
void MaskOperation(::Atom xdnd_operation, int* drag_operation) const;
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// The atom cache owned by our parent.
ui::X11AtomCache* atom_cache_;
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
index 8d30153..02d64c1 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
@@ -86,21 +86,21 @@
aura::Window* source_window,
const gfx::Point& root_location,
int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
+ ui::DragDropTypes::DragEventSource source) override;
virtual void DragUpdate(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
+ const ui::LocatedEvent& event) override;
virtual void Drop(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void DragCancel() OVERRIDE;
- virtual bool IsDragDropInProgress() OVERRIDE;
+ const ui::LocatedEvent& event) override;
+ virtual void DragCancel() override;
+ virtual bool IsDragDropInProgress() override;
// Overridden from aura::WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
// Overridden from X11WholeScreenMoveLoopDelegate:
- virtual void OnMouseMovement(XMotionEvent* event) OVERRIDE;
- virtual void OnMouseReleased() OVERRIDE;
- virtual void OnMoveLoopEnded() OVERRIDE;
+ virtual void OnMouseMovement(XMotionEvent* event) override;
+ virtual void OnMouseReleased() override;
+ virtual void OnMoveLoopEnded() override;
protected:
// The following methods are virtual for the sake of testing.
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc
index 1008289..f69d27c 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc
@@ -87,9 +87,9 @@
// X11MoveLoop:
virtual bool RunMoveLoop(aura::Window* window,
- gfx::NativeCursor cursor) OVERRIDE;
- virtual void UpdateCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
+ gfx::NativeCursor cursor) override;
+ virtual void UpdateCursor(gfx::NativeCursor cursor) override;
+ virtual void EndMoveLoop() override;
private:
// Not owned.
@@ -153,9 +153,9 @@
private:
// DesktopDragDropClientAuraX11:
virtual scoped_ptr<X11MoveLoop> CreateMoveLoop(
- X11MoveLoopDelegate* delegate) OVERRIDE;
- virtual ::Window FindWindowFor(const gfx::Point& screen_point) OVERRIDE;
- virtual void SendXClientEvent(::Window xid, XEvent* event) OVERRIDE;
+ X11MoveLoopDelegate* delegate) override;
+ virtual ::Window FindWindowFor(const gfx::Point& screen_point) override;
+ virtual void SendXClientEvent(::Window xid, XEvent* event) override;
// The XID of the window which initiated the drag.
::Window source_xid_;
@@ -366,7 +366,7 @@
}
// ViewsTestBase:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
// Create widget to initiate the drags.
@@ -386,7 +386,7 @@
client_->Init();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
client_.reset();
cursor_manager_.reset();
widget_.reset();
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h
index a8051ca..0da14e0 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h
@@ -30,13 +30,13 @@
aura::Window* source_window,
const gfx::Point& root_location,
int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
+ ui::DragDropTypes::DragEventSource source) override;
virtual void DragUpdate(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
+ const ui::LocatedEvent& event) override;
virtual void Drop(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void DragCancel() OVERRIDE;
- virtual bool IsDragDropInProgress() OVERRIDE;
+ const ui::LocatedEvent& event) override;
+ virtual void DragCancel() override;
+ virtual bool IsDragDropInProgress() override;
void OnNativeWidgetDestroying(HWND window);
diff --git a/ui/views/widget/desktop_aura/desktop_drop_target_win.h b/ui/views/widget/desktop_aura/desktop_drop_target_win.h
index 9e11ff6..d376182 100644
--- a/ui/views/widget/desktop_aura/desktop_drop_target_win.h
+++ b/ui/views/widget/desktop_aura/desktop_drop_target_win.h
@@ -36,19 +36,19 @@
virtual DWORD OnDragEnter(IDataObject* data_object,
DWORD key_state,
POINT position,
- DWORD effect) OVERRIDE;
+ DWORD effect) override;
virtual DWORD OnDragOver(IDataObject* data_object,
DWORD key_state,
POINT position,
- DWORD effect) OVERRIDE;
- virtual void OnDragLeave(IDataObject* data_object) OVERRIDE;
+ DWORD effect) override;
+ virtual void OnDragLeave(IDataObject* data_object) override;
virtual DWORD OnDrop(IDataObject* data_object,
DWORD key_state,
POINT position,
- DWORD effect) OVERRIDE;
+ DWORD effect) override;
// aura::WindowObserver implementation:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
// Common functionality for the ui::DropTargetWin methods to translate from
// COM data types to Aura ones.
diff --git a/ui/views/widget/desktop_aura/desktop_event_client.h b/ui/views/widget/desktop_aura/desktop_event_client.h
index d16b5c9..92bde0d 100644
--- a/ui/views/widget/desktop_aura/desktop_event_client.h
+++ b/ui/views/widget/desktop_aura/desktop_event_client.h
@@ -19,8 +19,8 @@
// Overridden from aura::client::EventClient:
virtual bool CanProcessEventsWithinSubtree(
- const aura::Window* window) const OVERRIDE;
- virtual ui::EventTarget* GetToplevelEventTarget() OVERRIDE;
+ const aura::Window* window) const override;
+ virtual ui::EventTarget* GetToplevelEventTarget() override;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopEventClient);
diff --git a/ui/views/widget/desktop_aura/desktop_focus_rules.h b/ui/views/widget/desktop_aura/desktop_focus_rules.h
index e096e80..a1f32e1 100644
--- a/ui/views/widget/desktop_aura/desktop_focus_rules.h
+++ b/ui/views/widget/desktop_aura/desktop_focus_rules.h
@@ -16,13 +16,13 @@
private:
// Overridden from wm::BaseFocusRules:
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
- virtual bool SupportsChildActivation(aura::Window* window) const OVERRIDE;
+ virtual bool CanActivateWindow(aura::Window* window) const override;
+ virtual bool SupportsChildActivation(aura::Window* window) const override;
virtual bool IsWindowConsideredVisibleForActivation(
- aura::Window* window) const OVERRIDE;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) const OVERRIDE;
+ aura::Window* window) const override;
+ virtual aura::Window* GetToplevelWindow(aura::Window* window) const override;
virtual aura::Window* GetNextActivatableWindow(
- aura::Window* window) const OVERRIDE;
+ aura::Window* window) const override;
// The content window. This is an activatable window even though it is a
// child.
diff --git a/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
index ee15634..8dbfcfb 100644
--- a/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
+++ b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
@@ -50,19 +50,19 @@
// Overridden from wm::NativeCursorManager:
virtual void SetDisplay(
const gfx::Display& display,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetCursor(
gfx::NativeCursor cursor,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetVisibility(
bool visible,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetCursorSet(
ui::CursorSetType cursor_set,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetMouseEventsEnabled(
bool enabled,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ wm::NativeCursorManagerDelegate* delegate) override;
// The set of hosts to notify of changes in cursor state.
typedef std::set<aura::WindowTreeHost*> Hosts;
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 5dae218..2ddbf72 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -118,7 +118,7 @@
}
// aura::WindowObserver overrides
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(aura::Window* window) override {
window->RemoveObserver(this);
// If the widget is being destroyed by the OS then we should not try and
@@ -143,7 +143,7 @@
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
if (top_level_widget_ && window == child_window_)
top_level_widget_->SetSize(new_bounds.size());
}
@@ -176,7 +176,7 @@
// Overridden from client::WindowTreeClient:
virtual aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
bool is_fullscreen = window->GetProperty(aura::client::kShowStateKey) ==
ui::SHOW_STATE_FULLSCREEN;
bool is_menu = window->type() == ui::wm::WINDOW_TYPE_MENU;
@@ -208,7 +208,7 @@
: desktop_native_widget_aura_(desktop_native_widget_aura) {}
// Implementation of ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
Widget* widget = desktop_native_widget_aura_->GetWidget();
if (widget && widget->GetFocusManager()->GetFocusedView() &&
!widget->GetFocusManager()->OnKeyEvent(*event)) {
@@ -230,7 +230,7 @@
private:
// Overridden from aura::WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(aura::Window* window) override {
parent_->RootWindowDestroyed();
window->RemoveObserver(this);
delete this;
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
index b4383c8..6b8d93d 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -95,144 +95,144 @@
protected:
// Overridden from internal::NativeWidgetPrivate:
- virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
- virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
- virtual Widget* GetTopLevelWidget() OVERRIDE;
- virtual const ui::Compositor* GetCompositor() const OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
- virtual ui::Layer* GetLayer() OVERRIDE;
- virtual void ReorderNativeViews() OVERRIDE;
- virtual void ViewRemoved(View* view) OVERRIDE;
- virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
- virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
- virtual TooltipManager* GetTooltipManager() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
- virtual InputMethod* CreateInputMethod() OVERRIDE;
- virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE;
- virtual ui::InputMethod* GetHostInputMethod() OVERRIDE;
- virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ virtual void InitNativeWidget(const Widget::InitParams& params) override;
+ virtual NonClientFrameView* CreateNonClientFrameView() override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool ShouldWindowContentsBeTransparent() const override;
+ virtual void FrameTypeChanged() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
+ virtual gfx::NativeView GetNativeView() const override;
+ virtual gfx::NativeWindow GetNativeWindow() const override;
+ virtual Widget* GetTopLevelWidget() override;
+ virtual const ui::Compositor* GetCompositor() const override;
+ virtual ui::Compositor* GetCompositor() override;
+ virtual ui::Layer* GetLayer() override;
+ virtual void ReorderNativeViews() override;
+ virtual void ViewRemoved(View* view) override;
+ virtual void SetNativeWindowProperty(const char* name, void* value) override;
+ virtual void* GetNativeWindowProperty(const char* name) const override;
+ virtual TooltipManager* GetTooltipManager() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual bool HasCapture() const override;
+ virtual InputMethod* CreateInputMethod() override;
+ virtual internal::InputMethodDelegate* GetInputMethodDelegate() override;
+ virtual ui::InputMethod* GetHostInputMethod() override;
+ virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
- ui::WindowShowState* maximized) const OVERRIDE;
- virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
+ ui::WindowShowState* maximized) const override;
+ virtual bool SetWindowTitle(const base::string16& title) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
- const gfx::ImageSkia& app_icon) OVERRIDE;
- virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void SetSize(const gfx::Size& size) OVERRIDE;
- virtual void StackAbove(gfx::NativeView native_view) OVERRIDE;
- virtual void StackAtTop() OVERRIDE;
- virtual void StackBelow(gfx::NativeView native_view) OVERRIDE;
- virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void CloseNow() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
+ const gfx::ImageSkia& app_icon) override;
+ virtual void InitModalType(ui::ModalType modal_type) override;
+ virtual gfx::Rect GetWindowBoundsInScreen() const override;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
+ virtual gfx::Rect GetRestoredBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void SetSize(const gfx::Size& size) override;
+ virtual void StackAbove(gfx::NativeView native_view) override;
+ virtual void StackAtTop() override;
+ virtual void StackBelow(gfx::NativeView native_view) override;
+ virtual void SetShape(gfx::NativeRegion shape) override;
+ virtual void Close() override;
+ virtual void CloseNow() override;
+ virtual void Show() override;
+ virtual void Hide() override;
virtual void ShowMaximizedWithBounds(
- const gfx::Rect& restored_bounds) OVERRIDE;
- virtual void ShowWithWindowState(ui::WindowShowState state) OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual bool IsAlwaysOnTop() const OVERRIDE;
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetOpacity(unsigned char opacity) OVERRIDE;
- virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
- virtual void FlashFrame(bool flash_frame) OVERRIDE;
+ const gfx::Rect& restored_bounds) override;
+ virtual void ShowWithWindowState(ui::WindowShowState state) override;
+ virtual bool IsVisible() const override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual bool IsActive() const override;
+ virtual void SetAlwaysOnTop(bool always_on_top) override;
+ virtual bool IsAlwaysOnTop() const override;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual bool IsMaximized() const override;
+ virtual bool IsMinimized() const override;
+ virtual void Restore() override;
+ virtual void SetFullscreen(bool fullscreen) override;
+ virtual bool IsFullscreen() const override;
+ virtual void SetOpacity(unsigned char opacity) override;
+ virtual void SetUseDragFrame(bool use_drag_frame) override;
+ virtual void FlashFrame(bool flash_frame) override;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
const gfx::Point& location,
int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual bool IsMouseEventsEnabled() const OVERRIDE;
- virtual void ClearNativeFocus() OVERRIDE;
- virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
+ ui::DragDropTypes::DragEventSource source) override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
+ virtual void SetCursor(gfx::NativeCursor cursor) override;
+ virtual bool IsMouseEventsEnabled() const override;
+ virtual void ClearNativeFocus() override;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
virtual Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
- Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
- virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
- virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
- virtual void OnRootViewLayout() OVERRIDE;
- virtual bool IsTranslucentWindowOpacitySupported() const OVERRIDE;
- virtual void OnSizeConstraintsChanged() OVERRIDE;
- virtual void RepostNativeEvent(gfx::NativeEvent native_event) OVERRIDE;
+ Widget::MoveLoopEscapeBehavior escape_behavior) override;
+ virtual void EndMoveLoop() override;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
+ virtual ui::NativeTheme* GetNativeTheme() const override;
+ virtual void OnRootViewLayout() override;
+ virtual bool IsTranslucentWindowOpacitySupported() const override;
+ virtual void OnSizeConstraintsChanged() override;
+ virtual void RepostNativeEvent(gfx::NativeEvent native_event) override;
// Overridden from aura::WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
+ const gfx::Rect& new_bounds) override {}
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override;
+ virtual int GetNonClientComponent(const gfx::Point& point) const override;
virtual bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) OVERRIDE;
- virtual bool CanFocus() OVERRIDE;
- virtual void OnCaptureLost() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
- virtual bool HasHitTestMask() const OVERRIDE;
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ const gfx::Point& location) override;
+ virtual bool CanFocus() override;
+ virtual void OnCaptureLost() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from aura::client::ActivationDelegate:
- virtual bool ShouldActivate() const OVERRIDE;
+ virtual bool ShouldActivate() const override;
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
+ aura::Window* lost_active) override;
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE;
+ aura::Window* lost_focus) override;
// Overridden from views::internal::InputMethodDelegate:
- virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE;
+ virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override;
// Overridden from aura::client::DragDropDelegate:
- virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE;
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
- virtual void OnDragExited() OVERRIDE;
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
+ virtual void OnDragEntered(const ui::DropTargetEvent& event) override;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override;
+ virtual void OnDragExited() override;
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) override;
// Overridden from aura::WindowTreeHostObserver:
- virtual void OnHostCloseRequested(const aura::WindowTreeHost* host) OVERRIDE;
- virtual void OnHostResized(const aura::WindowTreeHost* host) OVERRIDE;
+ virtual void OnHostCloseRequested(const aura::WindowTreeHost* host) override;
+ virtual void OnHostResized(const aura::WindowTreeHost* host) override;
virtual void OnHostMoved(const aura::WindowTreeHost* host,
- const gfx::Point& new_origin) OVERRIDE;
+ const gfx::Point& new_origin) override;
private:
friend class FocusManagerEventHandler;
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
index 72bc3fb..27a5d01 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
@@ -261,7 +261,7 @@
// views::TestViewsDelegate overrides.
virtual void OnBeforeWidgetInit(
Widget::InitParams* params,
- internal::NativeWidgetDelegate* delegate) OVERRIDE {
+ internal::NativeWidgetDelegate* delegate) override {
if (!params->native_widget)
params->native_widget = new views::DesktopNativeWidgetAura(delegate);
}
@@ -311,7 +311,7 @@
top_level_widget_->CloseNow();
}
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(aura::Window* window) override {
window->RemoveObserver(this);
if (window == owned_window_) {
owned_window_destroyed_ = true;
diff --git a/ui/views/widget/desktop_aura/desktop_screen_position_client.h b/ui/views/widget/desktop_aura/desktop_screen_position_client.h
index 222c2a1..9ccf72c 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_position_client.h
+++ b/ui/views/widget/desktop_aura/desktop_screen_position_client.h
@@ -20,14 +20,14 @@
// aura::client::ScreenPositionClient overrides:
virtual void ConvertPointToScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE;
+ gfx::Point* point) override;
virtual void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE;
+ gfx::Point* point) override;
virtual void ConvertHostPointToScreen(aura::Window* window,
- gfx::Point* point) OVERRIDE;
+ gfx::Point* point) override;
virtual void SetBounds(aura::Window* window,
const gfx::Rect& bounds,
- const gfx::Display& display) OVERRIDE;
+ const gfx::Display& display) override;
private:
aura::Window* root_window_;
diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.h b/ui/views/widget/desktop_aura/desktop_screen_win.h
index 3225d61..0ba1f5d 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_win.h
+++ b/ui/views/widget/desktop_aura/desktop_screen_win.h
@@ -17,11 +17,11 @@
private:
// Overridden from gfx::ScreenWin:
- virtual bool IsDIPEnabled() OVERRIDE;
+ virtual bool IsDIPEnabled() override;
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE;
- virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const OVERRIDE;
+ const gfx::Rect& match_rect) const override;
+ virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const override;
+ virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const override;
DISALLOW_COPY_AND_ASSIGN(DesktopScreenWin);
};
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.h b/ui/views/widget/desktop_aura/desktop_screen_x11.h
index ff47806..1fc32d1 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.h
@@ -31,26 +31,26 @@
virtual ~DesktopScreenX11();
// Overridden from gfx::Screen:
- virtual bool IsDIPEnabled() OVERRIDE;
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE;
+ virtual bool IsDIPEnabled() override;
+ virtual gfx::Point GetCursorScreenPoint() override;
+ virtual gfx::NativeWindow GetWindowUnderCursor() override;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE;
- virtual int GetNumDisplays() const OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE;
+ override;
+ virtual int GetNumDisplays() const override;
+ virtual std::vector<gfx::Display> GetAllDisplays() const override;
virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView window) const OVERRIDE;
+ gfx::NativeView window) const override;
virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE;
+ const gfx::Point& point) const override;
virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
+ const gfx::Rect& match_rect) const override;
+ virtual gfx::Display GetPrimaryDisplay() const override;
+ virtual void AddObserver(gfx::DisplayObserver* observer) override;
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) override;
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
private:
friend class DesktopScreenX11Test;
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
index 75a71ac..4b18ee7 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
@@ -34,7 +34,7 @@
}
// DesktopNativeWidgetAura:
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
+ virtual int GetNonClientComponent(const gfx::Point& point) const override {
return window_component_;
}
@@ -58,7 +58,7 @@
virtual ~DesktopScreenX11Test() {}
// Overridden from testing::Test:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
// Initialize the world to the single monitor case.
std::vector<gfx::Display> displays;
@@ -67,7 +67,7 @@
screen_->AddObserver(this);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
screen_.reset();
ViewsTestBase::TearDown();
}
@@ -111,16 +111,16 @@
private:
// Overridden from gfx::DisplayObserver:
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE {
+ virtual void OnDisplayAdded(const gfx::Display& new_display) override {
added_display_.push_back(new_display);
}
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE {
+ virtual void OnDisplayRemoved(const gfx::Display& old_display) override {
removed_display_.push_back(old_display);
}
virtual void OnDisplayMetricsChanged(const gfx::Display& display,
- uint32_t metrics) OVERRIDE {
+ uint32_t metrics) override {
changed_display_.push_back(display);
}
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index b6718a5..83ffd08 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -46,163 +46,163 @@
protected:
// Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
- const Widget::InitParams& params) OVERRIDE;
- virtual void OnNativeWidgetCreated(const Widget::InitParams& params) OVERRIDE;
- virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE;
+ const Widget::InitParams& params) override;
+ virtual void OnNativeWidgetCreated(const Widget::InitParams& params) override;
+ virtual scoped_ptr<corewm::Tooltip> CreateTooltip() override;
virtual scoped_ptr<aura::client::DragDropClient>
- CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void CloseNow() OVERRIDE;
- virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
- virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
+ CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) override;
+ virtual void Close() override;
+ virtual void CloseNow() override;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() override;
+ virtual void ShowWindowWithState(ui::WindowShowState show_state) override;
virtual void ShowMaximizedWithBounds(
- const gfx::Rect& restored_bounds) OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual void SetSize(const gfx::Size& size) OVERRIDE;
- virtual void StackAtTop() OVERRIDE;
- virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ const gfx::Rect& restored_bounds) override;
+ virtual bool IsVisible() const override;
+ virtual void SetSize(const gfx::Size& size) override;
+ virtual void StackAtTop() override;
+ virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
- ui::WindowShowState* show_state) const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
- virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
- virtual void SetShape(gfx::NativeRegion native_region) OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
- virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual bool IsAlwaysOnTop() const OVERRIDE;
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
- virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
- virtual void ClearNativeFocus() OVERRIDE;
+ ui::WindowShowState* show_state) const override;
+ virtual gfx::Rect GetWindowBoundsInScreen() const override;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
+ virtual gfx::Rect GetRestoredBounds() const override;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
+ virtual void SetShape(gfx::NativeRegion native_region) override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual bool IsActive() const override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual bool IsMaximized() const override;
+ virtual bool IsMinimized() const override;
+ virtual bool HasCapture() const override;
+ virtual void SetAlwaysOnTop(bool always_on_top) override;
+ virtual bool IsAlwaysOnTop() const override;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
+ virtual bool SetWindowTitle(const base::string16& title) override;
+ virtual void ClearNativeFocus() override;
virtual Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
- Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
- virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetOpacity(unsigned char opacity) OVERRIDE;
+ Widget::MoveLoopEscapeBehavior escape_behavior) override;
+ virtual void EndMoveLoop() override;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool ShouldWindowContentsBeTransparent() const override;
+ virtual void FrameTypeChanged() override;
+ virtual void SetFullscreen(bool fullscreen) override;
+ virtual bool IsFullscreen() const override;
+ virtual void SetOpacity(unsigned char opacity) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
- const gfx::ImageSkia& app_icon) OVERRIDE;
- virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual void FlashFrame(bool flash_frame) OVERRIDE;
- virtual void OnRootViewLayout() OVERRIDE;
- virtual void OnNativeWidgetFocus() OVERRIDE;
- virtual void OnNativeWidgetBlur() OVERRIDE;
- virtual bool IsAnimatingClosed() const OVERRIDE;
- virtual bool IsTranslucentWindowOpacitySupported() const OVERRIDE;
- virtual void SizeConstraintsChanged() OVERRIDE;
+ const gfx::ImageSkia& app_icon) override;
+ virtual void InitModalType(ui::ModalType modal_type) override;
+ virtual void FlashFrame(bool flash_frame) override;
+ virtual void OnRootViewLayout() override;
+ virtual void OnNativeWidgetFocus() override;
+ virtual void OnNativeWidgetBlur() override;
+ virtual bool IsAnimatingClosed() const override;
+ virtual bool IsTranslucentWindowOpacitySupported() const override;
+ virtual void SizeConstraintsChanged() override;
// Overridden from aura::WindowTreeHost:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
// Overridden frm ui::EventSource
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
// Overridden from aura::client::AnimationHost
virtual void SetHostTransitionOffsets(
const gfx::Vector2d& top_left_delta,
- const gfx::Vector2d& bottom_right_delta) OVERRIDE;
- virtual void OnWindowHidingAnimationCompleted() OVERRIDE;
+ const gfx::Vector2d& bottom_right_delta) override;
+ virtual void OnWindowHidingAnimationCompleted() override;
// Overridden from HWNDMessageHandlerDelegate:
- virtual bool IsWidgetWindow() const OVERRIDE;
- virtual bool IsUsingCustomFrame() const OVERRIDE;
- virtual void SchedulePaint() OVERRIDE;
- virtual void EnableInactiveRendering() OVERRIDE;
- virtual bool IsInactiveRenderingDisabled() OVERRIDE;
- virtual bool CanResize() const OVERRIDE;
- virtual bool CanMaximize() const OVERRIDE;
- virtual bool CanMinimize() const OVERRIDE;
- virtual bool CanActivate() const OVERRIDE;
- virtual bool WidgetSizeIsClientSize() const OVERRIDE;
- virtual bool IsModal() const OVERRIDE;
- virtual int GetInitialShowState() const OVERRIDE;
- virtual bool WillProcessWorkAreaChange() const OVERRIDE;
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
- virtual void GetWindowMask(const gfx::Size& size, gfx::Path* path) OVERRIDE;
- virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE;
+ virtual bool IsWidgetWindow() const override;
+ virtual bool IsUsingCustomFrame() const override;
+ virtual void SchedulePaint() override;
+ virtual void EnableInactiveRendering() override;
+ virtual bool IsInactiveRenderingDisabled() override;
+ virtual bool CanResize() const override;
+ virtual bool CanMaximize() const override;
+ virtual bool CanMinimize() const override;
+ virtual bool CanActivate() const override;
+ virtual bool WidgetSizeIsClientSize() const override;
+ virtual bool IsModal() const override;
+ virtual int GetInitialShowState() const override;
+ virtual bool WillProcessWorkAreaChange() const override;
+ virtual int GetNonClientComponent(const gfx::Point& point) const override;
+ virtual void GetWindowMask(const gfx::Size& size, gfx::Path* path) override;
+ virtual bool GetClientAreaInsets(gfx::Insets* insets) const override;
virtual void GetMinMaxSize(gfx::Size* min_size,
- gfx::Size* max_size) const OVERRIDE;
- virtual gfx::Size GetRootViewSize() const OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void PaintLayeredWindow(gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual bool ShouldHandleSystemCommands() const OVERRIDE;
- virtual InputMethod* GetInputMethod() OVERRIDE;
- virtual void HandleAppDeactivated() OVERRIDE;
- virtual void HandleActivationChanged(bool active) OVERRIDE;
- virtual bool HandleAppCommand(short command) OVERRIDE;
- virtual void HandleCancelMode() OVERRIDE;
- virtual void HandleCaptureLost() OVERRIDE;
- virtual void HandleClose() OVERRIDE;
- virtual bool HandleCommand(int command) OVERRIDE;
- virtual void HandleAccelerator(const ui::Accelerator& accelerator) OVERRIDE;
- virtual void HandleCreate() OVERRIDE;
- virtual void HandleDestroying() OVERRIDE;
- virtual void HandleDestroyed() OVERRIDE;
- virtual bool HandleInitialFocus(ui::WindowShowState show_state) OVERRIDE;
- virtual void HandleDisplayChange() OVERRIDE;
- virtual void HandleBeginWMSizeMove() OVERRIDE;
- virtual void HandleEndWMSizeMove() OVERRIDE;
- virtual void HandleMove() OVERRIDE;
- virtual void HandleWorkAreaChanged() OVERRIDE;
- virtual void HandleVisibilityChanging(bool visible) OVERRIDE;
- virtual void HandleVisibilityChanged(bool visible) OVERRIDE;
- virtual void HandleClientSizeChanged(const gfx::Size& new_size) OVERRIDE;
- virtual void HandleFrameChanged() OVERRIDE;
- virtual void HandleNativeFocus(HWND last_focused_window) OVERRIDE;
- virtual void HandleNativeBlur(HWND focused_window) OVERRIDE;
- virtual bool HandleMouseEvent(const ui::MouseEvent& event) OVERRIDE;
- virtual bool HandleKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual bool HandleUntranslatedKeyEvent(const ui::KeyEvent& event) OVERRIDE;
- virtual void HandleTouchEvent(const ui::TouchEvent& event) OVERRIDE;
+ gfx::Size* max_size) const override;
+ virtual gfx::Size GetRootViewSize() const override;
+ virtual void ResetWindowControls() override;
+ virtual void PaintLayeredWindow(gfx::Canvas* canvas) override;
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ virtual bool ShouldHandleSystemCommands() const override;
+ virtual InputMethod* GetInputMethod() override;
+ virtual void HandleAppDeactivated() override;
+ virtual void HandleActivationChanged(bool active) override;
+ virtual bool HandleAppCommand(short command) override;
+ virtual void HandleCancelMode() override;
+ virtual void HandleCaptureLost() override;
+ virtual void HandleClose() override;
+ virtual bool HandleCommand(int command) override;
+ virtual void HandleAccelerator(const ui::Accelerator& accelerator) override;
+ virtual void HandleCreate() override;
+ virtual void HandleDestroying() override;
+ virtual void HandleDestroyed() override;
+ virtual bool HandleInitialFocus(ui::WindowShowState show_state) override;
+ virtual void HandleDisplayChange() override;
+ virtual void HandleBeginWMSizeMove() override;
+ virtual void HandleEndWMSizeMove() override;
+ virtual void HandleMove() override;
+ virtual void HandleWorkAreaChanged() override;
+ virtual void HandleVisibilityChanging(bool visible) override;
+ virtual void HandleVisibilityChanged(bool visible) override;
+ virtual void HandleClientSizeChanged(const gfx::Size& new_size) override;
+ virtual void HandleFrameChanged() override;
+ virtual void HandleNativeFocus(HWND last_focused_window) override;
+ virtual void HandleNativeBlur(HWND focused_window) override;
+ virtual bool HandleMouseEvent(const ui::MouseEvent& event) override;
+ virtual bool HandleKeyEvent(const ui::KeyEvent& event) override;
+ virtual bool HandleUntranslatedKeyEvent(const ui::KeyEvent& event) override;
+ virtual void HandleTouchEvent(const ui::TouchEvent& event) override;
virtual bool HandleIMEMessage(UINT message,
WPARAM w_param,
LPARAM l_param,
- LRESULT* result) OVERRIDE;
+ LRESULT* result) override;
virtual void HandleInputLanguageChange(DWORD character_set,
- HKL input_language_id) OVERRIDE;
- virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) OVERRIDE;
- virtual void HandlePaint(gfx::Canvas* canvas) OVERRIDE;
+ HKL input_language_id) override;
+ virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) override;
+ virtual void HandlePaint(gfx::Canvas* canvas) override;
virtual bool HandleTooltipNotify(int w_param,
NMHDR* l_param,
- LRESULT* l_result) OVERRIDE;
- virtual void HandleMenuLoop(bool in_menu_loop) OVERRIDE;
+ LRESULT* l_result) override;
+ virtual void HandleMenuLoop(bool in_menu_loop) override;
virtual bool PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
- LRESULT* result) OVERRIDE;
+ LRESULT* result) override;
virtual void PostHandleMSG(UINT message,
WPARAM w_param,
- LPARAM l_param) OVERRIDE;
- virtual bool HandleScrollEvent(const ui::ScrollEvent& event) OVERRIDE;
- virtual void HandleWindowSizeChanging() OVERRIDE;
+ LPARAM l_param) override;
+ virtual bool HandleScrollEvent(const ui::ScrollEvent& event) override;
+ virtual void HandleWindowSizeChanging() override;
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index 8a5e51f..808bed7 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -88,83 +88,83 @@
protected:
// Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
- const Widget::InitParams& params) OVERRIDE;
- virtual void OnNativeWidgetCreated(const Widget::InitParams& params) OVERRIDE;
- virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE;
+ const Widget::InitParams& params) override;
+ virtual void OnNativeWidgetCreated(const Widget::InitParams& params) override;
+ virtual scoped_ptr<corewm::Tooltip> CreateTooltip() override;
virtual scoped_ptr<aura::client::DragDropClient>
- CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void CloseNow() OVERRIDE;
- virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
- virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
+ CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) override;
+ virtual void Close() override;
+ virtual void CloseNow() override;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() override;
+ virtual void ShowWindowWithState(ui::WindowShowState show_state) override;
virtual void ShowMaximizedWithBounds(
- const gfx::Rect& restored_bounds) OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual void SetSize(const gfx::Size& requested_size) OVERRIDE;
- virtual void StackAtTop() OVERRIDE;
- virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ const gfx::Rect& restored_bounds) override;
+ virtual bool IsVisible() const override;
+ virtual void SetSize(const gfx::Size& requested_size) override;
+ virtual void StackAtTop() override;
+ virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
- ui::WindowShowState* show_state) const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
- virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
- virtual void SetShape(gfx::NativeRegion native_region) OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
- virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual bool IsAlwaysOnTop() const OVERRIDE;
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
- virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
- virtual void ClearNativeFocus() OVERRIDE;
+ ui::WindowShowState* show_state) const override;
+ virtual gfx::Rect GetWindowBoundsInScreen() const override;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
+ virtual gfx::Rect GetRestoredBounds() const override;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
+ virtual void SetShape(gfx::NativeRegion native_region) override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual bool IsActive() const override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual void Restore() override;
+ virtual bool IsMaximized() const override;
+ virtual bool IsMinimized() const override;
+ virtual bool HasCapture() const override;
+ virtual void SetAlwaysOnTop(bool always_on_top) override;
+ virtual bool IsAlwaysOnTop() const override;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
+ virtual bool SetWindowTitle(const base::string16& title) override;
+ virtual void ClearNativeFocus() override;
virtual Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
- Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
- virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetOpacity(unsigned char opacity) OVERRIDE;
+ Widget::MoveLoopEscapeBehavior escape_behavior) override;
+ virtual void EndMoveLoop() override;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool ShouldWindowContentsBeTransparent() const override;
+ virtual void FrameTypeChanged() override;
+ virtual void SetFullscreen(bool fullscreen) override;
+ virtual bool IsFullscreen() const override;
+ virtual void SetOpacity(unsigned char opacity) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
- const gfx::ImageSkia& app_icon) OVERRIDE;
- virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual void FlashFrame(bool flash_frame) OVERRIDE;
- virtual void OnRootViewLayout() OVERRIDE;
- virtual void OnNativeWidgetFocus() OVERRIDE;
- virtual void OnNativeWidgetBlur() OVERRIDE;
- virtual bool IsAnimatingClosed() const OVERRIDE;
- virtual bool IsTranslucentWindowOpacitySupported() const OVERRIDE;
- virtual void SizeConstraintsChanged() OVERRIDE;
+ const gfx::ImageSkia& app_icon) override;
+ virtual void InitModalType(ui::ModalType modal_type) override;
+ virtual void FlashFrame(bool flash_frame) override;
+ virtual void OnRootViewLayout() override;
+ virtual void OnNativeWidgetFocus() override;
+ virtual void OnNativeWidgetBlur() override;
+ virtual bool IsAnimatingClosed() const override;
+ virtual bool IsTranslucentWindowOpacitySupported() const override;
+ virtual void SizeConstraintsChanged() override;
// Overridden from aura::WindowTreeHost:
- virtual ui::EventSource* GetEventSource() OVERRIDE;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual gfx::Rect GetBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& requested_bounds) OVERRIDE;
- virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
- virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
- virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
- virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
+ virtual ui::EventSource* GetEventSource() override;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ virtual void Show() override;
+ virtual void Hide() override;
+ virtual gfx::Rect GetBounds() const override;
+ virtual void SetBounds(const gfx::Rect& requested_bounds) override;
+ virtual gfx::Point GetLocationOnNativeScreen() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
+ virtual void SetCursorNative(gfx::NativeCursor cursor) override;
+ virtual void MoveCursorToNative(const gfx::Point& location) override;
+ virtual void OnCursorVisibilityChangedNative(bool show) override;
// Overridden frm ui::EventSource
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
private:
// Initializes our X11 surface to draw on. This method performs all
@@ -235,8 +235,8 @@
void Relayout();
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
void DelayedResize(const gfx::Size& size);
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc
index 8a986d7..869a3c7 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc
@@ -44,7 +44,7 @@
private:
// X11PropertyChangeWaiter:
- virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
XID xid = 0;
ui::GetXIDProperty(ui::GetX11RootWindow(), "_NET_ACTIVE_WINDOW", &xid);
return xid != window_;
@@ -64,7 +64,7 @@
}
// ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if (event->type() == ui::ET_MOUSE_MOVED)
++count_;
}
@@ -135,7 +135,7 @@
}
// testing::Test
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
@@ -143,7 +143,7 @@
XSynchronize(gfx::GetXDisplay(), True);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
XSynchronize(gfx::GetXDisplay(), False);
ViewsTestBase::TearDown();
}
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
index bcd8f86..4eb4958 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
@@ -53,7 +53,7 @@
private:
// X11PropertyChangeWaiter:
- virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<Atom> hints;
if (ui::GetAtomArrayProperty(xwindow(), "_NET_WM_STATE", &hints)) {
std::vector<Atom>::iterator it = std::find(
@@ -87,18 +87,18 @@
}
// NonClientFrameView:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE {
+ virtual gfx::Rect GetBoundsForClientView() const override {
return bounds();
}
virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE {
+ const gfx::Rect& client_bounds) const override {
return client_bounds;
}
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE {
+ virtual int NonClientHitTest(const gfx::Point& point) override {
return HTNOWHERE;
}
virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE {
+ gfx::Path* window_mask) override {
int right = size.width();
int bottom = size.height();
@@ -110,13 +110,13 @@
window_mask->lineTo(right - 10, 0);
window_mask->close();
}
- virtual void ResetWindowControls() OVERRIDE {
+ virtual void ResetWindowControls() override {
}
- virtual void UpdateWindowIcon() OVERRIDE {
+ virtual void UpdateWindowIcon() override {
}
- virtual void UpdateWindowTitle() OVERRIDE {
+ virtual void UpdateWindowTitle() override {
}
- virtual void SizeConstraintsChanged() OVERRIDE {
+ virtual void SizeConstraintsChanged() override {
}
private:
@@ -133,7 +133,7 @@
// WidgetDelegateView:
virtual NonClientFrameView* CreateNonClientFrameView(
- Widget* widget) OVERRIDE {
+ Widget* widget) override {
return new ShapedNonClientFrameView;
}
@@ -198,7 +198,7 @@
virtual ~DesktopWindowTreeHostX11Test() {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
@@ -206,7 +206,7 @@
XSynchronize(gfx::GetXDisplay(), True);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
XSynchronize(gfx::GetXDisplay(), False);
ViewsTestBase::TearDown();
}
@@ -266,7 +266,7 @@
// xvfb does not support Xrandr so we cannot check the maximized window's
// bounds.
gfx::Rect maximized_bounds;
- ui::GetWindowRect(xid1, &maximized_bounds);
+ ui::GetOuterWindowBounds(xid1, &maximized_bounds);
shape_rects = GetShapeRects(xid1);
ASSERT_FALSE(shape_rects.empty());
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.h b/ui/views/widget/desktop_aura/x11_desktop_handler.h
index e97b68a..8a1e61e 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.h
@@ -57,12 +57,12 @@
void ProcessXEvent(XEvent* event);
// ui::PlatformEventDispatcher
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// Overridden from aura::EnvObserver:
- virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
- virtual void OnWillDestroyEnv() OVERRIDE;
+ virtual void OnWindowInitialized(aura::Window* window) override;
+ virtual void OnWillDestroyEnv() override;
private:
enum ActiveState {
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
index 1c93271..4da16c7 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
@@ -31,16 +31,16 @@
virtual ~X11DesktopWindowMoveClient();
// Overridden from X11WholeScreenMoveLoopDelegate:
- virtual void OnMouseMovement(XMotionEvent* event) OVERRIDE;
- virtual void OnMouseReleased() OVERRIDE;
- virtual void OnMoveLoopEnded() OVERRIDE;
+ virtual void OnMouseMovement(XMotionEvent* event) override;
+ virtual void OnMouseReleased() override;
+ virtual void OnMoveLoopEnded() override;
// Overridden from aura::client::WindowMoveClient:
virtual aura::client::WindowMoveResult RunMoveLoop(
aura::Window* window,
const gfx::Vector2d& drag_offset,
- aura::client::WindowMoveSource move_source) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
+ aura::client::WindowMoveSource move_source) override;
+ virtual void EndMoveLoop() override;
private:
X11WholeScreenMoveLoop move_loop_;
diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder.h b/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
index cf8498a..a8a2e41 100644
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
@@ -35,7 +35,7 @@
private:
// ui::EnumerateWindowsDelegate:
- virtual bool ShouldStopIterating(XID xid) OVERRIDE;
+ virtual bool ShouldStopIterating(XID xid) override;
// Returns true if |window| does not not belong to |ignore|, is visible and
// contains |screen_loc_|.
diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
index a3ca346..edf9bca 100644
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
@@ -51,7 +51,7 @@
private:
// X11PropertyChangeWaiter:
- virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<Atom> wm_states;
if (ui::GetAtomArrayProperty(xwindow(), "_NET_WM_STATE", &wm_states)) {
std::vector<Atom>::iterator it = std::find(
@@ -82,7 +82,7 @@
}
// X11PropertyChangeWaiter:
- virtual void Wait() OVERRIDE {
+ virtual void Wait() override {
// StackingClientListWaiter may be created after
// _NET_CLIENT_LIST_STACKING already contains |expected_windows|.
if (!ShouldKeepOnWaiting(NULL))
@@ -93,7 +93,7 @@
private:
// X11PropertyChangeWaiter:
- virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<XID> stack;
ui::GetXWindowStack(ui::GetX11RootWindow(), &stack);
for (size_t i = 0; i < expected_windows_.size(); ++i) {
@@ -205,7 +205,7 @@
}
// ViewsTestBase:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
@@ -217,7 +217,7 @@
X11DesktopHandler::get();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
XSynchronize(xdisplay(), False);
ViewsTestBase::TearDown();
}
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
index 08cb71a..b8815fe 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
@@ -39,14 +39,14 @@
virtual ~X11WholeScreenMoveLoop();
// ui:::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// X11MoveLoop:
virtual bool RunMoveLoop(aura::Window* window,
- gfx::NativeCursor cursor) OVERRIDE;
- virtual void UpdateCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
+ gfx::NativeCursor cursor) override;
+ virtual void UpdateCursor(gfx::NativeCursor cursor) override;
+ virtual void EndMoveLoop() override;
private:
// Grabs the pointer, setting the mouse cursor to |cursor|. Returns true if
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.h b/ui/views/widget/desktop_aura/x11_window_event_filter.h
index 920733f..e21097c 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.h
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.h
@@ -33,7 +33,7 @@
virtual ~X11WindowEventFilter();
// Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
private:
// Called when the user clicked the caption area.
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index a32dc87..969f478 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -51,143 +51,143 @@
aura::Window* window);
// Overridden from internal::NativeWidgetPrivate:
- virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
- virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
- virtual Widget* GetTopLevelWidget() OVERRIDE;
- virtual const ui::Compositor* GetCompositor() const OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
- virtual ui::Layer* GetLayer() OVERRIDE;
- virtual void ReorderNativeViews() OVERRIDE;
- virtual void ViewRemoved(View* view) OVERRIDE;
- virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
- virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
- virtual TooltipManager* GetTooltipManager() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
- virtual InputMethod* CreateInputMethod() OVERRIDE;
- virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE;
- virtual ui::InputMethod* GetHostInputMethod() OVERRIDE;
- virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ virtual void InitNativeWidget(const Widget::InitParams& params) override;
+ virtual NonClientFrameView* CreateNonClientFrameView() override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool ShouldWindowContentsBeTransparent() const override;
+ virtual void FrameTypeChanged() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
+ virtual gfx::NativeView GetNativeView() const override;
+ virtual gfx::NativeWindow GetNativeWindow() const override;
+ virtual Widget* GetTopLevelWidget() override;
+ virtual const ui::Compositor* GetCompositor() const override;
+ virtual ui::Compositor* GetCompositor() override;
+ virtual ui::Layer* GetLayer() override;
+ virtual void ReorderNativeViews() override;
+ virtual void ViewRemoved(View* view) override;
+ virtual void SetNativeWindowProperty(const char* name, void* value) override;
+ virtual void* GetNativeWindowProperty(const char* name) const override;
+ virtual TooltipManager* GetTooltipManager() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual bool HasCapture() const override;
+ virtual InputMethod* CreateInputMethod() override;
+ virtual internal::InputMethodDelegate* GetInputMethodDelegate() override;
+ virtual ui::InputMethod* GetHostInputMethod() override;
+ virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
- ui::WindowShowState* maximized) const OVERRIDE;
- virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
+ ui::WindowShowState* maximized) const override;
+ virtual bool SetWindowTitle(const base::string16& title) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
- const gfx::ImageSkia& app_icon) OVERRIDE;
- virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void SetSize(const gfx::Size& size) OVERRIDE;
- virtual void StackAbove(gfx::NativeView native_view) OVERRIDE;
- virtual void StackAtTop() OVERRIDE;
- virtual void StackBelow(gfx::NativeView native_view) OVERRIDE;
- virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void CloseNow() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
+ const gfx::ImageSkia& app_icon) override;
+ virtual void InitModalType(ui::ModalType modal_type) override;
+ virtual gfx::Rect GetWindowBoundsInScreen() const override;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
+ virtual gfx::Rect GetRestoredBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void SetSize(const gfx::Size& size) override;
+ virtual void StackAbove(gfx::NativeView native_view) override;
+ virtual void StackAtTop() override;
+ virtual void StackBelow(gfx::NativeView native_view) override;
+ virtual void SetShape(gfx::NativeRegion shape) override;
+ virtual void Close() override;
+ virtual void CloseNow() override;
+ virtual void Show() override;
+ virtual void Hide() override;
virtual void ShowMaximizedWithBounds(
- const gfx::Rect& restored_bounds) OVERRIDE;
- virtual void ShowWithWindowState(ui::WindowShowState state) OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual bool IsAlwaysOnTop() const OVERRIDE;
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetOpacity(unsigned char opacity) OVERRIDE;
- virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
- virtual void FlashFrame(bool flash_frame) OVERRIDE;
+ const gfx::Rect& restored_bounds) override;
+ virtual void ShowWithWindowState(ui::WindowShowState state) override;
+ virtual bool IsVisible() const override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual bool IsActive() const override;
+ virtual void SetAlwaysOnTop(bool always_on_top) override;
+ virtual bool IsAlwaysOnTop() const override;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual bool IsMaximized() const override;
+ virtual bool IsMinimized() const override;
+ virtual void Restore() override;
+ virtual void SetFullscreen(bool fullscreen) override;
+ virtual bool IsFullscreen() const override;
+ virtual void SetOpacity(unsigned char opacity) override;
+ virtual void SetUseDragFrame(bool use_drag_frame) override;
+ virtual void FlashFrame(bool flash_frame) override;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
const gfx::Point& location,
int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual bool IsMouseEventsEnabled() const OVERRIDE;
- virtual void ClearNativeFocus() OVERRIDE;
- virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
+ ui::DragDropTypes::DragEventSource source) override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
+ virtual void SetCursor(gfx::NativeCursor cursor) override;
+ virtual bool IsMouseEventsEnabled() const override;
+ virtual void ClearNativeFocus() override;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
virtual Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
- Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
- virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
- virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
- virtual void OnRootViewLayout() OVERRIDE;
- virtual bool IsTranslucentWindowOpacitySupported() const OVERRIDE;
- virtual void OnSizeConstraintsChanged() OVERRIDE;
- virtual void RepostNativeEvent(gfx::NativeEvent native_event) OVERRIDE;
+ Widget::MoveLoopEscapeBehavior escape_behavior) override;
+ virtual void EndMoveLoop() override;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
+ virtual ui::NativeTheme* GetNativeTheme() const override;
+ virtual void OnRootViewLayout() override;
+ virtual bool IsTranslucentWindowOpacitySupported() const override;
+ virtual void OnSizeConstraintsChanged() override;
+ virtual void RepostNativeEvent(gfx::NativeEvent native_event) override;
// Overridden from views::InputMethodDelegate:
- virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE;
+ virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override;
// Overridden from aura::WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override;
+ virtual int GetNonClientComponent(const gfx::Point& point) const override;
virtual bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) OVERRIDE;
- virtual bool CanFocus() OVERRIDE;
- virtual void OnCaptureLost() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
- virtual bool HasHitTestMask() const OVERRIDE;
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+ const gfx::Point& location) override;
+ virtual bool CanFocus() override;
+ virtual void OnCaptureLost() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
// Overridden from aura::WindowObserver:
virtual void OnWindowPropertyChanged(aura::Window* window,
const void* key,
- intptr_t old) OVERRIDE;
+ intptr_t old) override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from aura::client::ActivationDelegate:
- virtual bool ShouldActivate() const OVERRIDE;
+ virtual bool ShouldActivate() const override;
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
+ aura::Window* lost_active) override;
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE;
+ aura::Window* lost_focus) override;
// Overridden from aura::client::DragDropDelegate:
- virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE;
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
- virtual void OnDragExited() OVERRIDE;
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
+ virtual void OnDragEntered(const ui::DropTargetEvent& event) override;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) override;
+ virtual void OnDragExited() override;
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) override;
protected:
virtual ~NativeWidgetAura();
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index be0041d..6ca6f34 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -40,7 +40,7 @@
virtual ~NativeWidgetAuraTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
new wm::DefaultActivationClient(root_window());
host()->SetBounds(gfx::Rect(640, 480));
@@ -106,14 +106,14 @@
virtual ~TestLayoutManagerBase() {}
// aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE {}
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE {}
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {}
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE {}
+ virtual void OnWindowResized() override {}
+ virtual void OnWindowAddedToLayout(aura::Window* child) override {}
+ virtual void OnWillRemoveWindowFromLayout(aura::Window* child) override {}
+ virtual void OnWindowRemovedFromLayout(aura::Window* child) override {}
virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE {}
+ bool visible) override {}
virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE {}
+ const gfx::Rect& requested_bounds) override {}
private:
DISALLOW_COPY_AND_ASSIGN(TestLayoutManagerBase);
@@ -127,7 +127,7 @@
private:
// aura::LayoutManager:
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE {
+ virtual void OnWindowAddedToLayout(aura::Window* child) override {
// This simulates what happens when adding a maximized window.
SetChildBoundsDirect(child, gfx::Rect(0, 0, 300, 300));
}
@@ -148,7 +148,7 @@
return did_size_change_more_than_once_;
}
- virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) OVERRIDE {
+ virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) override {
if (last_size_.IsEmpty())
last_size_ = new_size;
else if (!did_size_change_more_than_once_ && new_size != last_size_)
@@ -191,7 +191,7 @@
private:
// aura::LayoutManager:
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE {
+ virtual void OnWindowAddedToLayout(aura::Window* child) override {
EXPECT_TRUE(child->GetProperty(aura::client::kCanMaximizeKey));
EXPECT_TRUE(child->GetProperty(aura::client::kCanMinimizeKey));
EXPECT_TRUE(child->GetProperty(aura::client::kCanResizeKey));
@@ -210,22 +210,22 @@
private:
// views::WidgetDelegate:
- virtual bool CanMaximize() const OVERRIDE {
+ virtual bool CanMaximize() const override {
return true;
}
- virtual bool CanMinimize() const OVERRIDE {
+ virtual bool CanMinimize() const override {
return true;
}
- virtual bool CanResize() const OVERRIDE {
+ virtual bool CanResize() const override {
return true;
}
- virtual void DeleteDelegate() OVERRIDE {
+ virtual void DeleteDelegate() override {
delete this;
}
- virtual Widget* GetWidget() OVERRIDE {
+ virtual Widget* GetWidget() override {
return widget_;
}
- virtual const Widget* GetWidget() const OVERRIDE {
+ virtual const Widget* GetWidget() const override {
return widget_;
}
@@ -286,7 +286,7 @@
}
// View overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
got_gesture_event_ = true;
if (consume_gesture_event_)
event->StopPropagation();
@@ -454,7 +454,7 @@
bool got_move() const { return got_move_; }
// WidgetDelegate overrides:
- virtual void OnWidgetMove() OVERRIDE { got_move_ = true; }
+ virtual void OnWidgetMove() override { got_move_ = true; }
private:
bool got_move_;
diff --git a/ui/views/widget/native_widget_mac.h b/ui/views/widget/native_widget_mac.h
index a7bbbac..a293eb8 100644
--- a/ui/views/widget/native_widget_mac.h
+++ b/ui/views/widget/native_widget_mac.h
@@ -25,92 +25,92 @@
void OnWindowWillClose();
// internal::NativeWidgetPrivate:
- virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
- virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
- virtual Widget* GetTopLevelWidget() OVERRIDE;
- virtual const ui::Compositor* GetCompositor() const OVERRIDE;
- virtual ui::Compositor* GetCompositor() OVERRIDE;
- virtual ui::Layer* GetLayer() OVERRIDE;
- virtual void ReorderNativeViews() OVERRIDE;
- virtual void ViewRemoved(View* view) OVERRIDE;
- virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
- virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
- virtual TooltipManager* GetTooltipManager() const OVERRIDE;
- virtual void SetCapture() OVERRIDE;
- virtual void ReleaseCapture() OVERRIDE;
- virtual bool HasCapture() const OVERRIDE;
- virtual InputMethod* CreateInputMethod() OVERRIDE;
- virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE;
- virtual ui::InputMethod* GetHostInputMethod() OVERRIDE;
- virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ virtual void InitNativeWidget(const Widget::InitParams& params) override;
+ virtual NonClientFrameView* CreateNonClientFrameView() override;
+ virtual bool ShouldUseNativeFrame() const override;
+ virtual bool ShouldWindowContentsBeTransparent() const override;
+ virtual void FrameTypeChanged() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
+ virtual gfx::NativeView GetNativeView() const override;
+ virtual gfx::NativeWindow GetNativeWindow() const override;
+ virtual Widget* GetTopLevelWidget() override;
+ virtual const ui::Compositor* GetCompositor() const override;
+ virtual ui::Compositor* GetCompositor() override;
+ virtual ui::Layer* GetLayer() override;
+ virtual void ReorderNativeViews() override;
+ virtual void ViewRemoved(View* view) override;
+ virtual void SetNativeWindowProperty(const char* name, void* value) override;
+ virtual void* GetNativeWindowProperty(const char* name) const override;
+ virtual TooltipManager* GetTooltipManager() const override;
+ virtual void SetCapture() override;
+ virtual void ReleaseCapture() override;
+ virtual bool HasCapture() const override;
+ virtual InputMethod* CreateInputMethod() override;
+ virtual internal::InputMethodDelegate* GetInputMethodDelegate() override;
+ virtual ui::InputMethod* GetHostInputMethod() override;
+ virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
- ui::WindowShowState* maximized) const OVERRIDE;
- virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
+ ui::WindowShowState* maximized) const override;
+ virtual bool SetWindowTitle(const base::string16& title) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
- const gfx::ImageSkia& app_icon) OVERRIDE;
- virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
- virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void SetSize(const gfx::Size& size) OVERRIDE;
- virtual void StackAbove(gfx::NativeView native_view) OVERRIDE;
- virtual void StackAtTop() OVERRIDE;
- virtual void StackBelow(gfx::NativeView native_view) OVERRIDE;
- virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual void CloseNow() OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
+ const gfx::ImageSkia& app_icon) override;
+ virtual void InitModalType(ui::ModalType modal_type) override;
+ virtual gfx::Rect GetWindowBoundsInScreen() const override;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
+ virtual gfx::Rect GetRestoredBounds() const override;
+ virtual void SetBounds(const gfx::Rect& bounds) override;
+ virtual void SetSize(const gfx::Size& size) override;
+ virtual void StackAbove(gfx::NativeView native_view) override;
+ virtual void StackAtTop() override;
+ virtual void StackBelow(gfx::NativeView native_view) override;
+ virtual void SetShape(gfx::NativeRegion shape) override;
+ virtual void Close() override;
+ virtual void CloseNow() override;
+ virtual void Show() override;
+ virtual void Hide() override;
virtual void ShowMaximizedWithBounds(
- const gfx::Rect& restored_bounds) OVERRIDE;
- virtual void ShowWithWindowState(ui::WindowShowState state) OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual bool IsAlwaysOnTop() const OVERRIDE;
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetOpacity(unsigned char opacity) OVERRIDE;
- virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
- virtual void FlashFrame(bool flash_frame) OVERRIDE;
+ const gfx::Rect& restored_bounds) override;
+ virtual void ShowWithWindowState(ui::WindowShowState state) override;
+ virtual bool IsVisible() const override;
+ virtual void Activate() override;
+ virtual void Deactivate() override;
+ virtual bool IsActive() const override;
+ virtual void SetAlwaysOnTop(bool always_on_top) override;
+ virtual bool IsAlwaysOnTop() const override;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
+ virtual void Maximize() override;
+ virtual void Minimize() override;
+ virtual bool IsMaximized() const override;
+ virtual bool IsMinimized() const override;
+ virtual void Restore() override;
+ virtual void SetFullscreen(bool fullscreen) override;
+ virtual bool IsFullscreen() const override;
+ virtual void SetOpacity(unsigned char opacity) override;
+ virtual void SetUseDragFrame(bool use_drag_frame) override;
+ virtual void FlashFrame(bool flash_frame) override;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
const gfx::Point& location,
int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
- virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual bool IsMouseEventsEnabled() const OVERRIDE;
- virtual void ClearNativeFocus() OVERRIDE;
- virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
+ ui::DragDropTypes::DragEventSource source) override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
+ virtual void SetCursor(gfx::NativeCursor cursor) override;
+ virtual bool IsMouseEventsEnabled() const override;
+ virtual void ClearNativeFocus() override;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
virtual Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
- Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
- virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
- virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
- virtual void OnRootViewLayout() OVERRIDE;
- virtual bool IsTranslucentWindowOpacitySupported() const OVERRIDE;
- virtual void OnSizeConstraintsChanged() OVERRIDE;
- virtual void RepostNativeEvent(gfx::NativeEvent native_event) OVERRIDE;
+ Widget::MoveLoopEscapeBehavior escape_behavior) override;
+ virtual void EndMoveLoop() override;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
+ virtual ui::NativeTheme* GetNativeTheme() const override;
+ virtual void OnRootViewLayout() override;
+ virtual bool IsTranslucentWindowOpacitySupported() const override;
+ virtual void OnSizeConstraintsChanged() override;
+ virtual void RepostNativeEvent(gfx::NativeEvent native_event) override;
protected:
internal::NativeWidgetDelegate* delegate() { return delegate_; }
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index 9f3a156..c6d851d 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -269,8 +269,7 @@
}
gfx::Rect NativeWidgetMac::GetRestoredBounds() const {
- NOTIMPLEMENTED();
- return gfx::Rect();
+ return bridge_ ? bridge_->GetRestoredBounds() : gfx::Rect();
}
void NativeWidgetMac::SetBounds(const gfx::Rect& bounds) {
@@ -405,7 +404,7 @@
}
void NativeWidgetMac::Maximize() {
- NOTIMPLEMENTED();
+ NOTIMPLEMENTED(); // See IsMaximized().
}
void NativeWidgetMac::Minimize() {
@@ -413,7 +412,8 @@
}
bool NativeWidgetMac::IsMaximized() const {
- NOTIMPLEMENTED();
+ // The window frame isn't altered on Mac unless going fullscreen. The green
+ // "+" button just makes the window bigger. So, always false.
return false;
}
@@ -427,12 +427,14 @@
}
void NativeWidgetMac::SetFullscreen(bool fullscreen) {
- NOTIMPLEMENTED();
+ if (!bridge_ || fullscreen == IsFullscreen())
+ return;
+
+ bridge_->ToggleDesiredFullscreenState();
}
bool NativeWidgetMac::IsFullscreen() const {
- NOTIMPLEMENTED();
- return false;
+ return bridge_ && bridge_->target_fullscreen_state();
}
void NativeWidgetMac::SetOpacity(unsigned char opacity) {
diff --git a/ui/views/widget/native_widget_mac_interactive_uitest.mm b/ui/views/widget/native_widget_mac_interactive_uitest.mm
index aaba60a..7cb6afb 100644
--- a/ui/views/widget/native_widget_mac_interactive_uitest.mm
+++ b/ui/views/widget/native_widget_mac_interactive_uitest.mm
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "ui/views/test/widget_test.h"
+#include "ui/views/test/test_widget_observer.h"
namespace views {
namespace test {
@@ -17,7 +18,10 @@
: public WidgetTest,
public ::testing::WithParamInterface<bool> {
public:
- NativeWidgetMacInteractiveUITest() {}
+ class Observer;
+
+ NativeWidgetMacInteractiveUITest()
+ : activationCount_(0), deactivationCount_(0) {}
Widget* MakeWidget() {
return GetParam() ? CreateTopLevelFramelessPlatformWidget()
@@ -33,21 +37,70 @@
WidgetTest::SetUp();
}
+ protected:
+ scoped_ptr<Observer> observer_;
+ int activationCount_;
+ int deactivationCount_;
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeWidgetMacInteractiveUITest);
};
+class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver {
+ public:
+ Observer(NativeWidgetMacInteractiveUITest* parent, Widget* widget)
+ : TestWidgetObserver(widget), parent_(parent) {}
+
+ virtual void OnWidgetActivationChanged(Widget* widget, bool active) override {
+ if (active)
+ parent_->activationCount_++;
+ else
+ parent_->deactivationCount_++;
+ }
+
+ private:
+ NativeWidgetMacInteractiveUITest* parent_;
+
+ DISALLOW_COPY_AND_ASSIGN(Observer);
+};
+
// Test that showing a window causes it to attain global keyWindow status.
TEST_P(NativeWidgetMacInteractiveUITest, ShowAttainsKeyStatus) {
Widget* widget = MakeWidget();
+ observer_.reset(new Observer(this, widget));
EXPECT_FALSE(widget->IsActive());
+ EXPECT_EQ(0, activationCount_);
widget->Show();
EXPECT_TRUE(widget->IsActive());
-
RunPendingMessages();
EXPECT_TRUE([widget->GetNativeWindow() isKeyWindow]);
+ EXPECT_EQ(1, activationCount_);
+ EXPECT_EQ(0, deactivationCount_);
+
+ // Now check that losing and gaining key status due events outside of Widget
+ // works correctly.
+ Widget* widget2 = MakeWidget(); // Note: not observed.
+ EXPECT_EQ(0, deactivationCount_);
+ widget2->Show();
+ EXPECT_EQ(1, deactivationCount_);
+
+ RunPendingMessages();
+ EXPECT_FALSE(widget->IsActive());
+ EXPECT_EQ(1, deactivationCount_);
+ EXPECT_EQ(1, activationCount_);
+
+ [widget->GetNativeWindow() makeKeyAndOrderFront:nil];
+ RunPendingMessages();
+ EXPECT_TRUE(widget->IsActive());
+ EXPECT_EQ(1, deactivationCount_);
+ EXPECT_EQ(2, activationCount_);
+
+ widget2->CloseNow();
widget->CloseNow();
+
+ EXPECT_EQ(1, deactivationCount_);
+ EXPECT_EQ(2, activationCount_);
}
// Test that ShowInactive does not take keyWindow status from an active window.
diff --git a/ui/views/widget/native_widget_private.h b/ui/views/widget/native_widget_private.h
index ccb15b9..cd52012 100644
--- a/ui/views/widget/native_widget_private.h
+++ b/ui/views/widget/native_widget_private.h
@@ -231,7 +231,7 @@
virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0;
// Overridden from NativeWidget:
- virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE;
+ virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override;
};
} // namespace internal
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index a1f0813..38fe053 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -64,7 +64,7 @@
private:
// ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
CHECK_EQ(ui::EP_PRETARGET, event->phase());
if (event->handled())
return;
@@ -106,7 +106,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
DCHECK_EQ(ui::EP_POSTTARGET, event->phase());
if (event->handled())
return;
diff --git a/ui/views/widget/root_view.h b/ui/views/widget/root_view.h
index df01aea..ad2ca4c 100644
--- a/ui/views/widget/root_view.h
+++ b/ui/views/widget/root_view.h
@@ -87,42 +87,42 @@
void LocaleChanged();
// Overridden from FocusTraversable:
- virtual FocusSearch* GetFocusSearch() OVERRIDE;
- virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
- virtual View* GetFocusTraversableParentView() OVERRIDE;
+ virtual FocusSearch* GetFocusSearch() override;
+ virtual FocusTraversable* GetFocusTraversableParent() override;
+ virtual View* GetFocusTraversableParentView() override;
// Overridden from ui::EventProcessor:
- virtual ui::EventTarget* GetRootTarget() OVERRIDE;
- virtual void OnEventProcessingStarted(ui::Event* event) OVERRIDE;
- virtual void OnEventProcessingFinished(ui::Event* event) OVERRIDE;
+ virtual ui::EventTarget* GetRootTarget() override;
+ virtual void OnEventProcessingStarted(ui::Event* event) override;
+ virtual void OnEventProcessingFinished(ui::Event* event) override;
// Overridden from View:
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual bool IsDrawn() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
- virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void UpdateParentLayer() OVERRIDE;
+ virtual const Widget* GetWidget() const override;
+ virtual Widget* GetWidget() override;
+ virtual bool IsDrawn() const override;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) override;
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override;
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnMouseMoved(const ui::MouseEvent& event) override;
+ virtual void OnMouseExited(const ui::MouseEvent& event) override;
+ virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
+ virtual void SetMouseHandler(View* new_mouse_handler) override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void UpdateParentLayer() override;
protected:
// Overridden from View:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual void VisibilityChanged(View* starting_from, bool is_visible) override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
virtual gfx::Vector2d CalculateOffsetToAncestorWithLayer(
- ui::Layer** layer_parent) OVERRIDE;
- virtual View::DragInfo* GetDragInfo() OVERRIDE;
+ ui::Layer** layer_parent) override;
+ virtual View::DragInfo* GetDragInfo() override;
private:
friend class ::views::RootViewTargeter;
@@ -154,11 +154,11 @@
View* sibling);
// Overridden from ui::EventDispatcherDelegate:
- virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE;
+ virtual bool CanDispatchToTarget(ui::EventTarget* target) override;
virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target,
- ui::Event* event) OVERRIDE;
+ ui::Event* event) override;
virtual ui::EventDispatchDetails PostDispatchEvent(
- ui::EventTarget* target, const ui::Event& event) OVERRIDE;
+ ui::EventTarget* target, const ui::Event& event) override;
//////////////////////////////////////////////////////////////////////////////
// Tree operations -----------------------------------------------------------
diff --git a/ui/views/widget/root_view_targeter.h b/ui/views/widget/root_view_targeter.h
index e6cad9c..6b10a4e 100644
--- a/ui/views/widget/root_view_targeter.h
+++ b/ui/views/widget/root_view_targeter.h
@@ -31,10 +31,10 @@
// ViewTargeter:
virtual View* FindTargetForGestureEvent(
View* root,
- const ui::GestureEvent& gesture) OVERRIDE;
+ const ui::GestureEvent& gesture) override;
virtual ui::EventTarget* FindNextBestTargetForGestureEvent(
ui::EventTarget* previous_target,
- const ui::GestureEvent& gesture) OVERRIDE;
+ const ui::GestureEvent& gesture) override;
// A pointer to the RootView on which |this| is installed.
internal::RootView* root_view_;
diff --git a/ui/views/widget/root_view_unittest.cc b/ui/views/widget/root_view_unittest.cc
index f4836cd..21b1cc2 100644
--- a/ui/views/widget/root_view_unittest.cc
+++ b/ui/views/widget/root_view_unittest.cc
@@ -19,7 +19,7 @@
explicit DeleteOnKeyEventView(bool* set_on_key) : set_on_key_(set_on_key) {}
virtual ~DeleteOnKeyEventView() {}
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE {
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) override {
*set_on_key_ = true;
delete this;
return true;
@@ -89,7 +89,7 @@
virtual void ShowContextMenuForView(
View* source,
const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE {
+ ui::MenuSourceType source_type) override {
show_context_menu_calls_++;
menu_source_view_ = source;
menu_source_type_ = source_type;
@@ -163,7 +163,7 @@
virtual ~GestureHandlingView() {
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
event->SetHandled();
}
diff --git a/ui/views/widget/tooltip_manager_aura.h b/ui/views/widget/tooltip_manager_aura.h
index e723299..73266a1 100644
--- a/ui/views/widget/tooltip_manager_aura.h
+++ b/ui/views/widget/tooltip_manager_aura.h
@@ -38,9 +38,9 @@
static const gfx::FontList& GetDefaultFontList();
// TooltipManager:
- virtual const gfx::FontList& GetFontList() const OVERRIDE;
- virtual void UpdateTooltip() OVERRIDE;
- virtual void TooltipTextChanged(View* view) OVERRIDE;
+ virtual const gfx::FontList& GetFontList() const override;
+ virtual void UpdateTooltip() override;
+ virtual void TooltipTextChanged(View* view) override;
private:
View* GetViewUnderPoint(const gfx::Point& point);
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 52209f8..8469f6d 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -74,16 +74,16 @@
virtual ~DefaultWidgetDelegate() {}
// Overridden from WidgetDelegate:
- virtual void DeleteDelegate() OVERRIDE {
+ virtual void DeleteDelegate() override {
delete this;
}
- virtual Widget* GetWidget() OVERRIDE {
+ virtual Widget* GetWidget() override {
return widget_;
}
- virtual const Widget* GetWidget() const OVERRIDE {
+ virtual const Widget* GetWidget() const override {
return widget_;
}
- virtual bool ShouldAdvanceFocusToTopLevelWidget() const OVERRIDE {
+ virtual bool ShouldAdvanceFocusToTopLevelWidget() const override {
// In most situations where a Widget is used without a delegate the Widget
// is used as a container, so that we want focus to advance to the top-level
// widget. A good example of this is the find bar.
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index e785d7b..08ab939 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -742,55 +742,55 @@
virtual void OnOwnerClosing();
// Overridden from NativeWidgetDelegate:
- virtual bool IsModal() const OVERRIDE;
- virtual bool IsDialogBox() const OVERRIDE;
- virtual bool CanActivate() const OVERRIDE;
- virtual bool IsInactiveRenderingDisabled() const OVERRIDE;
- virtual void EnableInactiveRendering() OVERRIDE;
- virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE;
- virtual void OnNativeFocus(gfx::NativeView old_focused_view) OVERRIDE;
- virtual void OnNativeBlur(gfx::NativeView new_focused_view) OVERRIDE;
- virtual void OnNativeWidgetVisibilityChanging(bool visible) OVERRIDE;
- virtual void OnNativeWidgetVisibilityChanged(bool visible) OVERRIDE;
- virtual void OnNativeWidgetCreated(bool desktop_widget) OVERRIDE;
- virtual void OnNativeWidgetDestroying() OVERRIDE;
- virtual void OnNativeWidgetDestroyed() OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
- virtual void OnNativeWidgetMove() OVERRIDE;
- virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) OVERRIDE;
- virtual void OnNativeWidgetWindowShowStateChanged() OVERRIDE;
- virtual void OnNativeWidgetBeginUserBoundsChange() OVERRIDE;
- virtual void OnNativeWidgetEndUserBoundsChange() OVERRIDE;
- virtual bool HasFocusManager() const OVERRIDE;
+ virtual bool IsModal() const override;
+ virtual bool IsDialogBox() const override;
+ virtual bool CanActivate() const override;
+ virtual bool IsInactiveRenderingDisabled() const override;
+ virtual void EnableInactiveRendering() override;
+ virtual void OnNativeWidgetActivationChanged(bool active) override;
+ virtual void OnNativeFocus(gfx::NativeView old_focused_view) override;
+ virtual void OnNativeBlur(gfx::NativeView new_focused_view) override;
+ virtual void OnNativeWidgetVisibilityChanging(bool visible) override;
+ virtual void OnNativeWidgetVisibilityChanged(bool visible) override;
+ virtual void OnNativeWidgetCreated(bool desktop_widget) override;
+ virtual void OnNativeWidgetDestroying() override;
+ virtual void OnNativeWidgetDestroyed() override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual void OnNativeWidgetMove() override;
+ virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) override;
+ virtual void OnNativeWidgetWindowShowStateChanged() override;
+ virtual void OnNativeWidgetBeginUserBoundsChange() override;
+ virtual void OnNativeWidgetEndUserBoundsChange() override;
+ virtual bool HasFocusManager() const override;
virtual bool OnNativeWidgetPaintAccelerated(
- const gfx::Rect& dirty_region) OVERRIDE;
- virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE;
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual bool ExecuteCommand(int command_id) OVERRIDE;
- virtual InputMethod* GetInputMethodDirect() OVERRIDE;
- virtual const std::vector<ui::Layer*>& GetRootLayers() OVERRIDE;
- virtual bool HasHitTestMask() const OVERRIDE;
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
- virtual Widget* AsWidget() OVERRIDE;
- virtual const Widget* AsWidget() const OVERRIDE;
- virtual bool SetInitialFocus(ui::WindowShowState show_state) OVERRIDE;
+ const gfx::Rect& dirty_region) override;
+ virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) override;
+ virtual int GetNonClientComponent(const gfx::Point& point) override;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnMouseCaptureLost() override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ virtual bool ExecuteCommand(int command_id) override;
+ virtual InputMethod* GetInputMethodDirect() override;
+ virtual const std::vector<ui::Layer*>& GetRootLayers() override;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
+ virtual Widget* AsWidget() override;
+ virtual const Widget* AsWidget() const override;
+ virtual bool SetInitialFocus(ui::WindowShowState show_state) override;
// Overridden from ui::EventSource:
- virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ virtual ui::EventProcessor* GetEventProcessor() override;
// Overridden from FocusTraversable:
- virtual FocusSearch* GetFocusSearch() OVERRIDE;
- virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
- virtual View* GetFocusTraversableParentView() OVERRIDE;
+ virtual FocusSearch* GetFocusSearch() override;
+ virtual FocusTraversable* GetFocusTraversableParent() override;
+ virtual View* GetFocusTraversableParentView() override;
// Overridden from ui::NativeThemeObserver:
- virtual void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) OVERRIDE;
+ virtual void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
protected:
// Creates the RootView to be used within this Widget. Subclasses may override
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index 422c286..3f67cb4 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -204,9 +204,9 @@
virtual ~WidgetDelegateView();
// Overridden from WidgetDelegate:
- virtual void DeleteDelegate() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
+ virtual void DeleteDelegate() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
private:
DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView);
diff --git a/ui/views/widget/widget_deletion_observer.h b/ui/views/widget/widget_deletion_observer.h
index 7182d2d..785e132 100644
--- a/ui/views/widget/widget_deletion_observer.h
+++ b/ui/views/widget/widget_deletion_observer.h
@@ -23,7 +23,7 @@
bool IsWidgetAlive() { return widget_ != NULL; }
// Overridden from WidgetObserver.
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(Widget* widget) override;
private:
void CleanupWidget();
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 68d646c..681f1d1 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -47,7 +47,7 @@
private:
// Overridden from View:
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE {
+ virtual void OnMouseReleased(const ui::MouseEvent& event) override {
GetWidget()->Close();
base::MessageLoop::current()->QuitNow();
}
@@ -63,7 +63,7 @@
private:
// Overridden from View:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
GetWidget()->SetCapture(this);
event->StopPropagation();
@@ -84,16 +84,16 @@
}
virtual ~MouseView() {}
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override {
pressed_++;
return true;
}
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE {
+ virtual void OnMouseEntered(const ui::MouseEvent& event) override {
entered_++;
}
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE {
+ virtual void OnMouseExited(const ui::MouseEvent& event) override {
exited_++;
}
@@ -131,7 +131,7 @@
private:
// Overridden from View:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override {
// Start a nested loop.
widget_->Show();
widget_->SetCapture(widget_->GetContentsView());
@@ -157,7 +157,7 @@
WidgetTestInteractive() {}
virtual ~WidgetTestInteractive() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
base::FilePath ui_test_pak_path;
@@ -587,7 +587,7 @@
virtual ~WidgetActivationTest() {}
- virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE {
+ virtual void OnNativeWidgetActivationChanged(bool active) override {
active_ = active;
}
@@ -640,7 +640,7 @@
virtual ~ModalDialogDelegate() {}
// WidgetDelegate overrides.
- virtual ui::ModalType GetModalType() const OVERRIDE {
+ virtual ui::ModalType GetModalType() const override {
return type_;
}
@@ -867,7 +867,7 @@
}
// Widget:
- virtual void OnMouseCaptureLost() OVERRIDE {
+ virtual void OnMouseCaptureLost() override {
got_capture_lost_ = true;
Widget::OnMouseCaptureLost();
}
@@ -888,7 +888,7 @@
virtual ~WidgetCaptureTest() {
}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
base::FilePath ui_test_pak_path;
@@ -1048,7 +1048,7 @@
}
// WidgetObserver:
- virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE {
+ virtual void OnWidgetActivationChanged(Widget* widget, bool active) override {
if (active)
widget->SetCapture(NULL);
}
@@ -1101,7 +1101,7 @@
}
// Widget:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
got_mouse_event_ = true;
Widget::OnMouseEvent(event);
}
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 5bcc006..12e3cc1 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -87,23 +87,23 @@
protected:
// Overridden from View:
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE {
+ virtual void OnMouseMoved(const ui::MouseEvent& event) override {
// MouseMove events are not re-dispatched from the RootView.
++event_count_[ui::ET_MOUSE_MOVED];
last_flags_ = 0;
}
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ virtual void OnKeyEvent(ui::KeyEvent* event) override {
RecordEvent(event);
}
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
RecordEvent(event);
}
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override {
RecordEvent(event);
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
RecordEvent(event);
}
@@ -131,7 +131,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
EventCountView::OnGestureEvent(event);
switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
@@ -145,7 +145,7 @@
}
}
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override {
EventCountView::OnScrollEvent(event);
if (event->type() == ui::ET_SCROLL)
event->SetHandled();
@@ -162,7 +162,7 @@
private:
// Overridden from View:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
+ virtual gfx::Size GetMinimumSize() const override {
return gfx::Size(300, 400);
}
@@ -186,7 +186,7 @@
protected:
// Overridden from ui::EventHandler:
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
RecordEvent(*event);
ui::EventHandler::OnEvent(event);
}
@@ -210,7 +210,7 @@
}
// ui::EventHandler override:
- virtual void OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) override {
if (event->type() == event_type_) {
// Go through NativeWidgetPrivate to simulate what happens if the OS
// deletes the NativeWindow out from under us.
@@ -718,14 +718,14 @@
virtual ~WidgetObserverTest() {}
// Overridden from WidgetObserver:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE {
+ virtual void OnWidgetDestroying(Widget* widget) override {
if (active_ == widget)
active_ = NULL;
widget_closed_ = widget;
}
virtual void OnWidgetActivationChanged(Widget* widget,
- bool active) OVERRIDE {
+ bool active) override {
if (active) {
if (widget_activated_)
widget_activated_->Deactivate();
@@ -739,7 +739,7 @@
}
virtual void OnWidgetVisibilityChanged(Widget* widget,
- bool visible) OVERRIDE {
+ bool visible) override {
if (visible)
widget_shown_ = widget;
else
@@ -747,7 +747,7 @@
}
virtual void OnWidgetBoundsChanged(Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE {
+ const gfx::Rect& new_bounds) override {
widget_bounds_changed_ = widget;
}
@@ -928,7 +928,9 @@
widget->CloseNow();
}
-#if defined(false)
+// Before being enabled on Mac, this was #ifdef(false).
+// TODO(tapted): Fix this for DesktopNativeWidgets on other platforms.
+#if defined(OS_MACOSX)
// Aura needs shell to maximize/fullscreen window.
// NativeWidgetGtk doesn't implement GetRestoredBounds.
TEST_F(WidgetTest, GetRestoredBounds) {
@@ -938,8 +940,14 @@
toplevel->Show();
toplevel->Maximize();
RunPendingMessages();
+#if defined(OS_MACOSX)
+ // Current expectation on Mac is to do nothing on Maximize.
+ EXPECT_EQ(toplevel->GetWindowBoundsInScreen().ToString(),
+ toplevel->GetRestoredBounds().ToString());
+#else
EXPECT_NE(toplevel->GetWindowBoundsInScreen().ToString(),
toplevel->GetRestoredBounds().ToString());
+#endif
EXPECT_GT(toplevel->GetRestoredBounds().width(), 0);
EXPECT_GT(toplevel->GetRestoredBounds().height(), 0);
@@ -975,6 +983,9 @@
// And it should still be in normal state after getting out of full screen.
EXPECT_EQ(ui::SHOW_STATE_NORMAL, GetWidgetShowState(toplevel));
+// On Mac, a "maximized" state is indistinguishable from a window that just
+// fills the screen, so nothing to check there.
+#if !defined(OS_MACOSX)
// Now, make it maximized.
toplevel->Maximize();
EXPECT_EQ(ui::SHOW_STATE_MAXIMIZED, GetWidgetShowState(toplevel));
@@ -986,6 +997,7 @@
// And it stays maximized after getting out of full screen.
EXPECT_EQ(ui::SHOW_STATE_MAXIMIZED, GetWidgetShowState(toplevel));
+#endif
// Clean up.
toplevel->Close();
@@ -1062,7 +1074,7 @@
reset_controls_called_(false) {}
virtual ~TestBubbleDelegateView() {}
- virtual bool ShouldShowCloseButton() const OVERRIDE {
+ virtual bool ShouldShowCloseButton() const override {
reset_controls_called_ = true;
return true;
}
@@ -1120,12 +1132,12 @@
virtual ~DesktopAuraTestValidPaintWidget() {
}
- virtual void Show() OVERRIDE {
+ virtual void Show() override {
expect_paint_ = true;
views::Widget::Show();
}
- virtual void Close() OVERRIDE {
+ virtual void Close() override {
expect_paint_ = false;
views::Widget::Close();
}
@@ -1135,7 +1147,7 @@
views::Widget::Hide();
}
- virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) OVERRIDE {
+ virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) override {
EXPECT_TRUE(expect_paint_);
if (!expect_paint_)
received_paint_while_hidden_ = true;
@@ -1551,7 +1563,7 @@
private:
// ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
if (event->type() == ui::ET_MOUSE_PRESSED)
event->SetHandled();
}
@@ -1596,9 +1608,9 @@
void set_widget(views::Widget* widget) { widget_ = widget; }
// WidgetDelegate overrides:
- virtual Widget* GetWidget() OVERRIDE { return widget_; }
- virtual const Widget* GetWidget() const OVERRIDE { return widget_; }
- virtual void WindowClosing() OVERRIDE {
+ virtual Widget* GetWidget() override { return widget_; }
+ virtual const Widget* GetWidget() const override { return widget_; }
+ virtual void WindowClosing() override {
count_++;
}
@@ -1732,7 +1744,7 @@
VerifyNativeTheme();
}
- virtual View* GetContentsView() OVERRIDE {
+ virtual View* GetContentsView() override {
return this;
}
@@ -1807,7 +1819,7 @@
bool animation_completed() const { return animation_completed_; }
// ui::ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
+ virtual void OnImplicitAnimationsCompleted() override {
animation_completed_ = true;
}
@@ -1826,7 +1838,7 @@
gfx::Rect bounds() { return bounds_; }
// WidgetObserver:
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE {
+ virtual void OnWidgetDestroying(Widget* widget) override {
bounds_ = widget->GetWindowBoundsInScreen();
}
@@ -1897,11 +1909,11 @@
RootViewTestView(): View() {}
private:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
+ virtual bool OnMousePressed(const ui::MouseEvent& event) override {
return true;
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
if (event->type() == ui::ET_GESTURE_TAP_DOWN)
event->SetHandled();
}
@@ -2447,7 +2459,7 @@
}
// EventCountView:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
EventCountView::OnGestureEvent(event);
// Verify that the location of |event| is in the local coordinate
@@ -2774,7 +2786,7 @@
virtual ~ModalDialogDelegate() {}
// WidgetDelegate overrides.
- virtual ui::ModalType GetModalType() const OVERRIDE {
+ virtual ui::ModalType GetModalType() const override {
return ui::MODAL_TYPE_WINDOW;
}
@@ -2903,19 +2915,19 @@
virtual ~ModalWindowTestWidgetDelegate() {}
// Overridden from WidgetDelegate:
- virtual void DeleteDelegate() OVERRIDE {
+ virtual void DeleteDelegate() override {
delete this;
}
- virtual Widget* GetWidget() OVERRIDE {
+ virtual Widget* GetWidget() override {
return widget_;
}
- virtual const Widget* GetWidget() const OVERRIDE {
+ virtual const Widget* GetWidget() const override {
return widget_;
}
- virtual bool CanActivate() const OVERRIDE {
+ virtual bool CanActivate() const override {
return can_activate_;
}
- virtual bool ShouldAdvanceFocusToTopLevelWidget() const OVERRIDE {
+ virtual bool ShouldAdvanceFocusToTopLevelWidget() const override {
return true;
}
@@ -3086,25 +3098,25 @@
virtual ~FullscreenAwareFrame() {}
// views::NonClientFrameView overrides:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE {
+ virtual gfx::Rect GetBoundsForClientView() const override {
return gfx::Rect();
}
virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE {
+ const gfx::Rect& client_bounds) const override {
return gfx::Rect();
}
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE {
+ virtual int NonClientHitTest(const gfx::Point& point) override {
return HTNOWHERE;
}
virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE {}
- virtual void ResetWindowControls() OVERRIDE {}
- virtual void UpdateWindowIcon() OVERRIDE {}
- virtual void UpdateWindowTitle() OVERRIDE {}
- virtual void SizeConstraintsChanged() OVERRIDE {}
+ gfx::Path* window_mask) override {}
+ virtual void ResetWindowControls() override {}
+ virtual void UpdateWindowIcon() override {}
+ virtual void UpdateWindowTitle() override {}
+ virtual void SizeConstraintsChanged() override {}
// views::View overrides:
- virtual void Layout() OVERRIDE {
+ virtual void Layout() override {
if (widget_->IsFullscreen())
fullscreen_layout_called_ = true;
}
@@ -3148,7 +3160,7 @@
public:
IsActiveFromDestroyObserver() {}
virtual ~IsActiveFromDestroyObserver() {}
- virtual void OnWidgetDestroying(Widget* widget) OVERRIDE {
+ virtual void OnWidgetDestroying(Widget* widget) override {
widget->IsActive();
}
diff --git a/ui/views/widget/window_reorderer.cc b/ui/views/widget/window_reorderer.cc
index dcf51c8..098796c 100644
--- a/ui/views/widget/window_reorderer.cc
+++ b/ui/views/widget/window_reorderer.cc
@@ -71,8 +71,8 @@
// aura::WindowObserver overrides:
virtual void OnWindowPropertyChanged(aura::Window* window,
const void* key,
- intptr_t old) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ intptr_t old) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
// Not owned.
WindowReorderer* reorderer_;
diff --git a/ui/views/widget/window_reorderer.h b/ui/views/widget/window_reorderer.h
index b04e48f..5091cf4 100644
--- a/ui/views/widget/window_reorderer.h
+++ b/ui/views/widget/window_reorderer.h
@@ -37,9 +37,9 @@
private:
// aura::WindowObserver overrides:
- virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ virtual void OnWindowAdded(aura::Window* new_window) override;
+ virtual void OnWillRemoveWindow(aura::Window* window) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
// The window and the root view of the native widget which owns the
// WindowReorderer.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 744b9ea..1544507 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1431,10 +1431,11 @@
CR_DEFLATE_RECT(&window_rect, &client_rect);
min_window_size.Enlarge(window_rect.right - window_rect.left,
window_rect.bottom - window_rect.top);
- if (!max_window_size.IsEmpty()) {
- max_window_size.Enlarge(window_rect.right - window_rect.left,
- window_rect.bottom - window_rect.top);
- }
+ // Either axis may be zero, so enlarge them independently.
+ if (max_window_size.width())
+ max_window_size.Enlarge(window_rect.right - window_rect.left, 0);
+ if (max_window_size.height())
+ max_window_size.Enlarge(0, window_rect.bottom - window_rect.top);
}
minmax_info->ptMinTrackSize.x = min_window_size.width();
minmax_info->ptMinTrackSize.y = min_window_size.height();
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index f19dfef..86d3d52 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -212,37 +212,37 @@
typedef std::set<DWORD> TouchIDs;
// Overridden from internal::InputMethodDelegate:
- virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE;
+ virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override;
// Overridden from WindowImpl:
- virtual HICON GetDefaultWindowIcon() const OVERRIDE;
+ virtual HICON GetDefaultWindowIcon() const override;
virtual LRESULT OnWndProc(UINT message,
WPARAM w_param,
- LPARAM l_param) OVERRIDE;
+ LPARAM l_param) override;
// Overridden from WindowEventTarget
virtual LRESULT HandleMouseMessage(unsigned int message,
WPARAM w_param,
LPARAM l_param,
- bool* handled) OVERRIDE;
+ bool* handled) override;
virtual LRESULT HandleKeyboardMessage(unsigned int message,
WPARAM w_param,
LPARAM l_param,
- bool* handled) OVERRIDE;
+ bool* handled) override;
virtual LRESULT HandleTouchMessage(unsigned int message,
WPARAM w_param,
LPARAM l_param,
- bool* handled) OVERRIDE;
+ bool* handled) override;
virtual LRESULT HandleScrollMessage(unsigned int message,
WPARAM w_param,
LPARAM l_param,
- bool* handled) OVERRIDE;
+ bool* handled) override;
virtual LRESULT HandleNcHitTestMessage(unsigned int message,
WPARAM w_param,
LPARAM l_param,
- bool* handled) OVERRIDE;
+ bool* handled) override;
// Returns the auto-hide edges of the appbar. See
// ViewsDelegate::GetAppbarAutohideEdges() for details. If the edges change,
diff --git a/ui/views/window/client_view.h b/ui/views/window/client_view.h
index 5a329aa..53d393b 100644
--- a/ui/views/window/client_view.h
+++ b/ui/views/window/client_view.h
@@ -57,18 +57,18 @@
virtual int NonClientHitTest(const gfx::Point& point);
// Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual void Layout() override;
+ virtual const char* GetClassName() const override;
protected:
// Overridden from View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
// Accessors for private data members.
View* contents_view() const { return contents_view_; }
diff --git a/ui/views/window/custom_frame_view.h b/ui/views/window/custom_frame_view.h
index f2f738b..a09dd33 100644
--- a/ui/views/window/custom_frame_view.h
+++ b/ui/views/window/custom_frame_view.h
@@ -39,26 +39,26 @@
void Init(Widget* frame);
// Overridden from NonClientFrameView:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
+ virtual gfx::Rect GetBoundsForClientView() const override;
virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
+ const gfx::Rect& client_bounds) const override;
+ virtual int NonClientHitTest(const gfx::Point& point) override;
virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
- virtual void SizeConstraintsChanged() OVERRIDE;
+ gfx::Path* window_mask) override;
+ virtual void ResetWindowControls() override;
+ virtual void UpdateWindowIcon() override;
+ virtual void UpdateWindowTitle() override;
+ virtual void SizeConstraintsChanged() override;
// Overridden from View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void Layout() override;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
// Overridden from ButtonListener:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
private:
friend class CustomFrameViewTest;
diff --git a/ui/views/window/custom_frame_view_unittest.cc b/ui/views/window/custom_frame_view_unittest.cc
index f4dc37a..68c79e8 100644
--- a/ui/views/window/custom_frame_view_unittest.cc
+++ b/ui/views/window/custom_frame_view_unittest.cc
@@ -35,8 +35,8 @@
}
// WidgetDelegate:
- virtual bool CanMaximize() const OVERRIDE { return can_maximize_; }
- virtual bool CanMinimize() const OVERRIDE { return can_minimize_; }
+ virtual bool CanMaximize() const override { return can_maximize_; }
+ virtual bool CanMinimize() const override { return can_minimize_; }
private:
bool can_maximize_;
@@ -66,8 +66,8 @@
}
// ViewsTestBase:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ virtual void SetUp() override;
+ virtual void TearDown() override;
protected:
const std::vector<views::FrameButton>& leading_buttons() {
diff --git a/ui/views/window/dialog_client_view.h b/ui/views/window/dialog_client_view.h
index 1e8ced1..bf38f25 100644
--- a/ui/views/window/dialog_client_view.h
+++ b/ui/views/window/dialog_client_view.h
@@ -46,27 +46,27 @@
void UpdateDialogButtons();
// ClientView implementation:
- virtual bool CanClose() OVERRIDE;
- virtual DialogClientView* AsDialogClientView() OVERRIDE;
- virtual const DialogClientView* AsDialogClientView() const OVERRIDE;
+ virtual bool CanClose() override;
+ virtual DialogClientView* AsDialogClientView() override;
+ virtual const DialogClientView* AsDialogClientView() const override;
// FocusChangeListener implementation:
virtual void OnWillChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
virtual void OnDidChangeFocus(View* focused_before,
- View* focused_now) OVERRIDE;
+ View* focused_now) override;
// View implementation:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual void Layout() override;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
- virtual void NativeViewHierarchyChanged() OVERRIDE;
- virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
+ virtual void NativeViewHierarchyChanged() override;
+ virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// ButtonListener implementation:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override;
protected:
// For testing.
@@ -82,8 +82,8 @@
void CreateFootnoteView();
// View implementation.
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
- virtual void ChildVisibilityChanged(View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) override;
+ virtual void ChildVisibilityChanged(View* child) override;
private:
FRIEND_TEST_ALL_PREFIXES(DialogClientViewTest, FocusManager);
diff --git a/ui/views/window/dialog_client_view_unittest.cc b/ui/views/window/dialog_client_view_unittest.cc
index 28b001f..6f4812c 100644
--- a/ui/views/window/dialog_client_view_unittest.cc
+++ b/ui/views/window/dialog_client_view_unittest.cc
@@ -23,7 +23,7 @@
virtual ~TestDialogClientView() {}
// DialogClientView implementation.
- virtual DialogDelegate* GetDialogDelegate() const OVERRIDE { return dialog_; }
+ virtual DialogDelegate* GetDialogDelegate() const override { return dialog_; }
View* GetContentsView() { return contents_view(); }
@@ -48,7 +48,7 @@
virtual ~DialogClientViewTest() {}
// testing::Test implementation.
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
dialog_buttons_ = ui::DIALOG_BUTTON_NONE;
contents_.reset(new StaticSizedView(gfx::Size(100, 200)));
client_view_.reset(new TestDialogClientView(contents_.get(), this));
@@ -57,10 +57,10 @@
}
// DialogDelegateView implementation.
- virtual View* GetContentsView() OVERRIDE { return contents_.get(); }
- virtual View* CreateExtraView() OVERRIDE { return extra_view_; }
- virtual View* CreateFootnoteView() OVERRIDE { return footnote_view_; }
- virtual int GetDialogButtons() const OVERRIDE { return dialog_buttons_; }
+ virtual View* GetContentsView() override { return contents_.get(); }
+ virtual View* CreateExtraView() override { return extra_view_; }
+ virtual View* CreateFootnoteView() override { return footnote_view_; }
+ virtual int GetDialogButtons() const override { return dialog_buttons_; }
protected:
gfx::Rect GetUpdatedClientBounds() {
diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h
index 8a2533e..d2294c2 100644
--- a/ui/views/window/dialog_delegate.h
+++ b/ui/views/window/dialog_delegate.h
@@ -83,20 +83,20 @@
virtual bool Close();
// Overridden from ui::DialogModel:
- virtual base::string16 GetDialogLabel() const OVERRIDE;
- virtual base::string16 GetDialogTitle() const OVERRIDE;
- virtual int GetDialogButtons() const OVERRIDE;
- virtual int GetDefaultDialogButton() const OVERRIDE;
- virtual bool ShouldDefaultButtonBeBlue() const OVERRIDE;
+ virtual base::string16 GetDialogLabel() const override;
+ virtual base::string16 GetDialogTitle() const override;
+ virtual int GetDialogButtons() const override;
+ virtual int GetDefaultDialogButton() const override;
+ virtual bool ShouldDefaultButtonBeBlue() const override;
virtual base::string16 GetDialogButtonLabel(
- ui::DialogButton button) const OVERRIDE;
- virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE;
+ ui::DialogButton button) const override;
+ virtual bool IsDialogButtonEnabled(ui::DialogButton button) const override;
// Overridden from WidgetDelegate:
- virtual View* GetInitiallyFocusedView() OVERRIDE;
- virtual DialogDelegate* AsDialogDelegate() OVERRIDE;
- virtual ClientView* CreateClientView(Widget* widget) OVERRIDE;
- virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) OVERRIDE;
+ virtual View* GetInitiallyFocusedView() override;
+ virtual DialogDelegate* AsDialogDelegate() override;
+ virtual ClientView* CreateClientView(Widget* widget) override;
+ virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) override;
// Create a frame view using the new dialog style.
static NonClientFrameView* CreateDialogFrameView(Widget* widget);
@@ -114,7 +114,7 @@
protected:
// Overridden from WidgetDelegate:
- virtual ui::AXRole GetAccessibleWindowRole() const OVERRIDE;
+ virtual ui::AXRole GetAccessibleWindowRole() const override;
private:
// A flag indicating whether this dialog supports the new style.
@@ -132,10 +132,10 @@
virtual ~DialogDelegateView();
// Overridden from DialogDelegate:
- virtual void DeleteDelegate() OVERRIDE;
- virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual View* GetContentsView() OVERRIDE;
+ virtual void DeleteDelegate() override;
+ virtual Widget* GetWidget() override;
+ virtual const Widget* GetWidget() const override;
+ virtual View* GetContentsView() override;
private:
DISALLOW_COPY_AND_ASSIGN(DialogDelegateView);
diff --git a/ui/views/window/dialog_delegate_unittest.cc b/ui/views/window/dialog_delegate_unittest.cc
index b355104..bbfa66b 100644
--- a/ui/views/window/dialog_delegate_unittest.cc
+++ b/ui/views/window/dialog_delegate_unittest.cc
@@ -27,24 +27,24 @@
virtual ~TestDialog() {}
// DialogDelegateView overrides:
- virtual bool Cancel() OVERRIDE {
+ virtual bool Cancel() override {
canceled_ = true;
return closeable_;
}
- virtual bool Accept() OVERRIDE {
+ virtual bool Accept() override {
accepted_ = true;
return closeable_;
}
// DialogDelegateView overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ virtual gfx::Size GetPreferredSize() const override {
return gfx::Size(200, 200);
}
- virtual base::string16 GetWindowTitle() const OVERRIDE { return title_; }
- virtual bool UseNewStyleForThisDialog() const OVERRIDE { return true; }
+ virtual base::string16 GetWindowTitle() const override { return title_; }
+ virtual bool UseNewStyleForThisDialog() const override { return true; }
// ButtonListener override:
- virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE {
+ virtual void ButtonPressed(Button* sender, const ui::Event& event) override {
last_pressed_button_ = sender;
}
@@ -94,13 +94,13 @@
DialogTest() : dialog_(NULL) {}
virtual ~DialogTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ViewsTestBase::SetUp();
dialog_ = new TestDialog();
DialogDelegate::CreateDialogWidget(dialog_, GetContext(), NULL)->Show();
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
dialog_->TearDown();
ViewsTestBase::TearDown();
}
diff --git a/ui/views/window/native_frame_view.h b/ui/views/window/native_frame_view.h
index 444bf96..3f4d09a 100644
--- a/ui/views/window/native_frame_view.h
+++ b/ui/views/window/native_frame_view.h
@@ -19,22 +19,22 @@
virtual ~NativeFrameView();
// NonClientFrameView overrides:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
+ virtual gfx::Rect GetBoundsForClientView() const override;
virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
+ const gfx::Rect& client_bounds) const override;
+ virtual int NonClientHitTest(const gfx::Point& point) override;
virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
- virtual void SizeConstraintsChanged() OVERRIDE;
+ gfx::Path* window_mask) override;
+ virtual void ResetWindowControls() override;
+ virtual void UpdateWindowIcon() override;
+ virtual void UpdateWindowTitle() override;
+ virtual void SizeConstraintsChanged() override;
// View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual const char* GetClassName() const override;
private:
// Our containing frame.
diff --git a/ui/views/window/non_client_view.h b/ui/views/window/non_client_view.h
index 434b782..99a6880 100644
--- a/ui/views/window/non_client_view.h
+++ b/ui/views/window/non_client_view.h
@@ -82,18 +82,18 @@
virtual void SizeConstraintsChanged() = 0;
// View:
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual const char* GetClassName() const override;
protected:
NonClientFrameView();
// ViewTargeterDelegate:
virtual bool DoesIntersectRect(const View* target,
- const gfx::Rect& rect) const OVERRIDE;
+ const gfx::Rect& rect) const override;
// View:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
private:
// Prevents the non-client frame view from being rendered as inactive when
@@ -215,24 +215,24 @@
void SetAccessibleName(const base::string16& name);
// NonClientView, View overrides:
- virtual gfx::Size GetPreferredSize() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual gfx::Size GetMaximumSize() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const override;
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual void Layout() override;
+ virtual void GetAccessibleState(ui::AXViewState* state) override;
+ virtual const char* GetClassName() const override;
virtual views::View* GetTooltipHandlerForPoint(
- const gfx::Point& point) OVERRIDE;
+ const gfx::Point& point) override;
protected:
// NonClientView, View overrides:
virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
+ const ViewHierarchyChangedDetails& details) override;
private:
// ViewTargeterDelegate:
- virtual View* TargetForRect(View* root, const gfx::Rect& rect) OVERRIDE;
+ virtual View* TargetForRect(View* root, const gfx::Rect& rect) override;
// A ClientView object or subclass, responsible for sizing the contents view
// of the window, hit testing and perhaps other tasks depending on the
diff --git a/ui/views_content_client/views_content_browser_client.h b/ui/views_content_client/views_content_browser_client.h
index f01cd3a..a24ece9 100644
--- a/ui/views_content_client/views_content_browser_client.h
+++ b/ui/views_content_client/views_content_browser_client.h
@@ -25,11 +25,11 @@
// content::ContentBrowserClient:
virtual content::BrowserMainParts* CreateBrowserMainParts(
- const content::MainFunctionParams& parameters) OVERRIDE;
+ const content::MainFunctionParams& parameters) override;
virtual net::URLRequestContextGetter* CreateRequestContext(
content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers,
- content::URLRequestInterceptorScopedVector request_interceptors) OVERRIDE;
+ content::URLRequestInterceptorScopedVector request_interceptors) override;
private:
ViewsContentClientMainParts* views_content_main_parts_;
diff --git a/ui/views_content_client/views_content_client_main_parts.h b/ui/views_content_client/views_content_client_main_parts.h
index 113e352..1e9ad4d 100644
--- a/ui/views_content_client/views_content_client_main_parts.h
+++ b/ui/views_content_client/views_content_client_main_parts.h
@@ -32,9 +32,9 @@
virtual ~ViewsContentClientMainParts();
// content::BrowserMainParts:
- virtual void PreMainMessageLoopRun() OVERRIDE;
- virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
- virtual void PostMainMessageLoopRun() OVERRIDE;
+ virtual void PreMainMessageLoopRun() override;
+ virtual bool MainMessageLoopRun(int* result_code) override;
+ virtual void PostMainMessageLoopRun() override;
content::ShellBrowserContext* browser_context() {
return browser_context_.get();
diff --git a/ui/views_content_client/views_content_client_main_parts_aura.h b/ui/views_content_client/views_content_client_main_parts_aura.h
index 06b273a..4a8f56d 100644
--- a/ui/views_content_client/views_content_client_main_parts_aura.h
+++ b/ui/views_content_client/views_content_client_main_parts_aura.h
@@ -23,8 +23,8 @@
virtual ~ViewsContentClientMainPartsAura();
// content::BrowserMainParts:
- virtual void ToolkitInitialized() OVERRIDE;
- virtual void PostMainMessageLoopRun() OVERRIDE;
+ virtual void ToolkitInitialized() override;
+ virtual void PostMainMessageLoopRun() override;
private:
scoped_ptr< ::wm::WMState> wm_state_;
diff --git a/ui/views_content_client/views_content_client_main_parts_chromeos.cc b/ui/views_content_client/views_content_client_main_parts_chromeos.cc
index b2d304e..5198eeb 100644
--- a/ui/views_content_client/views_content_client_main_parts_chromeos.cc
+++ b/ui/views_content_client/views_content_client_main_parts_chromeos.cc
@@ -25,7 +25,7 @@
// ::wm::NestedAcceleratorDelegate:
virtual Result ProcessAccelerator(
- const ui::Accelerator& accelerator) OVERRIDE {
+ const ui::Accelerator& accelerator) override {
return RESULT_NOT_PROCESSED;
}
@@ -42,8 +42,8 @@
virtual ~ViewsContentClientMainPartsChromeOS() {}
// content::BrowserMainParts:
- virtual void PreMainMessageLoopRun() OVERRIDE;
- virtual void PostMainMessageLoopRun() OVERRIDE;
+ virtual void PreMainMessageLoopRun() override;
+ virtual void PostMainMessageLoopRun() override;
private:
// Enable a minimal set of views::corewm to be initialized.
diff --git a/ui/views_content_client/views_content_client_main_parts_desktop_aura.cc b/ui/views_content_client/views_content_client_main_parts_desktop_aura.cc
index ec8b75b..cb2293b 100644
--- a/ui/views_content_client/views_content_client_main_parts_desktop_aura.cc
+++ b/ui/views_content_client/views_content_client_main_parts_desktop_aura.cc
@@ -22,7 +22,7 @@
virtual ~ViewsContentClientMainPartsDesktopAura() {}
// content::BrowserMainParts:
- virtual void PreMainMessageLoopRun() OVERRIDE;
+ virtual void PreMainMessageLoopRun() override;
private:
DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainPartsDesktopAura);
diff --git a/ui/views_content_client/views_content_client_main_parts_mac.mm b/ui/views_content_client/views_content_client_main_parts_mac.mm
index 2c86c37..afeae12 100644
--- a/ui/views_content_client/views_content_client_main_parts_mac.mm
+++ b/ui/views_content_client/views_content_client_main_parts_mac.mm
@@ -7,6 +7,7 @@
#include "base/files/file_path.h"
#include "base/mac/scoped_nsobject.h"
#include "base/path_service.h"
+#include "content/public/browser/plugin_service.h"
#include "content/public/common/content_paths.h"
#include "content/shell/browser/shell_browser_context.h"
#include "ui/views_content_client/views_content_client.h"
@@ -36,7 +37,7 @@
virtual ~ViewsContentClientMainPartsMac();
// content::BrowserMainParts:
- virtual void PreMainMessageLoopRun() OVERRIDE;
+ virtual void PreMainMessageLoopRun() override;
private:
base::scoped_nsobject<ViewsContentClientAppController> app_controller_;
@@ -52,6 +53,10 @@
base::FilePath child_process_exe;
PathService::Get(content::CHILD_PROCESS_EXE, &child_process_exe);
+ // Disable plugin discovery since NPAPI plugin support on Mac requires this to
+ // be done in a utility process type which isn't bundled with this executable.
+ content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting();
+
app_controller_.reset([[ViewsContentClientAppController alloc] init]);
[[NSApplication sharedApplication] setDelegate:app_controller_];
}
diff --git a/ui/views_content_client/views_content_main_delegate.h b/ui/views_content_client/views_content_main_delegate.h
index f56eece..646201a 100644
--- a/ui/views_content_client/views_content_main_delegate.h
+++ b/ui/views_content_client/views_content_main_delegate.h
@@ -21,9 +21,9 @@
virtual ~ViewsContentMainDelegate();
// content::ContentMainDelegate implementation
- virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
- virtual void PreSandboxStartup() OVERRIDE;
- virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
+ virtual bool BasicStartupComplete(int* exit_code) override;
+ virtual void PreSandboxStartup() override;
+ virtual content::ContentBrowserClient* CreateContentBrowserClient() override;
private:
scoped_ptr<ViewsContentBrowserClient> browser_client_;
diff --git a/ui/web_dialogs/test/test_web_contents_handler.h b/ui/web_dialogs/test/test_web_contents_handler.h
index abe2c73..86e197b 100644
--- a/ui/web_dialogs/test/test_web_contents_handler.h
+++ b/ui/web_dialogs/test/test_web_contents_handler.h
@@ -23,13 +23,13 @@
virtual content::WebContents* OpenURLFromTab(
content::BrowserContext* context,
content::WebContents* source,
- const content::OpenURLParams& params) OVERRIDE;
+ const content::OpenURLParams& params) override;
virtual void AddNewContents(content::BrowserContext* context,
content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture) OVERRIDE;
+ bool user_gesture) override;
DISALLOW_COPY_AND_ASSIGN(TestWebContentsHandler);
};
diff --git a/ui/web_dialogs/test/test_web_dialog_delegate.h b/ui/web_dialogs/test/test_web_dialog_delegate.h
index 18a73b2..b289536 100644
--- a/ui/web_dialogs/test/test_web_dialog_delegate.h
+++ b/ui/web_dialogs/test/test_web_dialog_delegate.h
@@ -25,17 +25,17 @@
}
// WebDialogDelegate implementation:
- virtual ModalType GetDialogModalType() const OVERRIDE;
- virtual base::string16 GetDialogTitle() const OVERRIDE;
- virtual GURL GetDialogContentURL() const OVERRIDE;
+ virtual ModalType GetDialogModalType() const override;
+ virtual base::string16 GetDialogTitle() const override;
+ virtual GURL GetDialogContentURL() const override;
virtual void GetWebUIMessageHandlers(
- std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
- virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
- virtual std::string GetDialogArgs() const OVERRIDE;
- virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
+ std::vector<content::WebUIMessageHandler*>* handlers) const override;
+ virtual void GetDialogSize(gfx::Size* size) const override;
+ virtual std::string GetDialogArgs() const override;
+ virtual void OnDialogClosed(const std::string& json_retval) override;
virtual void OnCloseContents(content::WebContents* source,
- bool* out_close_dialog) OVERRIDE;
- virtual bool ShouldShowDialogTitle() const OVERRIDE;
+ bool* out_close_dialog) override;
+ virtual bool ShouldShowDialogTitle() const override;
protected:
const GURL url_;
diff --git a/ui/web_dialogs/web_dialog_ui.h b/ui/web_dialogs/web_dialog_ui.h
index 99dce4f..144b8c7 100644
--- a/ui/web_dialogs/web_dialog_ui.h
+++ b/ui/web_dialogs/web_dialog_ui.h
@@ -69,7 +69,7 @@
private:
// WebUIController
virtual void RenderViewCreated(
- content::RenderViewHost* render_view_host) OVERRIDE;
+ content::RenderViewHost* render_view_host) override;
// Gets the delegate for the WebContent set with SetDelegate.
static WebDialogDelegate* GetDelegate(content::WebContents* web_contents);
diff --git a/ui/web_dialogs/web_dialog_web_contents_delegate.h b/ui/web_dialogs/web_dialog_web_contents_delegate.h
index 50b4a65..d5ed725 100644
--- a/ui/web_dialogs/web_dialog_web_contents_delegate.h
+++ b/ui/web_dialogs/web_dialog_web_contents_delegate.h
@@ -55,18 +55,18 @@
// content::WebContentsDelegate declarations.
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
- const content::OpenURLParams& params) OVERRIDE;
+ const content::OpenURLParams& params) override;
virtual void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture,
- bool* was_blocked) OVERRIDE;
+ bool* was_blocked) override;
virtual bool IsPopupOrPanel(
- const content::WebContents* source) const OVERRIDE;
+ const content::WebContents* source) const override;
virtual bool PreHandleGestureEvent(
content::WebContents* source,
- const blink::WebGestureEvent& event) OVERRIDE;
+ const blink::WebGestureEvent& event) override;
private:
// Weak pointer. Always an original profile.
diff --git a/ui/webui/resources/js/chromeos/ui_account_tweaks.js b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
index 76c2d90..6dab42b 100644
--- a/ui/webui/resources/js/chromeos/ui_account_tweaks.js
+++ b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
@@ -57,6 +57,26 @@
};
/**
+ * Enables an element unless it should be disabled for the session type.
+ *
+ * @param {!Element} element Element that should be enabled.
+ */
+ UIAccountTweaks.enableElementIfPossible = function(element) {
+ var sessionType;
+ if (UIAccountTweaks.loggedInAsGuest())
+ sessionType = SESSION_TYPE_GUEST;
+ else if (UIAccountTweaks.loggedInAsPublicAccount())
+ sessionType = SESSION_TYPE_PUBLIC;
+
+ if (sessionType &&
+ element.getAttribute(sessionType + '-visibility') == 'disabled') {
+ return;
+ }
+
+ element.disabled = false;
+ }
+
+ /**
* Disables or hides some elements in specified type of session in ChromeOS.
* All elements within given document with *sessionType*-visibility
* attribute are either hidden (for *sessionType*-visibility="hidden")
@@ -68,10 +88,10 @@
*/
UIAccountTweaks.applySessionTypeVisibility_ = function(document,
sessionType) {
- var elements = document.querySelectorAll('['+ sessionType +'-visibility]');
+ var elements = document.querySelectorAll('['+ sessionType + '-visibility]');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
- var visibility = element.getAttribute(sessionType +'-visibility');
+ var visibility = element.getAttribute(sessionType + '-visibility');
if (visibility == 'hidden')
element.hidden = true;
else if (visibility == 'disabled')
@@ -86,7 +106,7 @@
* @param {Document} document Document that should processed.
*/
UIAccountTweaks.applyGuestSessionVisibility = function(document) {
- if (!cr.isChromeOS || !UIAccountTweaks.loggedInAsGuest())
+ if (!UIAccountTweaks.loggedInAsGuest())
return;
UIAccountTweaks.applySessionTypeVisibility_(document, SESSION_TYPE_GUEST);
}
@@ -98,7 +118,7 @@
* @param {Document} document Document that should processed.
*/
UIAccountTweaks.applyPublicSessionVisibility = function(document) {
- if (!cr.isChromeOS || !UIAccountTweaks.loggedInAsPublicAccount())
+ if (!UIAccountTweaks.loggedInAsPublicAccount())
return;
UIAccountTweaks.applySessionTypeVisibility_(document, SESSION_TYPE_PUBLIC);
}
diff --git a/ui/webui/resources/js/cr/ui/autocomplete_list.js b/ui/webui/resources/js/cr/ui/autocomplete_list.js
index ab74955..b9515e4 100644
--- a/ui/webui/resources/js/cr/ui/autocomplete_list.js
+++ b/ui/webui/resources/js/cr/ui/autocomplete_list.js
@@ -11,7 +11,7 @@
* Creates a new autocomplete list item.
* This is suitable for selecting a web site, and used by default.
* A different behavior can be set by AutocompleteListItem.itemConstructor.
- * @param {Object} pageInfo The page this item represents.
+ * @param {*} pageInfo The page this item represents.
* @constructor
* @extends {cr.ui.ListItem}
*/
diff --git a/ui/webui/resources/js/cr/ui/command.js b/ui/webui/resources/js/cr/ui/command.js
index e23e958..cd1266c 100644
--- a/ui/webui/resources/js/cr/ui/command.js
+++ b/ui/webui/resources/js/cr/ui/command.js
@@ -290,7 +290,7 @@
* @class
*/
function CanExecuteEvent(command) {
- var e = new Event('canExecute', {bubbles: true});
+ var e = new Event('canExecute', {bubbles: true, cancelable: true});
e.__proto__ = CanExecuteEvent.prototype;
e.command = command;
return e;
@@ -307,7 +307,8 @@
/**
* Whether the target can execute the command. Setting this also stops the
- * propagation.
+ * propagation and prevents the default. Callers can tell if an event has
+ * been handled via |this.defaultPrevented|.
* @type {boolean}
*/
canExecute_: false,
@@ -317,6 +318,7 @@
set canExecute(canExecute) {
this.canExecute_ = !!canExecute;
this.stopPropagation();
+ this.preventDefault();
}
};
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
index 2f7180c..36b3c35 100644
--- a/ui/webui/resources/js/cr/ui/list.js
+++ b/ui/webui/resources/js/cr/ui/list.js
@@ -92,7 +92,7 @@
/**
* Function used to create grid items.
- * @return {function(new:cr.ui.ListItem, Object)}
+ * @return {function(new:cr.ui.ListItem, *)}
*/
get itemConstructor() {
return this.itemConstructor_;
diff --git a/ui/webui/resources/js/cr/ui/table.js b/ui/webui/resources/js/cr/ui/table.js
index fcb81ec..f0540c0 100644
--- a/ui/webui/resources/js/cr/ui/table.js
+++ b/ui/webui/resources/js/cr/ui/table.js
@@ -61,7 +61,7 @@
/**
* The list of table.
*
- * @type {cr.ui.list}
+ * @type {cr.ui.List}
*/
get list() {
return this.list_;
@@ -92,7 +92,7 @@
* The table selection model.
*
* @type
- * {cr.ui.ListSelectionModel|cr.ui.table.ListSingleSelectionModel}
+ * {cr.ui.ListSelectionModel|cr.ui.ListSingleSelectionModel}
*/
get selectionModel() {
return this.list_.selectionModel;
@@ -126,7 +126,7 @@
/**
* Returns render function for row.
- * @return {Function(*, cr.ui.Table): HTMLElement} Render function.
+ * @return {function(*, cr.ui.Table): HTMLElement} Render function.
*/
getRenderFunction: function() {
return this.list_.renderFunction_;
@@ -134,7 +134,8 @@
/**
* Sets render function for row.
- * @param {Function(*, cr.ui.Table): HTMLElement} Render function.
+ * @param {function(*, cr.ui.Table): HTMLElement} renderFunction Render
+ * function.
*/
setRenderFunction: function(renderFunction) {
if (renderFunction === this.list_.renderFunction_)
@@ -164,7 +165,7 @@
this.appendChild(this.list_);
TableList.decorate(this.list_);
- this.list_.selectionModel = new ListSelectionModel(this);
+ this.list_.selectionModel = new ListSelectionModel();
this.list_.table = this;
this.list_.addEventListener('scroll', this.handleScroll_.bind(this));
@@ -190,7 +191,7 @@
/**
* Redraws the table.
*/
- redraw: function(index) {
+ redraw: function() {
this.list_.redraw();
this.header_.redraw();
},
@@ -226,7 +227,7 @@
/**
* Find the list item element at the given index.
* @param {number} index The index of the list item to get.
- * @return {ListItem} The found list item or null if not found.
+ * @return {cr.ui.ListItem} The found list item or null if not found.
*/
getListItemByIndex: function(index) {
return this.list_.getListItemByIndex(index);
diff --git a/ui/webui/resources/js/cr/ui/table/table_column.js b/ui/webui/resources/js/cr/ui/table/table_column.js
index ac14f30..193ca86 100644
--- a/ui/webui/resources/js/cr/ui/table/table_column.js
+++ b/ui/webui/resources/js/cr/ui/table/table_column.js
@@ -51,7 +51,8 @@
* @return {HTMLElement} Rendered element.
*/
renderFunction_: function(dataItem, columnId, table) {
- var div = table.ownerDocument.createElement('div');
+ var div = /** @type {HTMLElement} */
+ (table.ownerDocument.createElement('div'));
div.textContent = dataItem[columnId];
return div;
},
@@ -59,7 +60,7 @@
/**
* Renders table header. This is the default render function.
* @param {cr.ui.Table} table The table.
- * @return {HTMLElement} Rendered element.
+ * @return {Text} Rendered text node.
*/
headerRenderFunction_: function(table) {
return table.ownerDocument.createTextNode(this.name);
@@ -92,13 +93,13 @@
/**
* The column render function.
- * @type {Function(*, string, cr.ui.Table): HTMLElement}
+ * @type {function(*, string, cr.ui.Table): HTMLElement}
*/
cr.defineProperty(TableColumn, 'renderFunction');
/**
* The column header render function.
- * @type {Function(cr.ui.Table): HTMLElement}
+ * @type {function(cr.ui.Table): Text}
*/
cr.defineProperty(TableColumn, 'headerRenderFunction');
diff --git a/ui/webui/resources/js/cr/ui/table/table_column_model.js b/ui/webui/resources/js/cr/ui/table/table_column_model.js
index aefe1ba..da7803a 100644
--- a/ui/webui/resources/js/cr/ui/table/table_column_model.js
+++ b/ui/webui/resources/js/cr/ui/table/table_column_model.js
@@ -11,9 +11,10 @@
/**
* A table column model that wraps table columns array
* This implementation supports widths in percents.
- * @param {!Array<cr.ui.table.TableColumn>} columnIds Array of table columns.
+ * @param {!Array<cr.ui.table.TableColumn>} tableColumns Array of table
+ * columns.
* @constructor
- * @extends {EventTarget}
+ * @extends {cr.EventTarget}
*/
function TableColumnModel(tableColumns) {
this.columns_ = [];
@@ -107,7 +108,7 @@
/**
* Returns render function for the column at the given index.
* @param {number} index The index of the column.
- * @return {Function(*, string, cr.ui.Table): HTMLElement} Render function.
+ * @return {function(*, string, cr.ui.Table): HTMLElement} Render function.
*/
getRenderFunction: function(index) {
return this.columns_[index].renderFunction;
@@ -116,7 +117,8 @@
/**
* Sets render function for the column at the given index.
* @param {number} index The index of the column.
- * @param {Function(*, string, cr.ui.Table): HTMLElement} Render function.
+ * @param {function(*, string, cr.ui.Table): HTMLElement} renderFunction
+ * Render function.
*/
setRenderFunction: function(index, renderFunction) {
if (index < 0 || index >= this.columns_.size - 1)
diff --git a/ui/webui/resources/js/cr/ui/table/table_header.js b/ui/webui/resources/js/cr/ui/table/table_header.js
index f48eb5e..a05b264 100644
--- a/ui/webui/resources/js/cr/ui/table/table_header.js
+++ b/ui/webui/resources/js/cr/ui/table/table_header.js
@@ -180,9 +180,10 @@
/**
* Handles the touchstart event. If the touch happened close enough
* to a splitter starts dragging.
- * @param {TouchEvent} e The touch event.
+ * @param {Event} e The touch event.
*/
handleTouchStart_: function(e) {
+ e = /** @type {TouchEvent} */ (e);
if (e.touches.length != 1)
return;
var clientX = e.touches[0].clientX;
diff --git a/ui/webui/resources/js/cr/ui/table/table_list.js b/ui/webui/resources/js/cr/ui/table/table_list.js
index 3d3e50d..7e3c3b3 100644
--- a/ui/webui/resources/js/cr/ui/table/table_list.js
+++ b/ui/webui/resources/js/cr/ui/table/table_list.js
@@ -8,7 +8,6 @@
cr.define('cr.ui.table', function() {
/** @const */ var List = cr.ui.List;
- /** @const */ var TableRow = cr.ui.table.TableRow;
/** @const */ var ListItem = cr.ui.ListItem;
/**
diff --git a/ui/webui/resources/js/cr/ui/table/table_splitter.js b/ui/webui/resources/js/cr/ui/table/table_splitter.js
index edf61a5..0954be4 100644
--- a/ui/webui/resources/js/cr/ui/table/table_splitter.js
+++ b/ui/webui/resources/js/cr/ui/table/table_splitter.js
@@ -17,7 +17,7 @@
* Creates a new table splitter element.
* @param {Object=} opt_propertyBag Optional properties.
* @constructor
- * @extends {Splitter}
+ * @extends {cr.ui.Splitter}
*/
var TableSplitter = cr.ui.define('div');
diff --git a/ui/wm/BUILD.gn b/ui/wm/BUILD.gn
index e01ee94..67248f4 100644
--- a/ui/wm/BUILD.gn
+++ b/ui/wm/BUILD.gn
@@ -88,8 +88,6 @@
]
}
-if (false) {
-
static_library("test_support") {
testonly = true
sources = [
@@ -142,5 +140,3 @@
"//ui/gl",
]
}
-
-} # if (false)
diff --git a/ui/wm/core/accelerator_filter.h b/ui/wm/core/accelerator_filter.h
index 4e5295e..0ac7605 100644
--- a/ui/wm/core/accelerator_filter.h
+++ b/ui/wm/core/accelerator_filter.h
@@ -25,7 +25,7 @@
virtual ~AcceleratorFilter();
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
private:
scoped_ptr<AcceleratorDelegate> delegate_;
diff --git a/ui/wm/core/base_focus_rules.h b/ui/wm/core/base_focus_rules.h
index 07dfb65..8073541 100644
--- a/ui/wm/core/base_focus_rules.h
+++ b/ui/wm/core/base_focus_rules.h
@@ -26,15 +26,15 @@
aura::Window* window) const;
// Overridden from FocusRules:
- virtual bool IsToplevelWindow(aura::Window* window) const OVERRIDE;
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
- virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) const OVERRIDE;
+ virtual bool IsToplevelWindow(aura::Window* window) const override;
+ virtual bool CanActivateWindow(aura::Window* window) const override;
+ virtual bool CanFocusWindow(aura::Window* window) const override;
+ virtual aura::Window* GetToplevelWindow(aura::Window* window) const override;
virtual aura::Window* GetActivatableWindow(
- aura::Window* window) const OVERRIDE;
- virtual aura::Window* GetFocusableWindow(aura::Window* window) const OVERRIDE;
+ aura::Window* window) const override;
+ virtual aura::Window* GetFocusableWindow(aura::Window* window) const override;
virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const OVERRIDE;
+ aura::Window* ignore) const override;
private:
DISALLOW_COPY_AND_ASSIGN(BaseFocusRules);
diff --git a/ui/wm/core/capture_controller.h b/ui/wm/core/capture_controller.h
index d802818..230ea50 100644
--- a/ui/wm/core/capture_controller.h
+++ b/ui/wm/core/capture_controller.h
@@ -29,10 +29,10 @@
bool is_active() const { return !root_windows_.empty(); }
// Overridden from aura::client::CaptureClient:
- virtual void SetCapture(aura::Window* window) OVERRIDE;
- virtual void ReleaseCapture(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetCaptureWindow() OVERRIDE;
- virtual aura::Window* GetGlobalCaptureWindow() OVERRIDE;
+ virtual void SetCapture(aura::Window* window) override;
+ virtual void ReleaseCapture(aura::Window* window) override;
+ virtual aura::Window* GetCaptureWindow() override;
+ virtual aura::Window* GetGlobalCaptureWindow() override;
private:
friend class ScopedCaptureClient;
@@ -66,7 +66,7 @@
}
// Overridden from aura::WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
private:
// Invoked from destructor and OnWindowDestroyed() to cleanup.
diff --git a/ui/wm/core/compound_event_filter.h b/ui/wm/core/compound_event_filter.h
index ab4fdf8..a7767f3 100644
--- a/ui/wm/core/compound_event_filter.h
+++ b/ui/wm/core/compound_event_filter.h
@@ -73,11 +73,11 @@
bool enable);
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Additional pre-target event handlers.
ObserverList<ui::EventHandler, true> handlers_;
diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
index 85282fc..05f75e9 100644
--- a/ui/wm/core/compound_event_filter_unittest.cc
+++ b/ui/wm/core/compound_event_filter_unittest.cc
@@ -39,7 +39,7 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* e) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* e) override {
e->StopPropagation();
}
diff --git a/ui/wm/core/cursor_manager.h b/ui/wm/core/cursor_manager.h
index f60ef14..4f9c21b 100644
--- a/ui/wm/core/cursor_manager.h
+++ b/ui/wm/core/cursor_manager.h
@@ -43,33 +43,33 @@
virtual ~CursorManager();
// Overridden from aura::client::CursorClient:
- virtual void SetCursor(gfx::NativeCursor) OVERRIDE;
- virtual gfx::NativeCursor GetCursor() const OVERRIDE;
- virtual void ShowCursor() OVERRIDE;
- virtual void HideCursor() OVERRIDE;
- virtual bool IsCursorVisible() const OVERRIDE;
- virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
- virtual ui::CursorSetType GetCursorSet() const OVERRIDE;
- virtual void EnableMouseEvents() OVERRIDE;
- virtual void DisableMouseEvents() OVERRIDE;
- virtual bool IsMouseEventsEnabled() const OVERRIDE;
- virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
- virtual void LockCursor() OVERRIDE;
- virtual void UnlockCursor() OVERRIDE;
- virtual bool IsCursorLocked() const OVERRIDE;
+ virtual void SetCursor(gfx::NativeCursor) override;
+ virtual gfx::NativeCursor GetCursor() const override;
+ virtual void ShowCursor() override;
+ virtual void HideCursor() override;
+ virtual bool IsCursorVisible() const override;
+ virtual void SetCursorSet(ui::CursorSetType cursor_set) override;
+ virtual ui::CursorSetType GetCursorSet() const override;
+ virtual void EnableMouseEvents() override;
+ virtual void DisableMouseEvents() override;
+ virtual bool IsMouseEventsEnabled() const override;
+ virtual void SetDisplay(const gfx::Display& display) override;
+ virtual void LockCursor() override;
+ virtual void UnlockCursor() override;
+ virtual bool IsCursorLocked() const override;
virtual void AddObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE;
+ aura::client::CursorClientObserver* observer) override;
virtual void RemoveObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE;
+ aura::client::CursorClientObserver* observer) override;
virtual bool ShouldHideCursorOnKeyEvent(
- const ui::KeyEvent& event) const OVERRIDE;
+ const ui::KeyEvent& event) const override;
private:
// Overridden from NativeCursorManagerDelegate:
- virtual void CommitCursor(gfx::NativeCursor cursor) OVERRIDE;
- virtual void CommitVisibility(bool visible) OVERRIDE;
- virtual void CommitCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
- virtual void CommitMouseEventsEnabled(bool enabled) OVERRIDE;
+ virtual void CommitCursor(gfx::NativeCursor cursor) override;
+ virtual void CommitVisibility(bool visible) override;
+ virtual void CommitCursorSet(ui::CursorSetType cursor_set) override;
+ virtual void CommitMouseEventsEnabled(bool enabled) override;
scoped_ptr<NativeCursorManager> delegate_;
diff --git a/ui/wm/core/cursor_manager_unittest.cc b/ui/wm/core/cursor_manager_unittest.cc
index 58c3b17..8dd2aa8 100644
--- a/ui/wm/core/cursor_manager_unittest.cc
+++ b/ui/wm/core/cursor_manager_unittest.cc
@@ -15,29 +15,29 @@
// Overridden from wm::NativeCursorManager:
virtual void SetDisplay(
const gfx::Display& display,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {}
+ wm::NativeCursorManagerDelegate* delegate) override {}
virtual void SetCursor(
gfx::NativeCursor cursor,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitCursor(cursor);
}
virtual void SetVisibility(
bool visible,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitVisibility(visible);
}
virtual void SetMouseEventsEnabled(
bool enabled,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitMouseEventsEnabled(enabled);
}
virtual void SetCursorSet(
ui::CursorSetType cursor_set,
- wm::NativeCursorManagerDelegate* delegate) OVERRIDE {
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitCursorSet(cursor_set);
}
};
@@ -66,7 +66,7 @@
bool did_visibility_change() const { return did_visibility_change_; }
// Overridden from aura::client::CursorClientObserver:
- virtual void OnCursorVisibilityChanged(bool is_visible) OVERRIDE {
+ virtual void OnCursorVisibilityChanged(bool is_visible) override {
cursor_visibility_ = is_visible;
did_visibility_change_ = true;
}
diff --git a/ui/wm/core/default_activation_client.cc b/ui/wm/core/default_activation_client.cc
index 94af0a5..d6383d6 100644
--- a/ui/wm/core/default_activation_client.cc
+++ b/ui/wm/core/default_activation_client.cc
@@ -23,7 +23,7 @@
virtual ~Deleter() {}
// Overridden from WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(aura::Window* window) override {
DCHECK_EQ(window, root_window_);
root_window_->RemoveObserver(this);
delete client_;
diff --git a/ui/wm/core/default_activation_client.h b/ui/wm/core/default_activation_client.h
index 13b2474..fb9f9e2 100644
--- a/ui/wm/core/default_activation_client.h
+++ b/ui/wm/core/default_activation_client.h
@@ -33,18 +33,18 @@
// Overridden from aura::client::ActivationClient:
virtual void AddObserver(
- aura::client::ActivationChangeObserver* observer) OVERRIDE;
+ aura::client::ActivationChangeObserver* observer) override;
virtual void RemoveObserver(
- aura::client::ActivationChangeObserver* observer) OVERRIDE;
- virtual void ActivateWindow(aura::Window* window) OVERRIDE;
- virtual void DeactivateWindow(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetActiveWindow() OVERRIDE;
- virtual aura::Window* GetActivatableWindow(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) OVERRIDE;
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
+ aura::client::ActivationChangeObserver* observer) override;
+ virtual void ActivateWindow(aura::Window* window) override;
+ virtual void DeactivateWindow(aura::Window* window) override;
+ virtual aura::Window* GetActiveWindow() override;
+ virtual aura::Window* GetActivatableWindow(aura::Window* window) override;
+ virtual aura::Window* GetToplevelWindow(aura::Window* window) override;
+ virtual bool CanActivateWindow(aura::Window* window) const override;
// Overridden from WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
private:
class Deleter;
diff --git a/ui/wm/core/easy_resize_window_targeter.h b/ui/wm/core/easy_resize_window_targeter.h
index 35b9eb2..5693300 100644
--- a/ui/wm/core/easy_resize_window_targeter.h
+++ b/ui/wm/core/easy_resize_window_targeter.h
@@ -34,7 +34,7 @@
// ui::EventTargeter:
virtual bool EventLocationInsideBounds(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
private:
// Returns true if the hit testing (EventLocationInsideBounds()) should use
diff --git a/ui/wm/core/focus_controller.h b/ui/wm/core/focus_controller.h
index 2f1aa0e..9e4149f 100644
--- a/ui/wm/core/focus_controller.h
+++ b/ui/wm/core/focus_controller.h
@@ -46,40 +46,40 @@
private:
// Overridden from aura::client::ActivationClient:
virtual void AddObserver(
- aura::client::ActivationChangeObserver* observer) OVERRIDE;
+ aura::client::ActivationChangeObserver* observer) override;
virtual void RemoveObserver(
- aura::client::ActivationChangeObserver* observer) OVERRIDE;
- virtual void ActivateWindow(aura::Window* window) OVERRIDE;
- virtual void DeactivateWindow(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetActiveWindow() OVERRIDE;
- virtual aura::Window* GetActivatableWindow(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) OVERRIDE;
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
+ aura::client::ActivationChangeObserver* observer) override;
+ virtual void ActivateWindow(aura::Window* window) override;
+ virtual void DeactivateWindow(aura::Window* window) override;
+ virtual aura::Window* GetActiveWindow() override;
+ virtual aura::Window* GetActivatableWindow(aura::Window* window) override;
+ virtual aura::Window* GetToplevelWindow(aura::Window* window) override;
+ virtual bool CanActivateWindow(aura::Window* window) const override;
// Overridden from aura::client::FocusClient:
virtual void AddObserver(
- aura::client::FocusChangeObserver* observer) OVERRIDE;
+ aura::client::FocusChangeObserver* observer) override;
virtual void RemoveObserver(
- aura::client::FocusChangeObserver* observer) OVERRIDE;
- virtual void FocusWindow(aura::Window* window) OVERRIDE;
- virtual void ResetFocusWithinActiveWindow(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetFocusedWindow() OVERRIDE;
+ aura::client::FocusChangeObserver* observer) override;
+ virtual void FocusWindow(aura::Window* window) override;
+ virtual void ResetFocusWithinActiveWindow(aura::Window* window) override;
+ virtual aura::Window* GetFocusedWindow() override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from aura::WindowObserver:
virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ bool visible) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
virtual void OnWindowHierarchyChanging(
- const HierarchyChangeParams& params) OVERRIDE;
+ const HierarchyChangeParams& params) override;
virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) OVERRIDE;
+ const HierarchyChangeParams& params) override;
// Internal implementation that sets the focused window, fires events etc.
// This function must be called with a valid focusable window.
diff --git a/ui/wm/core/focus_controller_unittest.cc b/ui/wm/core/focus_controller_unittest.cc
index a10cef3..2508bcd 100644
--- a/ui/wm/core/focus_controller_unittest.cc
+++ b/ui/wm/core/focus_controller_unittest.cc
@@ -56,12 +56,12 @@
private:
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
+ aura::Window* lost_active) override {
++activation_changed_count_;
}
virtual void OnAttemptToReactivateWindow(
aura::Window* request_active,
- aura::Window* actual_active) OVERRIDE {
+ aura::Window* actual_active) override {
++reactivation_count_;
reactivation_requested_window_ = request_active;
reactivation_actual_window_ = actual_active;
@@ -69,7 +69,7 @@
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
+ aura::Window* lost_focus) override {
++focus_changed_count_;
}
@@ -116,14 +116,14 @@
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
+ aura::Window* lost_active) override {
if (lost_active && lost_active == deleter_->GetDeletedWindow())
was_notified_with_deleted_window_ = true;
}
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
+ aura::Window* lost_focus) override {
if (lost_focus && lost_focus == deleter_->GetDeletedWindow())
was_notified_with_deleted_window_ = true;
}
@@ -159,7 +159,7 @@
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
+ aura::Window* lost_active) override {
if (window_ && lost_active == window_) {
delete lost_active;
did_delete_ = true;
@@ -167,7 +167,7 @@
}
// Overridden from WindowDeleter:
- virtual aura::Window* GetDeletedWindow() OVERRIDE {
+ virtual aura::Window* GetDeletedWindow() override {
return did_delete_ ? window_ : NULL;
}
@@ -196,7 +196,7 @@
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
+ aura::Window* lost_focus) override {
if (window_ && lost_focus == window_) {
delete lost_focus;
did_delete_ = true;
@@ -204,7 +204,7 @@
}
// Overridden from WindowDeleter:
- virtual aura::Window* GetDeletedWindow() OVERRIDE {
+ virtual aura::Window* GetDeletedWindow() override {
return did_delete_ ? window_ : NULL;
}
@@ -267,7 +267,7 @@
private:
// Overridden from aura::client::FocusChangeObserver:
virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
+ aura::Window* lost_focus) override {
ui::TextInputFocusManager::GetInstance()->FocusTextInputClient(
text_input_client_);
}
@@ -282,10 +282,10 @@
virtual ~SimpleEventHandler() {}
// Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) override {
event->SetHandled();
}
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) override {
event->SetHandled();
}
@@ -308,7 +308,7 @@
private:
// Overridden from aura::client::ActivationChangeObserver:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
+ aura::Window* lost_active) override {
// Shift focus to a child. This should prevent the default focusing from
// occurring in FocusController::FocusWindow().
if (gained_active == activated_window_) {
@@ -338,33 +338,33 @@
}
// Overridden from BaseFocusRules:
- virtual bool SupportsChildActivation(aura::Window* window) const OVERRIDE {
+ virtual bool SupportsChildActivation(aura::Window* window) const override {
// In FocusControllerTests, only the RootWindow has activatable children.
return window->GetRootWindow() == window;
}
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE {
+ virtual bool CanActivateWindow(aura::Window* window) const override {
// Restricting focus to a non-activatable child window means the activatable
// parent outside the focus restriction is activatable.
bool can_activate =
CanFocusOrActivate(window) || window->Contains(focus_restriction_);
return can_activate ? BaseFocusRules::CanActivateWindow(window) : false;
}
- virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE {
+ virtual bool CanFocusWindow(aura::Window* window) const override {
return CanFocusOrActivate(window) ?
BaseFocusRules::CanFocusWindow(window) : false;
}
virtual aura::Window* GetActivatableWindow(
- aura::Window* window) const OVERRIDE {
+ aura::Window* window) const override {
return BaseFocusRules::GetActivatableWindow(
CanFocusOrActivate(window) ? window : focus_restriction_);
}
virtual aura::Window* GetFocusableWindow(
- aura::Window* window) const OVERRIDE {
+ aura::Window* window) const override {
return BaseFocusRules::GetFocusableWindow(
CanFocusOrActivate(window) ? window : focus_restriction_);
}
virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const OVERRIDE {
+ aura::Window* ignore) const override {
aura::Window* next_activatable =
BaseFocusRules::GetNextActivatableWindow(ignore);
return CanFocusOrActivate(next_activatable) ?
@@ -387,7 +387,7 @@
FocusControllerTestBase() {}
// Overridden from aura::test::AuraTestBase:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
wm_state_.reset(new wm::WMState);
// FocusController registers itself as an Env observer so it can catch all
// window initializations, including the root_window()'s, so we create it
@@ -430,7 +430,7 @@
aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 3,
gfx::Rect(125, 125, 50, 50), root_window());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
root_window()->RemovePreTargetHandler(focus_controller_.get());
aura::test::AuraTestBase::TearDown();
test_focus_rules_ = NULL; // Owned by FocusController.
@@ -518,14 +518,14 @@
}
// Overridden from FocusControllerTestBase:
- virtual void BasicFocus() OVERRIDE {
+ virtual void BasicFocus() override {
EXPECT_EQ(NULL, GetFocusedWindow());
FocusWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
FocusWindowById(2);
EXPECT_EQ(2, GetFocusedWindowId());
}
- virtual void BasicActivation() OVERRIDE {
+ virtual void BasicActivation() override {
EXPECT_EQ(NULL, GetActiveWindow());
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
@@ -538,7 +538,7 @@
DeactivateWindow(GetActiveWindow());
EXPECT_EQ(1, GetActiveWindowId());
}
- virtual void FocusEvents() OVERRIDE {
+ virtual void FocusEvents() override {
ScopedFocusNotificationObserver root_observer(root_window());
ScopedTargetFocusNotificationObserver observer1(root_window(), 1);
ScopedTargetFocusNotificationObserver observer2(root_window(), 2);
@@ -557,7 +557,7 @@
observer1.ExpectCounts(2, 2);
observer2.ExpectCounts(1, 1);
}
- virtual void DuplicateFocusEvents() OVERRIDE {
+ virtual void DuplicateFocusEvents() override {
// Focusing an existing focused window should not resend focus events.
ScopedFocusNotificationObserver root_observer(root_window());
ScopedTargetFocusNotificationObserver observer1(root_window(), 1);
@@ -573,7 +573,7 @@
root_observer.ExpectCounts(1, 1);
observer1.ExpectCounts(1, 1);
}
- virtual void ActivationEvents() OVERRIDE {
+ virtual void ActivationEvents() override {
ActivateWindowById(1);
ScopedFocusNotificationObserver root_observer(root_window());
@@ -589,7 +589,7 @@
observer1.ExpectCounts(1, 1);
observer2.ExpectCounts(1, 1);
}
- virtual void ReactivationEvents() OVERRIDE {
+ virtual void ReactivationEvents() override {
ActivateWindowById(1);
ScopedFocusNotificationObserver root_observer(root_window());
EXPECT_EQ(0, root_observer.reactivation_count());
@@ -603,7 +603,7 @@
EXPECT_EQ(root_window()->GetChildById(1),
root_observer.reactivation_actual_window());
}
- virtual void DuplicateActivationEvents() OVERRIDE {
+ virtual void DuplicateActivationEvents() override {
// Activating an existing active window should not resend activation events.
ActivateWindowById(1);
@@ -625,7 +625,7 @@
observer1.ExpectCounts(1, 1);
observer2.ExpectCounts(1, 1);
}
- virtual void ShiftFocusWithinActiveWindow() OVERRIDE {
+ virtual void ShiftFocusWithinActiveWindow() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(1, GetFocusedWindowId());
@@ -634,7 +634,7 @@
FocusWindowById(12);
EXPECT_EQ(12, GetFocusedWindowId());
}
- virtual void ShiftFocusToChildOfInactiveWindow() OVERRIDE {
+ virtual void ShiftFocusToChildOfInactiveWindow() override {
ActivateWindowById(2);
EXPECT_EQ(2, GetActiveWindowId());
EXPECT_EQ(2, GetFocusedWindowId());
@@ -642,7 +642,7 @@
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(11, GetFocusedWindowId());
}
- virtual void ShiftFocusToParentOfFocusedWindow() OVERRIDE {
+ virtual void ShiftFocusToParentOfFocusedWindow() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
FocusWindowById(11);
@@ -651,7 +651,7 @@
// Focus should _not_ shift to the parent of the already-focused window.
EXPECT_EQ(11, GetFocusedWindowId());
}
- virtual void FocusRulesOverride() OVERRIDE {
+ virtual void FocusRulesOverride() override {
EXPECT_EQ(NULL, GetFocusedWindow());
FocusWindowById(11);
EXPECT_EQ(11, GetFocusedWindowId());
@@ -667,7 +667,7 @@
FocusWindowById(12);
EXPECT_EQ(12, GetFocusedWindowId());
}
- virtual void ActivationRulesOverride() OVERRIDE {
+ virtual void ActivationRulesOverride() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(1, GetFocusedWindowId());
@@ -687,7 +687,7 @@
EXPECT_EQ(2, GetActiveWindowId());
EXPECT_EQ(2, GetFocusedWindowId());
}
- virtual void ShiftFocusOnActivation() OVERRIDE {
+ virtual void ShiftFocusOnActivation() override {
// When a window is activated, by default that window is also focused.
// An ActivationChangeObserver may shift focus to another window within the
// same activatable window.
@@ -729,7 +729,7 @@
ActivateWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
}
- virtual void ShiftFocusOnActivationDueToHide() OVERRIDE {
+ virtual void ShiftFocusOnActivationDueToHide() override {
// Similar to ShiftFocusOnActivation except the activation change is
// triggered by hiding the active window.
ActivateWindowById(1);
@@ -755,12 +755,12 @@
client->RemoveObserver(observer.get());
}
- virtual void NoShiftActiveOnActivation() OVERRIDE {
+ virtual void NoShiftActiveOnActivation() override {
// When a window is activated, we need to prevent any change to activation
// from being made in response to an activation change notification.
}
- virtual void NoFocusChangeOnClickOnCaptureWindow() OVERRIDE {
+ virtual void NoFocusChangeOnClickOnCaptureWindow() override {
scoped_ptr<aura::client::DefaultCaptureClient> capture_client(
new aura::client::DefaultCaptureClient(root_window()));
// Clicking on a window which has capture should not cause a focus change
@@ -781,7 +781,7 @@
}
// Verifies focus change is honored while capture held.
- virtual void ChangeFocusWhenNothingFocusedAndCaptured() OVERRIDE {
+ virtual void ChangeFocusWhenNothingFocusedAndCaptured() override {
scoped_ptr<aura::client::DefaultCaptureClient> capture_client(
new aura::client::DefaultCaptureClient(root_window()));
aura::Window* w1 = root_window()->GetChildById(1);
@@ -800,7 +800,7 @@
// Verifies if a window that loses activation or focus is deleted during
// observer notification we don't pass the deleted window to other observers.
- virtual void DontPassDeletedWindow() OVERRIDE {
+ virtual void DontPassDeletedWindow() override {
FocusWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
@@ -839,7 +839,7 @@
// Verifies if the focused text input client is cleared when a window gains
// or loses the focus.
- virtual void FocusedTextInputClient() OVERRIDE {
+ virtual void FocusedTextInputClient() override {
ui::TextInputFocusManager* text_input_focus_manager =
ui::TextInputFocusManager::GetInstance();
ui::DummyTextInputClient text_input_client;
@@ -883,16 +883,16 @@
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void FocusWindowDirect(aura::Window* window) override {
FocusWindow(window);
}
- virtual void ActivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void ActivateWindowDirect(aura::Window* window) override {
ActivateWindow(window);
}
- virtual void DeactivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void DeactivateWindowDirect(aura::Window* window) override {
DeactivateWindow(window);
}
- virtual bool IsInputEvent() OVERRIDE { return false; }
+ virtual bool IsInputEvent() override { return false; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerApiTest);
};
@@ -921,21 +921,21 @@
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void FocusWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
- virtual void ActivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void ActivateWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
- virtual void DeactivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void DeactivateWindowDirect(aura::Window* window) override {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
ui::test::EventGenerator generator(root_window(), next_activatable);
generator.ClickLeftButton();
}
- virtual bool IsInputEvent() OVERRIDE { return true; }
+ virtual bool IsInputEvent() override { return true; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerMouseEventTest);
};
@@ -946,21 +946,21 @@
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void FocusWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual void ActivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void ActivateWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual void DeactivateWindowDirect(aura::Window* window) OVERRIDE {
+ virtual void DeactivateWindowDirect(aura::Window* window) override {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
ui::test::EventGenerator generator(root_window(), next_activatable);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual bool IsInputEvent() OVERRIDE { return true; }
+ virtual bool IsInputEvent() override { return true; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerGestureEventTest);
};
@@ -984,7 +984,7 @@
virtual void PostDispostionChangeExpectations() {}
// Overridden from FocusControllerTestBase:
- virtual void BasicFocus() OVERRIDE {
+ virtual void BasicFocus() override {
EXPECT_EQ(NULL, GetFocusedWindow());
aura::Window* w211 = root_window()->GetChildById(211);
@@ -995,7 +995,7 @@
// BasicFocusRules passes focus to the parent.
EXPECT_EQ(parent_ ? 2 : 21, GetFocusedWindowId());
}
- virtual void BasicActivation() OVERRIDE {
+ virtual void BasicActivation() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
EXPECT_EQ(NULL, GetActiveWindow());
@@ -1008,7 +1008,7 @@
EXPECT_EQ(3, GetActiveWindowId());
PostDispostionChangeExpectations();
}
- virtual void FocusEvents() OVERRIDE {
+ virtual void FocusEvents() override {
aura::Window* w211 = root_window()->GetChildById(211);
FocusWindow(w211);
@@ -1021,7 +1021,7 @@
root_observer.ExpectCounts(0, 1);
observer211.ExpectCounts(0, 1);
}
- virtual void ActivationEvents() OVERRIDE {
+ virtual void ActivationEvents() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
aura::Window* w2 = root_window()->GetChildById(2);
@@ -1039,7 +1039,7 @@
observer2.ExpectCounts(1, 1);
observer3.ExpectCounts(1, 1);
}
- virtual void FocusRulesOverride() OVERRIDE {
+ virtual void FocusRulesOverride() override {
EXPECT_EQ(NULL, GetFocusedWindow());
aura::Window* w211 = root_window()->GetChildById(211);
FocusWindow(w211);
@@ -1053,7 +1053,7 @@
test_focus_rules()->set_focus_restriction(NULL);
}
- virtual void ActivationRulesOverride() OVERRIDE {
+ virtual void ActivationRulesOverride() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
aura::Window* w1 = root_window()->GetChildById(1);
@@ -1096,7 +1096,7 @@
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) OVERRIDE {
+ virtual void ChangeWindowDisposition(aura::Window* window) override {
GetDispositionWindow(window)->Hide();
}
@@ -1124,7 +1124,7 @@
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) OVERRIDE {
+ virtual void ChangeWindowDisposition(aura::Window* window) override {
delete GetDispositionWindow(window);
}
@@ -1153,12 +1153,12 @@
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) OVERRIDE {
+ virtual void ChangeWindowDisposition(aura::Window* window) override {
aura::Window* disposition_window = GetDispositionWindow(window);
disposition_window->parent()->RemoveChild(disposition_window);
window_owner_.reset(disposition_window);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
window_owner_.reset();
FocusControllerImplicitTestBase::TearDown();
}
diff --git a/ui/wm/core/image_grid.h b/ui/wm/core/image_grid.h
index 1242dcb..6102f8b 100644
--- a/ui/wm/core/image_grid.h
+++ b/ui/wm/core/image_grid.h
@@ -137,11 +137,11 @@
void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer);
// ui::LayerDelegate implementation:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnPaintLayer(gfx::Canvas* canvas) override;
virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) OVERRIDE;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE;
+ const gfx::Rect& damage_rect_in_dip) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual base::Closure PrepareForLayerBoundsChange() override;
private:
friend class TestAPI;
diff --git a/ui/wm/core/input_method_event_filter.h b/ui/wm/core/input_method_event_filter.h
index af82308..d658d77 100644
--- a/ui/wm/core/input_method_event_filter.h
+++ b/ui/wm/core/input_method_event_filter.h
@@ -35,10 +35,10 @@
private:
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
// Overridden from ui::internal::InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE;
+ virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
scoped_ptr<ui::InputMethod> input_method_;
diff --git a/ui/wm/core/input_method_event_filter_unittest.cc b/ui/wm/core/input_method_event_filter_unittest.cc
index 810ba2a..9a2d31b 100644
--- a/ui/wm/core/input_method_event_filter_unittest.cc
+++ b/ui/wm/core/input_method_event_filter_unittest.cc
@@ -33,7 +33,7 @@
public:
explicit TestTextInputClient(aura::Window* window) : window_(window) {}
- virtual aura::Window* GetAttachedWindow() const OVERRIDE { return window_; }
+ virtual aura::Window* GetAttachedWindow() const override { return window_; }
private:
aura::Window* window_;
@@ -47,7 +47,7 @@
virtual ~InputMethodEventFilterTest() {}
// testing::Test overrides:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
aura::test::AuraTestBase::SetUp();
root_window()->AddPreTargetHandler(&root_filter_);
@@ -66,7 +66,7 @@
test_input_client_.get());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
test_window_.reset();
root_filter_.RemoveHandler(&test_filter_);
root_filter_.RemoveHandler(input_method_event_filter_.get());
diff --git a/ui/wm/core/masked_window_targeter.h b/ui/wm/core/masked_window_targeter.h
index 61bb3b1..e289329 100644
--- a/ui/wm/core/masked_window_targeter.h
+++ b/ui/wm/core/masked_window_targeter.h
@@ -27,7 +27,7 @@
// ui::EventTargeter:
virtual bool EventLocationInsideBounds(
ui::EventTarget* target,
- const ui::LocatedEvent& event) const OVERRIDE;
+ const ui::LocatedEvent& event) const override;
private:
aura::Window* masked_window_;
diff --git a/ui/wm/core/nested_accelerator_controller.h b/ui/wm/core/nested_accelerator_controller.h
index 2826d72..1eca937 100644
--- a/ui/wm/core/nested_accelerator_controller.h
+++ b/ui/wm/core/nested_accelerator_controller.h
@@ -29,7 +29,7 @@
virtual void PrepareNestedLoopClosures(
base::MessagePumpDispatcher* dispatcher,
base::Closure* run_closure,
- base::Closure* quit_closure) OVERRIDE;
+ base::Closure* quit_closure) override;
private:
void RunNestedMessageLoop(scoped_ptr<base::RunLoop> run_loop,
diff --git a/ui/wm/core/nested_accelerator_controller_unittest.cc b/ui/wm/core/nested_accelerator_controller_unittest.cc
index d0a3688..ce548d5 100644
--- a/ui/wm/core/nested_accelerator_controller_unittest.cc
+++ b/ui/wm/core/nested_accelerator_controller_unittest.cc
@@ -40,10 +40,10 @@
private:
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE {
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
if (ui::EventTypeFromNative(event) == ui::ET_KEY_RELEASED)
num_key_events_dispatched_++;
return ui::POST_DISPATCH_NONE;
@@ -62,11 +62,11 @@
int accelerator_pressed_count() const { return accelerator_pressed_count_; }
// Overridden from ui::AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE {
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override {
accelerator_pressed_count_++;
return true;
}
- virtual bool CanHandleAccelerators() const OVERRIDE { return true; }
+ virtual bool CanHandleAccelerators() const override { return true; }
private:
int accelerator_pressed_count_;
@@ -105,7 +105,7 @@
// NestedAcceleratorDelegate:
virtual Result ProcessAccelerator(
- const ui::Accelerator& accelerator) OVERRIDE {
+ const ui::Accelerator& accelerator) override {
return accelerator_manager_->Process(accelerator) ?
RESULT_PROCESSED : RESULT_NOT_PROCESSED;
}
@@ -127,7 +127,7 @@
NestedAcceleratorTest() {}
virtual ~NestedAcceleratorTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
delegate_ = new MockNestedAcceleratorDelegate();
nested_accelerator_controller_.reset(
@@ -136,7 +136,7 @@
nested_accelerator_controller_.get());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
aura::client::SetDispatcherClient(root_window(), NULL);
AuraTestBase::TearDown();
delegate_ = NULL;
diff --git a/ui/wm/core/nested_accelerator_dispatcher_linux.cc b/ui/wm/core/nested_accelerator_dispatcher_linux.cc
index 3379419..ee5b587 100644
--- a/ui/wm/core/nested_accelerator_dispatcher_linux.cc
+++ b/ui/wm/core/nested_accelerator_dispatcher_linux.cc
@@ -55,16 +55,16 @@
private:
// AcceleratorDispatcher:
- virtual scoped_ptr<base::RunLoop> CreateRunLoop() OVERRIDE {
+ virtual scoped_ptr<base::RunLoop> CreateRunLoop() override {
return scoped_ptr<base::RunLoop>(new base::RunLoop());
}
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE {
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE {
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
if (IsKeyEvent(event)) {
ui::KeyEvent key_event(event);
ui::Accelerator accelerator = CreateAcceleratorFromKeyEvent(key_event);
diff --git a/ui/wm/core/nested_accelerator_dispatcher_win.cc b/ui/wm/core/nested_accelerator_dispatcher_win.cc
index 3b3fb2d..5504d57 100644
--- a/ui/wm/core/nested_accelerator_dispatcher_win.cc
+++ b/ui/wm/core/nested_accelerator_dispatcher_win.cc
@@ -35,12 +35,12 @@
private:
// NestedAcceleratorDispatcher:
- virtual scoped_ptr<base::RunLoop> CreateRunLoop() OVERRIDE {
+ virtual scoped_ptr<base::RunLoop> CreateRunLoop() override {
return scoped_ptr<base::RunLoop>(new base::RunLoop(this));
}
// MessagePumpDispatcher:
- virtual uint32_t Dispatch(const MSG& event) OVERRIDE {
+ virtual uint32_t Dispatch(const MSG& event) override {
if (IsKeyEvent(event)) {
ui::KeyEvent key_event(event);
ui::Accelerator accelerator = CreateAcceleratorFromKeyEvent(key_event);
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index 5e90650..19f5972 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -54,7 +54,7 @@
void SetStyle(Style style);
// ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
private:
// Updates the shadow images to the current |style_|.
diff --git a/ui/wm/core/shadow_controller.cc b/ui/wm/core/shadow_controller.cc
index 9d1f50e..abd33ad 100644
--- a/ui/wm/core/shadow_controller.cc
+++ b/ui/wm/core/shadow_controller.cc
@@ -97,16 +97,16 @@
static Impl* GetInstance();
// aura::EnvObserver override:
- virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
+ virtual void OnWindowInitialized(aura::Window* window) override;
// aura::WindowObserver overrides:
virtual void OnWindowPropertyChanged(
- aura::Window* window, const void* key, intptr_t old) OVERRIDE;
+ aura::Window* window, const void* key, intptr_t old) override;
virtual void OnWindowBoundsChanged(
aura::Window* window,
const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ const gfx::Rect& new_bounds) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
private:
friend class base::RefCounted<Impl>;
diff --git a/ui/wm/core/shadow_controller.h b/ui/wm/core/shadow_controller.h
index c846894..9deeda6 100644
--- a/ui/wm/core/shadow_controller.h
+++ b/ui/wm/core/shadow_controller.h
@@ -52,7 +52,7 @@
// aura::client::ActivationChangeObserver overrides:
virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
+ aura::Window* lost_active) override;
private:
class Impl;
diff --git a/ui/wm/core/shadow_controller_unittest.cc b/ui/wm/core/shadow_controller_unittest.cc
index 477e3ac..1b1aa18 100644
--- a/ui/wm/core/shadow_controller_unittest.cc
+++ b/ui/wm/core/shadow_controller_unittest.cc
@@ -27,7 +27,7 @@
ShadowControllerTest() {}
virtual ~ShadowControllerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
wm_state_.reset(new wm::WMState);
AuraTestBase::SetUp();
new wm::DefaultActivationClient(root_window());
@@ -35,7 +35,7 @@
aura::client::GetActivationClient(root_window());
shadow_controller_.reset(new ShadowController(activation_client));
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
shadow_controller_.reset();
AuraTestBase::TearDown();
wm_state_.reset();
diff --git a/ui/wm/core/shadow_unittest.cc b/ui/wm/core/shadow_unittest.cc
index 2090b06..2ffdd4a 100644
--- a/ui/wm/core/shadow_unittest.cc
+++ b/ui/wm/core/shadow_unittest.cc
@@ -40,15 +40,15 @@
// ResourceBundle::Delegate:
virtual base::FilePath GetPathForResourcePack(
const base::FilePath& pack_path,
- ui::ScaleFactor scale_factor) OVERRIDE {
+ ui::ScaleFactor scale_factor) override {
return base::FilePath();
}
virtual base::FilePath GetPathForLocalePack(
const base::FilePath& pack_path,
- const std::string& locale) OVERRIDE {
+ const std::string& locale) override {
return base::FilePath();
}
- virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE {
+ virtual gfx::Image GetImageNamed(int resource_id) override {
last_resource_id_ = resource_id;
switch (resource_id) {
case IDR_WINDOW_BUBBLE_SHADOW_SMALL:
@@ -62,24 +62,24 @@
}
}
virtual gfx::Image GetNativeImageNamed(
- int resource_id, ui::ResourceBundle::ImageRTL rtl) OVERRIDE {
+ int resource_id, ui::ResourceBundle::ImageRTL rtl) override {
return gfx::Image();
}
virtual base::RefCountedStaticMemory* LoadDataResourceBytes(
- int resource_id, ui::ScaleFactor scale_factor) OVERRIDE {
+ int resource_id, ui::ScaleFactor scale_factor) override {
return NULL;
}
virtual bool GetRawDataResource(
int resource_id, ui::ScaleFactor scale_factor,
- base::StringPiece* value) OVERRIDE {
+ base::StringPiece* value) override {
return false;
}
virtual bool GetLocalizedString(
- int message_id, base::string16* value) OVERRIDE {
+ int message_id, base::string16* value) override {
return false;
}
virtual scoped_ptr<gfx::Font> GetFont(
- ui::ResourceBundle::FontStyle style) OVERRIDE {
+ ui::ResourceBundle::FontStyle style) override {
return scoped_ptr<gfx::Font>();
}
@@ -103,7 +103,7 @@
MockResourceBundleDelegate* delegate() { return delegate_.get(); }
// aura::testAuraBase:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
aura::test::AuraTestBase::SetUp();
delegate_.reset(new MockResourceBundleDelegate());
if (ResourceBundle::HasSharedInstance())
@@ -111,7 +111,7 @@
ui::ResourceBundle::InitSharedInstanceWithLocale(
"en-US", delegate(), ui::ResourceBundle::LOAD_COMMON_RESOURCES);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::FilePath ui_test_pak_path;
ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
diff --git a/ui/wm/core/transient_window_controller.h b/ui/wm/core/transient_window_controller.h
index 8638824..4322b41 100644
--- a/ui/wm/core/transient_window_controller.h
+++ b/ui/wm/core/transient_window_controller.h
@@ -20,12 +20,12 @@
// TransientWindowClient:
virtual void AddTransientChild(aura::Window* parent,
- aura::Window* child) OVERRIDE;
+ aura::Window* child) override;
virtual void RemoveTransientChild(aura::Window* parent,
- aura::Window* child) OVERRIDE;
- virtual aura::Window* GetTransientParent(aura::Window* window) OVERRIDE;
+ aura::Window* child) override;
+ virtual aura::Window* GetTransientParent(aura::Window* window) override;
virtual const aura::Window* GetTransientParent(
- const aura::Window* window) OVERRIDE;
+ const aura::Window* window) override;
private:
DISALLOW_COPY_AND_ASSIGN(TransientWindowController);
diff --git a/ui/wm/core/transient_window_manager.h b/ui/wm/core/transient_window_manager.h
index 7a7ee46..a6c5139 100644
--- a/ui/wm/core/transient_window_manager.h
+++ b/ui/wm/core/transient_window_manager.h
@@ -81,13 +81,13 @@
// WindowObserver:
virtual void OnWindowParentChanged(aura::Window* window,
- aura::Window* parent) OVERRIDE;
+ aura::Window* parent) override;
virtual void OnWindowVisibilityChanging(aura::Window* window,
- bool visible) OVERRIDE;
+ bool visible) override;
virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ bool visible) override;
+ virtual void OnWindowStackingChanged(aura::Window* window) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
aura::Window* window_;
aura::Window* transient_parent_;
diff --git a/ui/wm/core/transient_window_manager_unittest.cc b/ui/wm/core/transient_window_manager_unittest.cc
index eaac027..79d2559 100644
--- a/ui/wm/core/transient_window_manager_unittest.cc
+++ b/ui/wm/core/transient_window_manager_unittest.cc
@@ -34,11 +34,11 @@
// TransientWindowObserver overrides:
virtual void OnTransientChildAdded(Window* window,
- Window* transient) OVERRIDE {
+ Window* transient) override {
add_count_++;
}
virtual void OnTransientChildRemoved(Window* window,
- Window* transient) OVERRIDE {
+ Window* transient) override {
remove_count_++;
}
@@ -54,12 +54,12 @@
TransientWindowManagerTest() {}
virtual ~TransientWindowManagerTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
wm_state_.reset(new wm::WMState);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
wm_state_.reset();
AuraTestBase::TearDown();
}
@@ -349,7 +349,7 @@
: name_(name),
results_(results) {}
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(aura::Window* window) override {
results_->push_back(name_);
}
@@ -462,12 +462,12 @@
private:
// Overridden from LayoutManager:
- virtual void OnWindowResized() OVERRIDE {}
- virtual void OnWindowAddedToLayout(Window* child) OVERRIDE {}
- virtual void OnWillRemoveWindowFromLayout(Window* child) OVERRIDE {}
- virtual void OnWindowRemovedFromLayout(Window* child) OVERRIDE {}
+ virtual void OnWindowResized() override {}
+ virtual void OnWindowAddedToLayout(Window* child) override {}
+ virtual void OnWillRemoveWindowFromLayout(Window* child) override {}
+ virtual void OnWindowRemovedFromLayout(Window* child) override {}
virtual void OnChildWindowVisibilityChanged(Window* child,
- bool visible) OVERRIDE {
+ bool visible) override {
Window::Windows::const_iterator it = root_window_->children().begin();
Window* last_window = NULL;
for (; it != root_window_->children().end(); ++it) {
@@ -482,7 +482,7 @@
}
}
virtual void SetChildBounds(Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE {
+ const gfx::Rect& requested_bounds) override {
SetChildBoundsDirect(child, requested_bounds);
}
@@ -506,7 +506,7 @@
private:
// Overridden from client::VisibilityClient:
- virtual void UpdateLayerVisibility(Window* window, bool visible) OVERRIDE {
+ virtual void UpdateLayerVisibility(Window* window, bool visible) override {
if (!visible) {
if (window == ignored_window_)
window->layer()->set_delegate(NULL);
diff --git a/ui/wm/core/transient_window_stacking_client.h b/ui/wm/core/transient_window_stacking_client.h
index 4ab4aea..ce9d55c 100644
--- a/ui/wm/core/transient_window_stacking_client.h
+++ b/ui/wm/core/transient_window_stacking_client.h
@@ -21,7 +21,7 @@
// WindowStackingClient:
virtual bool AdjustStacking(aura::Window** child,
aura::Window** target,
- aura::Window::StackDirection* direction) OVERRIDE;
+ aura::Window::StackDirection* direction) override;
private:
// Purely for DCHECKs.
diff --git a/ui/wm/core/transient_window_stacking_client_unittest.cc b/ui/wm/core/transient_window_stacking_client_unittest.cc
index c5d3bd0..c067496 100644
--- a/ui/wm/core/transient_window_stacking_client_unittest.cc
+++ b/ui/wm/core/transient_window_stacking_client_unittest.cc
@@ -21,13 +21,13 @@
TransientWindowStackingClientTest() {}
virtual ~TransientWindowStackingClientTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
client_.reset(new TransientWindowStackingClient);
aura::client::SetWindowStackingClient(client_.get());
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
aura::client::SetWindowStackingClient(NULL);
AuraTestBase::TearDown();
}
diff --git a/ui/wm/core/user_activity_detector.h b/ui/wm/core/user_activity_detector.h
index 851f07a..7e5db9f 100644
--- a/ui/wm/core/user_activity_detector.h
+++ b/ui/wm/core/user_activity_detector.h
@@ -41,11 +41,11 @@
void OnDisplayPowerChanging();
// ui::EventHandler implementation.
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override;
+ virtual void OnGestureEvent(ui::GestureEvent* event) override;
private:
// Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise.
diff --git a/ui/wm/core/user_activity_detector_unittest.cc b/ui/wm/core/user_activity_detector_unittest.cc
index 620ab0c..0273093 100644
--- a/ui/wm/core/user_activity_detector_unittest.cc
+++ b/ui/wm/core/user_activity_detector_unittest.cc
@@ -26,7 +26,7 @@
void reset_stats() { num_invocations_ = 0; }
// UserActivityObserver implementation.
- virtual void OnUserActivity(const ui::Event* event) OVERRIDE {
+ virtual void OnUserActivity(const ui::Event* event) override {
num_invocations_++;
}
@@ -42,7 +42,7 @@
UserActivityDetectorTest() {}
virtual ~UserActivityDetectorTest() {}
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
AuraTestBase::SetUp();
observer_.reset(new TestUserActivityObserver);
detector_.reset(new UserActivityDetector);
@@ -52,7 +52,7 @@
detector_->set_now_for_test(now_);
}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
detector_->RemoveObserver(observer_.get());
AuraTestBase::TearDown();
}
diff --git a/ui/wm/core/visibility_controller.h b/ui/wm/core/visibility_controller.h
index 47ae991..d29a6da 100644
--- a/ui/wm/core/visibility_controller.h
+++ b/ui/wm/core/visibility_controller.h
@@ -29,7 +29,7 @@
private:
// Overridden from aura::client::VisibilityClient:
virtual void UpdateLayerVisibility(aura::Window* window,
- bool visible) OVERRIDE;
+ bool visible) override;
DISALLOW_COPY_AND_ASSIGN(VisibilityController);
};
diff --git a/ui/wm/core/window_animations.cc b/ui/wm/core/window_animations.cc
index 8284990..746ea48 100644
--- a/ui/wm/core/window_animations.cc
+++ b/ui/wm/core/window_animations.cc
@@ -69,12 +69,12 @@
}
// aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroying(aura::Window* window) override {
DCHECK_EQ(window, window_);
WindowInvalid();
}
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
+ virtual void OnWindowDestroyed(aura::Window* window) override {
DCHECK_EQ(window, window_);
WindowInvalid();
}
@@ -168,7 +168,7 @@
virtual ~ImplicitHidingWindowAnimationObserver() {}
// ui::ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
+ virtual void OnImplicitAnimationsCompleted() override;
private:
DISALLOW_COPY_AND_ASSIGN(ImplicitHidingWindowAnimationObserver);
@@ -410,15 +410,15 @@
// ui::LayerAnimationObserver:
virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
+ ui::LayerAnimationSequence* sequence) override {
OnAnimationCompleted();
}
virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
+ ui::LayerAnimationSequence* sequence) override {
OnAnimationCompleted();
}
virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {}
+ ui::LayerAnimationSequence* sequence) override {}
private:
DISALLOW_COPY_AND_ASSIGN(RotateHidingWindowAnimationObserver);
diff --git a/ui/wm/core/window_animations_unittest.cc b/ui/wm/core/window_animations_unittest.cc
index 0a9a944..b1db736 100644
--- a/ui/wm/core/window_animations_unittest.cc
+++ b/ui/wm/core/window_animations_unittest.cc
@@ -47,7 +47,7 @@
public:
WindowAnimationsTest() {}
- virtual void TearDown() OVERRIDE {
+ virtual void TearDown() override {
AuraTestBase::TearDown();
}
@@ -258,13 +258,13 @@
virtual ~NotifyHideCompletedAnimationHost() {}
// Overridden from TestWindowDelegate:
- virtual void OnWindowHidingAnimationCompleted() OVERRIDE {
+ virtual void OnWindowHidingAnimationCompleted() override {
hide_completed_ = true;
}
virtual void SetHostTransitionOffsets(
const gfx::Vector2d& top_left,
- const gfx::Vector2d& bottom_right) OVERRIDE {}
+ const gfx::Vector2d& bottom_right) override {}
bool hide_completed() const { return hide_completed_; }
diff --git a/ui/wm/core/window_modality_controller.h b/ui/wm/core/window_modality_controller.h
index 4d52c21..33386ce 100644
--- a/ui/wm/core/window_modality_controller.h
+++ b/ui/wm/core/window_modality_controller.h
@@ -38,20 +38,20 @@
virtual ~WindowModalityController();
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
+ virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ virtual void OnMouseEvent(ui::MouseEvent* event) override;
+ virtual void OnTouchEvent(ui::TouchEvent* event) override;
// Overridden from aura::EnvObserver:
- virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
+ virtual void OnWindowInitialized(aura::Window* window) override;
// Overridden from aura::WindowObserver:
virtual void OnWindowPropertyChanged(aura::Window* window,
const void* key,
- intptr_t old) OVERRIDE;
+ intptr_t old) override;
virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ bool visible) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
private:
// Processes a mouse/touch event, and returns true if the event should be
diff --git a/ui/wm/public/scoped_tooltip_disabler.h b/ui/wm/public/scoped_tooltip_disabler.h
index 0fd3e11..1022788 100644
--- a/ui/wm/public/scoped_tooltip_disabler.h
+++ b/ui/wm/public/scoped_tooltip_disabler.h
@@ -24,7 +24,7 @@
void EnableTooltips();
// aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) override;
// The RootWindow to disable Tooltips on; NULL if the Window passed to the
// constructor was not in a root or the root has been destroyed.
diff --git a/ui/wm/test/run_all_unittests.cc b/ui/wm/test/run_all_unittests.cc
index 6e04469..a0ac59d 100644
--- a/ui/wm/test/run_all_unittests.cc
+++ b/ui/wm/test/run_all_unittests.cc
@@ -18,7 +18,7 @@
WMTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
base::TestSuite::Initialize();
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
@@ -28,7 +28,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() OVERRIDE {
+ virtual void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h
index 79e15ff..990b478 100644
--- a/ui/wm/test/wm_test_helper.h
+++ b/ui/wm/test/wm_test_helper.h
@@ -47,7 +47,7 @@
// Overridden from client::WindowTreeClient:
virtual aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
- const gfx::Rect& bounds) OVERRIDE;
+ const gfx::Rect& bounds) override;
private:
scoped_ptr<aura::WindowTreeHost> host_;