Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / views / controls / menu / menu_scroll_view_container.cc
index dfb9ef3..a69b6f0 100644 (file)
@@ -40,37 +40,37 @@ class MenuScrollButton : public View {
         pref_height_(MenuItemView::pref_menu_height()) {
   }
 
-  virtual gfx::Size GetPreferredSize() OVERRIDE {
+  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 {
+  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 {
+  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 {
+  int OnDragUpdated(const ui::DropTargetEvent& event) override {
     return ui::DragDropTypes::DRAG_NONE;
   }
 
-  virtual void OnDragExited() OVERRIDE {
+  void OnDragExited() override {
     DCHECK(host_->GetMenuItem()->GetMenuController());
     host_->GetMenuItem()->GetMenuController()->OnDragExitedScrollButton(host_);
   }
 
-  virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE {
+  int OnPerformDrop(const ui::DropTargetEvent& event) override {
     return ui::DragDropTypes::DRAG_NONE;
   }
 
-  virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+  void OnPaint(gfx::Canvas* canvas) override {
     const MenuConfig& config = host_->GetMenuItem()->GetMenuConfig();
 
     // The background.
@@ -139,7 +139,7 @@ class MenuScrollViewContainer::MenuScrollView : public View {
     AddChildView(child);
   }
 
-  virtual void ScrollRectToVisible(const gfx::Rect& rect) OVERRIDE {
+  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.
@@ -243,7 +243,7 @@ void MenuScrollViewContainer::Layout() {
   scroll_view_->Layout();
 }
 
-gfx::Size MenuScrollViewContainer::GetPreferredSize() {
+gfx::Size MenuScrollViewContainer::GetPreferredSize() const {
   gfx::Size prefsize = scroll_view_->GetContents()->GetPreferredSize();
   gfx::Insets insets = GetInsets();
   prefsize.Enlarge(insets.width(), insets.height());
@@ -281,12 +281,14 @@ void MenuScrollViewContainer::CreateDefaultBorder() {
   int padding = menu_config.corner_radius > 0 ?
         kBorderPaddingDueToRoundedCorners : 0;
 
+#if defined(USE_AURA) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
   if (menu_config.native_theme == ui::NativeThemeAura::instance()) {
     // In case of NativeThemeAura the border gets drawn with the shadow.
     // Furthermore no additional padding is wanted.
     use_border = false;
     padding = 0;
   }
+#endif
 
   int top = menu_config.menu_vertical_border_size + padding;
   int left = menu_config.menu_horizontal_border_size + padding;
@@ -313,17 +315,16 @@ void MenuScrollViewContainer::CreateBubbleBorder() {
   set_background(new BubbleBackground(bubble_border_));
 }
 
-BubbleBorder::Arrow
-MenuScrollViewContainer::BubbleBorderTypeFromAnchor(
-    MenuItemView::AnchorPosition anchor) {
+BubbleBorder::Arrow MenuScrollViewContainer::BubbleBorderTypeFromAnchor(
+    MenuAnchorPosition anchor) {
   switch (anchor) {
-    case views::MenuItemView::BUBBLE_LEFT:
+    case MENU_ANCHOR_BUBBLE_LEFT:
       return BubbleBorder::RIGHT_CENTER;
-    case views::MenuItemView::BUBBLE_RIGHT:
+    case MENU_ANCHOR_BUBBLE_RIGHT:
       return BubbleBorder::LEFT_CENTER;
-    case views::MenuItemView::BUBBLE_ABOVE:
+    case MENU_ANCHOR_BUBBLE_ABOVE:
       return BubbleBorder::BOTTOM_CENTER;
-    case views::MenuItemView::BUBBLE_BELOW:
+    case MENU_ANCHOR_BUBBLE_BELOW:
       return BubbleBorder::TOP_CENTER;
     default:
       return BubbleBorder::NONE;