Aura: Update window frames, allow resize from outside window

* New window frames, still behind a flag as there's more refinement to do for incognito, popups, and maximized windows.
* Translucent frames now only require a single layer the size of the window instead of two.  We may be able to cut the layer size in the future to the area of the window header + toolbar
* Rewrite BrowserNonClientFrameViewAura
* Use updated art assets from crrev.com/124602
* Allow windows optionally to specify that hit tests should include a region a few pixels outside the window. For Aura browser windows this area acts as non-client area resize handles which we need because the window frame borders are now very thin or not present at all.

BUG=113075
TEST=manual, visual inspection of browser active, inactive, incognito, popup, hosted, and app windows.  Updated aura_unittest for Window to check the expanded bounds.

Review URL: https://chromiumcodereview.appspot.com/9580001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124743 0039d316-1c4b-4281-b951-d872f2087c98
parent 3970c423
...@@ -26,10 +26,6 @@ namespace internal { ...@@ -26,10 +26,6 @@ namespace internal {
namespace { namespace {
ShadowType GetShadowTypeFromWindow(aura::Window* window) { ShadowType GetShadowTypeFromWindow(aura::Window* window) {
// No shadow for transparent window.
if (window->transparent())
return SHADOW_TYPE_NONE;
switch (window->type()) { switch (window->type()) {
case aura::client::WINDOW_TYPE_NORMAL: case aura::client::WINDOW_TYPE_NORMAL:
case aura::client::WINDOW_TYPE_PANEL: case aura::client::WINDOW_TYPE_PANEL:
......
...@@ -72,79 +72,23 @@ void ToolbarBackground::Paint(gfx::Canvas* canvas, views::View* view) const { ...@@ -72,79 +72,23 @@ void ToolbarBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
SkBitmap* toolbar_left = tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER); SkBitmap* toolbar_left = tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER);
int bottom_edge_height = std::min(toolbar_left->height(), h) - split_point; int bottom_edge_height = std::min(toolbar_left->height(), h) - split_point;
// Split our canvas out so we can mask out the corners of the toolbar
// without masking out the frame.
canvas->SaveLayerAlpha(
255, gfx::Rect(x - views::NonClientFrameView::kClientEdgeThickness,
y,
w + views::NonClientFrameView::kClientEdgeThickness * 3,
h));
canvas->GetSkCanvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
canvas->FillRect(gfx::Rect(x, bottom_y, w, bottom_edge_height), canvas->FillRect(gfx::Rect(x, bottom_y, w, bottom_edge_height),
tp->GetColor(ThemeService::COLOR_TOOLBAR)); tp->GetColor(ThemeService::COLOR_TOOLBAR));
// Tile the toolbar image starting at the frame edge on the left and where the // Tile the toolbar image starting at the frame edge on the left and where the
// horizontal tabstrip is (or would be) on the top. // horizontal tabstrip is (or would be) on the top.
SkBitmap* theme_toolbar = tp->GetBitmapNamed(IDR_THEME_TOOLBAR); SkBitmap* theme_toolbar = tp->GetBitmapNamed(IDR_THEME_TOOLBAR);
canvas->TileImageInt(*theme_toolbar, x, canvas->TileImageInt(*theme_toolbar,
bottom_y, x, x, bottom_y,
bottom_y, w, theme_toolbar->height()); x, bottom_y,
w, theme_toolbar->height());
// Draw rounded corners for the tab.
SkBitmap* toolbar_left_mask =
tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER_MASK);
SkBitmap* toolbar_right_mask =
tp->GetBitmapNamed(IDR_CONTENT_TOP_RIGHT_CORNER_MASK);
// We mask out the corners by using the DestinationIn transfer mode,
// which keeps the RGB pixels from the destination and the alpha from
// the source.
SkPaint paint;
paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
// Mask the left edge.
int left_x = x - kContentEdgeShadowThickness;
canvas->DrawBitmapInt(*toolbar_left_mask, 0, 0, toolbar_left_mask->width(),
split_point, left_x, y, toolbar_left_mask->width(),
split_point, false, paint);
canvas->DrawBitmapInt(*toolbar_left_mask, 0,
toolbar_left_mask->height() - bottom_edge_height,
toolbar_left_mask->width(), bottom_edge_height, left_x, bottom_y,
toolbar_left_mask->width(), bottom_edge_height, false, paint);
// Mask the right edge.
int right_x =
x + w - toolbar_right_mask->width() + kContentEdgeShadowThickness;
canvas->DrawBitmapInt(*toolbar_right_mask, 0, 0, toolbar_right_mask->width(),
split_point, right_x, y, toolbar_right_mask->width(),
split_point, false, paint);
canvas->DrawBitmapInt(*toolbar_right_mask, 0,
toolbar_right_mask->height() - bottom_edge_height,
toolbar_right_mask->width(), bottom_edge_height, right_x, bottom_y,
toolbar_right_mask->width(), bottom_edge_height, false, paint);
canvas->Restore();
canvas->DrawBitmapInt(*toolbar_left, 0, 0, toolbar_left->width(), split_point,
left_x, y, toolbar_left->width(), split_point, false);
canvas->DrawBitmapInt(*toolbar_left, 0,
toolbar_left->height() - bottom_edge_height, toolbar_left->width(),
bottom_edge_height, left_x, bottom_y, toolbar_left->width(),
bottom_edge_height, false);
SkBitmap* toolbar_center = SkBitmap* toolbar_center =
tp->GetBitmapNamed(IDR_CONTENT_TOP_CENTER); tp->GetBitmapNamed(IDR_CONTENT_TOP_CENTER);
canvas->TileImageInt(*toolbar_center, 0, 0, left_x + toolbar_left->width(), canvas->TileImageInt(*toolbar_center,
y, right_x - (left_x + toolbar_left->width()), 0, 0,
split_point); x, y,
w, split_point);
SkBitmap* toolbar_right = tp->GetBitmapNamed(IDR_CONTENT_TOP_RIGHT_CORNER);
canvas->DrawBitmapInt(*toolbar_right, 0, 0, toolbar_right->width(),
split_point, right_x, y, toolbar_right->width(), split_point, false);
canvas->DrawBitmapInt(*toolbar_right, 0,
toolbar_right->height() - bottom_edge_height, toolbar_right->width(),
bottom_edge_height, right_x, bottom_y, toolbar_right->width(),
bottom_edge_height, false);
// Draw the content/toolbar separator. // Draw the content/toolbar separator.
canvas->FillRect(gfx::Rect( canvas->FillRect(gfx::Rect(
...@@ -270,10 +214,6 @@ BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, ...@@ -270,10 +214,6 @@ BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame,
window_property_watcher_(new WindowPropertyWatcher(this, browser_frame)) { window_property_watcher_(new WindowPropertyWatcher(this, browser_frame)) {
CommandLine* command_line = CommandLine::ForCurrentProcess(); CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) { if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) {
// Aura paints layers behind this view, so this must be a layer also.
// TODO: see if we can avoid this, layers are expensive.
browser_view_->SetPaintToLayer(true);
browser_view_->layer()->SetFillsBoundsOpaquely(false);
// Background only needed for Aura-style windows. // Background only needed for Aura-style windows.
browser_view_->set_background(new ToolbarBackground(browser_view)); browser_view_->set_background(new ToolbarBackground(browser_view));
} }
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -6,43 +6,24 @@ ...@@ -6,43 +6,24 @@
#define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_
#pragma once #pragma once
#include "ash/wm/window_frame.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "ui/views/controls/button/button.h" #include "chrome/browser/ui/views/tab_icon_view.h"
#include "ui/views/widget/widget.h" #include "ui/views/controls/button/button.h" // ButtonListener
class BrowserFrame; namespace views {
class BrowserView; class FrameBackground;
class FrameBackgroundView; class ImageButton;
class WindowControlButton; }
class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView, class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView,
public views::ButtonListener, public views::ButtonListener,
public views::Widget::Observer, public TabIconView::TabIconViewModel {
public ash::WindowFrame {
public: public:
BrowserNonClientFrameViewAura(BrowserFrame* frame, BrowserView* browser_view); BrowserNonClientFrameViewAura(BrowserFrame* frame, BrowserView* browser_view);
virtual ~BrowserNonClientFrameViewAura(); virtual ~BrowserNonClientFrameViewAura();
// Control the slide-in animation of the frame background. void Init();
void ShowFrameBackground();
void HideFrameBackground();
private:
// Returns a HitTest code.
int NonClientHitTestImpl(const gfx::Point& point);
// Returns the target rectangle for the frame background, based on a mouse
// position from |hittest_code| and the window's active/inactive state.
// Pass HTNOWHERE to get default bounds.
gfx::Rect GetFrameBackgroundBounds(int hittest_code, bool active_window);
// Recomputes the bounds of the semi-transparent frame background.
void UpdateFrameBackground(bool active_window);
// Invoked when the active state changes.
void ActiveStateChanged();
// BrowserNonClientFrameView overrides: // BrowserNonClientFrameView overrides:
virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
...@@ -58,32 +39,57 @@ class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView, ...@@ -58,32 +39,57 @@ class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView,
gfx::Path* window_mask) OVERRIDE; gfx::Path* window_mask) OVERRIDE;
virtual void ResetWindowControls() OVERRIDE; virtual void ResetWindowControls() OVERRIDE;
virtual void UpdateWindowIcon() OVERRIDE; virtual void UpdateWindowIcon() OVERRIDE;
virtual void ShouldPaintAsActiveChanged() OVERRIDE;
// views::View overrides: // views::View overrides:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void Layout() OVERRIDE; virtual void Layout() OVERRIDE;
virtual views::View* GetEventHandlerForPoint( virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
const gfx::Point& point) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
virtual bool HitTest(const gfx::Point& p) const OVERRIDE;
virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE;
virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE;
// views::ButtonListener overrides: // views::ButtonListener overrides:
virtual void ButtonPressed(views::Button* sender, virtual void ButtonPressed(views::Button* sender,
const views::Event& event) OVERRIDE; const views::Event& event) OVERRIDE;
// views::Widget::Observer overrides: // Overridden from TabIconView::TabIconViewModel:
virtual void OnWidgetActivationChanged(views::Widget* widget, virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
bool active) OVERRIDE; virtual SkBitmap GetFaviconForTabIconView() OVERRIDE;
// ash::WindowFrame overrides:
virtual void OnWindowHoverChanged(bool hovered) OVERRIDE;
int last_hittest_code_; private:
WindowControlButton* maximize_button_; // Sets the images for a button base on IDs from the frame's theme provider.
WindowControlButton* close_button_; void SetButtonImages(views::ImageButton* button,
FrameBackgroundView* frame_background_; int normal_bitmap_id,
int hot_bitmap_id,
int pushed_bitmap_id);
// Distance between top of window and client area.
int NonClientTopBorderHeight(bool restored) const;
void PaintHeader(gfx::Canvas* canvas);
void PaintTitleBar(gfx::Canvas* canvas);
// Returns the correct bitmap for the frame header based on activation state
// and incognito mode.
SkBitmap* GetThemeFrameBitmap() const;
SkBitmap* GetThemeFrameOverlayBitmap() const;
// Returns the theme image bitmap for |bitmap_id| if the user has a custom
// theme image, or the bitmap for |fallback_bitmap_id| if not.
SkBitmap* GetCustomBitmap(int bitmap_id, int fallback_bitmap_id) const;
// Window controls.
views::ImageButton* maximize_button_;
views::ImageButton* close_button_;
// For popups, the window icon.
TabIconView* window_icon_;
// Window frame header/caption parts.
SkBitmap* button_separator_;
SkBitmap* top_left_corner_;
SkBitmap* top_edge_;
SkBitmap* top_right_corner_;
SkBitmap* header_left_edge_;
SkBitmap* header_right_edge_;
DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura); DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura);
}; };
......
...@@ -27,14 +27,18 @@ BrowserNonClientFrameView* CreateBrowserNonClientFrameView( ...@@ -27,14 +27,18 @@ BrowserNonClientFrameView* CreateBrowserNonClientFrameView(
if (ash::Shell::GetInstance()->IsWindowModeCompact()) if (ash::Shell::GetInstance()->IsWindowModeCompact())
return new CompactBrowserFrameView(frame, browser_view); return new CompactBrowserFrameView(frame, browser_view);
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames))
return new BrowserNonClientFrameViewAura(frame, browser_view);
// If this is an app window and it's maximized, use the special frame_view. // If this is an app window and it's maximized, use the special frame_view.
if (browser_view->browser()->is_app() && browser_view->IsMaximized()) if (browser_view->browser()->is_app() && browser_view->IsMaximized())
return new AppNonClientFrameViewAura(frame, browser_view); return new AppNonClientFrameViewAura(frame, browser_view);
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) {
BrowserNonClientFrameViewAura* frame_view =
new BrowserNonClientFrameViewAura(frame, browser_view);
frame_view->Init();
return frame_view;
}
return new OpaqueBrowserFrameView(frame, browser_view); return new OpaqueBrowserFrameView(frame, browser_view);
} }
......
...@@ -54,7 +54,8 @@ Window::Window(WindowDelegate* delegate) ...@@ -54,7 +54,8 @@ Window::Window(WindowDelegate* delegate)
transparent_(false), transparent_(false),
user_data_(NULL), user_data_(NULL),
stops_event_propagation_(false), stops_event_propagation_(false),
ignore_events_(false) { ignore_events_(false),
hit_test_bounds_inset_(0) {
} }
Window::~Window() { Window::~Window() {
...@@ -401,8 +402,10 @@ bool Window::ContainsPoint(const gfx::Point& local_point) { ...@@ -401,8 +402,10 @@ bool Window::ContainsPoint(const gfx::Point& local_point) {
} }
bool Window::HitTest(const gfx::Point& local_point) { bool Window::HitTest(const gfx::Point& local_point) {
gfx::Rect local_bounds(gfx::Point(), bounds().size());
local_bounds.Inset(hit_test_bounds_inset_, hit_test_bounds_inset_);
// TODO(beng): hittest masks. // TODO(beng): hittest masks.
return ContainsPoint(local_point); return local_bounds.Contains(local_point);
} }
Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) { Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) {
......
...@@ -225,6 +225,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate { ...@@ -225,6 +225,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; } void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; }
// When non-zero insets the window's bounds by |inset| when performing hit
// tests for event handling. Pass a negative value for |inset| to respond to
// events that occur slightly outside a window's bounds.
void set_hit_test_bounds_inset(int inset) { hit_test_bounds_inset_ = inset; }
int hit_test_bounds_inset() const { return hit_test_bounds_inset_; }
// Returns true if the |point_in_root| in root window's coordinate falls // Returns true if the |point_in_root| in root window's coordinate falls
// within this window's bounds. Returns false if the window is detached // within this window's bounds. Returns false if the window is detached
// from root window. // from root window.
...@@ -411,6 +417,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate { ...@@ -411,6 +417,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Makes the window pass all events through to any windows behind it. // Makes the window pass all events through to any windows behind it.
bool ignore_events_; bool ignore_events_;
// Inset the window bounds by this amount when doing hit testing for events.
int hit_test_bounds_inset_;
ObserverList<WindowObserver> observers_; ObserverList<WindowObserver> observers_;
std::map<const void*, intptr_t> prop_map_; std::map<const void*, intptr_t> prop_map_;
......
...@@ -273,7 +273,7 @@ TEST_F(WindowTest, HitTest) { ...@@ -273,7 +273,7 @@ TEST_F(WindowTest, HitTest) {
Window w1(new ColorTestWindowDelegate(SK_ColorWHITE)); Window w1(new ColorTestWindowDelegate(SK_ColorWHITE));
w1.set_id(1); w1.set_id(1);
w1.Init(ui::Layer::LAYER_TEXTURED); w1.Init(ui::Layer::LAYER_TEXTURED);
w1.SetBounds(gfx::Rect(10, 10, 50, 50)); w1.SetBounds(gfx::Rect(10, 20, 50, 60));
w1.Show(); w1.Show();
w1.SetParent(NULL); w1.SetParent(NULL);
...@@ -281,6 +281,11 @@ TEST_F(WindowTest, HitTest) { ...@@ -281,6 +281,11 @@ TEST_F(WindowTest, HitTest) {
EXPECT_TRUE(w1.HitTest(gfx::Point(1, 1))); EXPECT_TRUE(w1.HitTest(gfx::Point(1, 1)));
EXPECT_FALSE(w1.HitTest(gfx::Point(-1, -1))); EXPECT_FALSE(w1.HitTest(gfx::Point(-1, -1)));
// We can expand the bounds slightly to track events outside our border.
w1.set_hit_test_bounds_inset(-1);
EXPECT_TRUE(w1.HitTest(gfx::Point(-1, -1)));
EXPECT_FALSE(w1.HitTest(gfx::Point(-2, -2)));
// TODO(beng): clip Window to parent. // TODO(beng): clip Window to parent.
} }
......
...@@ -48,6 +48,8 @@ void PrintLayerHierarchyImp(const Layer* layer, int indent, ...@@ -48,6 +48,8 @@ void PrintLayerHierarchyImp(const Layer* layer, int indent,
break; break;
case Layer::LAYER_TEXTURED: case Layer::LAYER_TEXTURED:
buf << L" textured"; buf << L" textured";
if (layer->fills_bounds_opaquely())
buf << L" opaque";
break; break;
case Layer::LAYER_SOLID_COLOR: case Layer::LAYER_SOLID_COLOR:
buf << L" solid"; buf << L" solid";
......
...@@ -196,13 +196,42 @@ ...@@ -196,13 +196,42 @@
<include name="IDR_AURA_WALLPAPER_8_THUMB" file="aura/wallpaper_8_thumb.jpg" type="BINDATA" /> <include name="IDR_AURA_WALLPAPER_8_THUMB" file="aura/wallpaper_8_thumb.jpg" type="BINDATA" />
<include name="IDR_AURA_WALLPAPER_9" file="aura/wallpaper_9.jpg" type="BINDATA" /> <include name="IDR_AURA_WALLPAPER_9" file="aura/wallpaper_9.jpg" type="BINDATA" />
<include name="IDR_AURA_WALLPAPER_9_THUMB" file="aura/wallpaper_9_thumb.jpg" type="BINDATA" /> <include name="IDR_AURA_WALLPAPER_9_THUMB" file="aura/wallpaper_9_thumb.jpg" type="BINDATA" />
<!-- TODO(jamescook): Delete these two corners if we ship translucent frames on all platforms. -->
<include name="IDR_AURA_WINDOW_BOTTOM_LEFT" file="aura/window_bottom_left.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_BOTTOM_LEFT" file="aura/window_bottom_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_BOTTOM_RIGHT" file="aura/window_bottom_right.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_BOTTOM_RIGHT" file="aura/window_bottom_right.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_BUTTON_SEPARATOR" file="aura/window_button_separator.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_CLOSE_ICON" file="aura/slab_close.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_CLOSE_ICON" file="aura/slab_close.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_CLOSE" file="aura/window_close_normal.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_CLOSE_H" file="aura/window_close_hot.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_CLOSE_P" file="aura/window_close_pressed.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_FULLSCREEN_CLOSE" file="aura/window_fullscreen_close.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_FULLSCREEN_CLOSE" file="aura/window_fullscreen_close.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_FULLSCREEN_RESTORE" file="aura/window_fullscreen_restore.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_FULLSCREEN_RESTORE" file="aura/window_fullscreen_restore.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_FULLSCREEN_SEPARATOR" file="aura/window_fullscreen_separator.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_FULLSCREEN_SEPARATOR" file="aura/window_fullscreen_separator.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_FULLSCREEN_SHADOW" file="aura/window_fullscreen_shadow.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_FULLSCREEN_SHADOW" file="aura/window_fullscreen_shadow.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_BASE_ACTIVE" file="aura/window_header_base_active.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_BASE_INACTIVE" file="aura/window_header_base_inactive.png" type="BINDATA" />
<!-- TODO(jamescook): We need updated incognito art for Aura. -->
<include name="IDR_AURA_WINDOW_HEADER_BASE_INCOGNITO_ACTIVE" file="aura/window_header_base_incognito_active.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_BASE_INCOGNITO_INACTIVE" file="aura/window_header_base_incognito_inactive.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_BOTTOM" file="aura/window_header_shade_bottom.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_BOTTOM_LEFT" file="aura/window_header_shade_bottom_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_BOTTOM_RIGHT" file="aura/window_header_shade_bottom_right.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_LEFT" file="aura/window_header_shade_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_MIDDLE" file="aura/window_header_shade_middle.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_RIGHT" file="aura/window_header_shade_right.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_TOP" file="aura/window_header_shade_top.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_TOP_LEFT" file="aura/window_header_shade_top_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_HEADER_SHADE_TOP_RIGHT" file="aura/window_header_shade_top_right.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZE" file="aura/window_maximize_normal.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZE_H" file="aura/window_maximize_hot.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZE_P" file="aura/window_maximize_pressed.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE" file="aura/window_maximized_close_normal.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H" file="aura/window_maximized_close_hot.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P" file="aura/window_maximized_close_pressed.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE" file="aura/window_maximized_restore_normal.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H" file="aura/window_maximized_restore_hot.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P" file="aura/window_maximized_restore_pressed.png" type="BINDATA" />
<!-- TODO(jamescook): Delete these two corners if we ship translucent frames on all platforms. -->
<include name="IDR_AURA_WINDOW_TOP_LEFT" file="aura/window_top_left.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_TOP_LEFT" file="aura/window_top_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_TOP_RIGHT" file="aura/window_top_right.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_TOP_RIGHT" file="aura/window_top_right.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_ZOOM_ICON" file="aura/slab_zoom.png" type="BINDATA" /> <include name="IDR_AURA_WINDOW_ZOOM_ICON" file="aura/slab_zoom.png" type="BINDATA" />
......
...@@ -305,7 +305,11 @@ void RootView::OnMouseMoved(const MouseEvent& event) { ...@@ -305,7 +305,11 @@ void RootView::OnMouseMoved(const MouseEvent& event) {
widget_->SetCursor(mouse_move_handler_->GetCursor(moved_event)); widget_->SetCursor(mouse_move_handler_->GetCursor(moved_event));
} else if (mouse_move_handler_ != NULL) { } else if (mouse_move_handler_ != NULL) {
mouse_move_handler_->OnMouseExited(e); mouse_move_handler_->OnMouseExited(e);
widget_->SetCursor(gfx::kNullCursor); // On Aura the non-client area extends slightly outside the root view for
// some windows. Let the non-client cursor handling code set the cursor
// as we do above.
if (!(e.flags() & ui::EF_IS_NON_CLIENT))
widget_->SetCursor(gfx::kNullCursor);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment