Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Side by Side Diff: chrome/browser/ui/views/panels/panel_frame_view.cc

Issue 27458002: Allow setting different hit test bounds overrides for mouse and touch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/panels/panel_frame_view.h" 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h"
6 6
7 #include "chrome/browser/ui/panels/panel.h" 7 #include "chrome/browser/ui/panels/panel.h"
8 #include "chrome/browser/ui/panels/panel_constants.h" 8 #include "chrome/browser/ui/panels/panel_constants.h"
9 #include "chrome/browser/ui/views/panels/panel_view.h" 9 #include "chrome/browser/ui/views/panels/panel_view.h"
10 #include "chrome/browser/ui/views/tab_icon_view.h" 10 #include "chrome/browser/ui/views/tab_icon_view.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 title_label_->SetAutoColorReadabilityEnabled(false); 317 title_label_->SetAutoColorReadabilityEnabled(false);
318 title_label_->SetFont(GetTitleFont()); 318 title_label_->SetFont(GetTitleFont());
319 AddChildView(title_label_); 319 AddChildView(title_label_);
320 320
321 #if defined(USE_AURA) 321 #if defined(USE_AURA)
322 // Compute the thickness of the client area that needs to be counted towards 322 // Compute the thickness of the client area that needs to be counted towards
323 // mouse resizing. 323 // mouse resizing.
324 int thickness_for_mouse_resizing = 324 int thickness_for_mouse_resizing =
325 PanelView::kResizeInsideBoundsSize - BorderThickness(); 325 PanelView::kResizeInsideBoundsSize - BorderThickness();
326 aura::Window* window = panel_view_->GetNativePanelWindow(); 326 aura::Window* window = panel_view_->GetNativePanelWindow();
327 window->set_hit_test_bounds_override_inner( 327 gfx::Insets inner_insets(thickness_for_mouse_resizing,
328 gfx::Insets(thickness_for_mouse_resizing, thickness_for_mouse_resizing, 328 thickness_for_mouse_resizing,
329 thickness_for_mouse_resizing, thickness_for_mouse_resizing)); 329 thickness_for_mouse_resizing,
330 thickness_for_mouse_resizing);
331 window->SetHitTestBoundsOverrideInner(inner_insets, inner_insets);
330 #endif 332 #endif
331 } 333 }
332 334
333 void PanelFrameView::UpdateTitle() { 335 void PanelFrameView::UpdateTitle() {
334 UpdateWindowTitle(); 336 UpdateWindowTitle();
335 } 337 }
336 338
337 void PanelFrameView::UpdateIcon() { 339 void PanelFrameView::UpdateIcon() {
338 UpdateWindowIcon(); 340 UpdateWindowIcon();
339 } 341 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 763
762 // Draw the left border. 764 // Draw the left border.
763 canvas->TileImageInt(left_image, 765 canvas->TileImageInt(left_image,
764 0, 766 0,
765 top_left_image.height(), 767 top_left_image.height(),
766 left_image.width(), 768 left_image.width(),
767 height() - top_left_image.height() - 769 height() - top_left_image.height() -
768 bottom_left_image.height()); 770 bottom_left_image.height());
769 #endif 771 #endif
770 } 772 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698