Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/frame/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/frame/caption_buttons/frame_caption_button.h" | |
| 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 11 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
| 11 #include "ash/frame/default_header_painter.h" | 12 #include "ash/frame/default_header_painter.h" |
| 12 #include "ash/frame/frame_border_hit_test_controller.h" | 13 #include "ash/frame/frame_border_hit_test_controller.h" |
| 13 #include "ash/frame/header_painter_util.h" | 14 #include "ash/frame/header_painter_util.h" |
| 14 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 15 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "chrome/app/chrome_command_ids.h" | |
| 16 #include "chrome/browser/themes/theme_properties.h" | 18 #include "chrome/browser/themes/theme_properties.h" |
| 17 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/browser/ui/browser_commands.h" | |
| 18 #include "chrome/browser/ui/views/frame/browser_frame.h" | 21 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 19 #include "chrome/browser/ui/views/frame/browser_header_painter_ash.h" | 22 #include "chrome/browser/ui/views/frame/browser_header_painter_ash.h" |
| 20 #include "chrome/browser/ui/views/frame/browser_view.h" | 23 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 21 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 24 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 25 #include "chrome/browser/ui/views/frame/webapp_header_painter_ash.h" | |
| 22 #include "chrome/browser/ui/views/profiles/avatar_label.h" | 26 #include "chrome/browser/ui/views/profiles/avatar_label.h" |
| 23 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" | 27 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" |
| 24 #include "chrome/browser/ui/views/tab_icon_view.h" | 28 #include "chrome/browser/ui/views/tab_icon_view.h" |
| 25 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 29 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 26 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 27 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 28 #include "grit/ash_resources.h" | 32 #include "grit/ash_resources.h" |
| 29 #include "grit/theme_resources.h" | 33 #include "grit/theme_resources.h" |
| 30 #include "ui/accessibility/ax_view_state.h" | 34 #include "ui/accessibility/ax_view_state.h" |
| 31 #include "ui/aura/client/aura_constants.h" | 35 #include "ui/aura/client/aura_constants.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // BrowserNonClientFrameViewAsh, public: | 80 // BrowserNonClientFrameViewAsh, public: |
| 77 | 81 |
| 78 // static | 82 // static |
| 79 const char BrowserNonClientFrameViewAsh::kViewClassName[] = | 83 const char BrowserNonClientFrameViewAsh::kViewClassName[] = |
| 80 "BrowserNonClientFrameViewAsh"; | 84 "BrowserNonClientFrameViewAsh"; |
| 81 | 85 |
| 82 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh( | 86 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh( |
| 83 BrowserFrame* frame, BrowserView* browser_view) | 87 BrowserFrame* frame, BrowserView* browser_view) |
| 84 : BrowserNonClientFrameView(frame, browser_view), | 88 : BrowserNonClientFrameView(frame, browser_view), |
| 85 caption_button_container_(NULL), | 89 caption_button_container_(NULL), |
| 90 webapp_back_button_(NULL), | |
| 86 window_icon_(NULL), | 91 window_icon_(NULL), |
| 87 frame_border_hit_test_controller_( | 92 frame_border_hit_test_controller_( |
| 88 new ash::FrameBorderHitTestController(frame)) { | 93 new ash::FrameBorderHitTestController(frame)) { |
| 89 ash::Shell::GetInstance()->AddShellObserver(this); | 94 ash::Shell::GetInstance()->AddShellObserver(this); |
| 90 } | 95 } |
| 91 | 96 |
| 92 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { | 97 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { |
| 93 ash::Shell::GetInstance()->RemoveShellObserver(this); | 98 ash::Shell::GetInstance()->RemoveShellObserver(this); |
| 99 chrome::RemoveCommandObserver(browser_view()->browser(), IDC_BACK, this); | |
| 94 } | 100 } |
| 95 | 101 |
| 96 void BrowserNonClientFrameViewAsh::Init() { | 102 void BrowserNonClientFrameViewAsh::Init() { |
| 97 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame(), | 103 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame(), |
| 98 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); | 104 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); |
| 99 caption_button_container_->UpdateSizeButtonVisibility(); | 105 caption_button_container_->UpdateSizeButtonVisibility(); |
| 100 AddChildView(caption_button_container_); | 106 AddChildView(caption_button_container_); |
| 101 | 107 |
| 102 // Initializing the TabIconView is expensive, so only do it if we need to. | 108 // Initializing the TabIconView is expensive, so only do it if we need to. |
| 103 if (browser_view()->ShouldShowWindowIcon()) { | 109 if (browser_view()->ShouldShowWindowIcon()) { |
| 104 window_icon_ = new TabIconView(this, NULL); | 110 window_icon_ = new TabIconView(this, NULL); |
| 105 window_icon_->set_is_light(true); | 111 window_icon_->set_is_light(true); |
| 106 AddChildView(window_icon_); | 112 AddChildView(window_icon_); |
| 107 window_icon_->Update(); | 113 window_icon_->Update(); |
| 108 } | 114 } |
| 109 | 115 |
| 110 // Create incognito icon if necessary. | 116 // Create incognito icon if necessary. |
| 111 UpdateAvatarInfo(); | 117 UpdateAvatarInfo(); |
| 112 | 118 |
| 113 // HeaderPainter handles layout. | 119 // HeaderPainter handles layout. |
| 114 if (UsePackagedAppHeaderStyle()) { | 120 if (UsePackagedAppHeaderStyle()) { |
| 115 ash::DefaultHeaderPainter* header_painter = new ash::DefaultHeaderPainter; | 121 ash::DefaultHeaderPainter* header_painter = new ash::DefaultHeaderPainter; |
| 116 header_painter_.reset(header_painter); | 122 header_painter_.reset(header_painter); |
| 117 header_painter->Init(frame(), this, window_icon_, | 123 header_painter->Init(frame(), this, window_icon_, |
| 118 caption_button_container_); | 124 caption_button_container_); |
| 125 } else if (UseWebAppHeaderStyle()) { | |
| 126 webapp_back_button_ = | |
| 127 new ash::FrameCaptionButton(this, ash::CAPTION_BUTTON_ICON_BACK); | |
| 128 UpdateBackButtonState(false); | |
| 129 chrome::AddCommandObserver(browser_view()->browser(), IDC_BACK, this); | |
| 130 AddChildView(webapp_back_button_); | |
| 131 | |
| 132 WebAppHeaderPainterAsh* header_painter = new WebAppHeaderPainterAsh; | |
| 133 header_painter_.reset(header_painter); | |
| 134 header_painter->Init(frame(), this, webapp_back_button_, | |
| 135 caption_button_container_); | |
| 119 } else { | 136 } else { |
| 120 BrowserHeaderPainterAsh* header_painter = new BrowserHeaderPainterAsh; | 137 BrowserHeaderPainterAsh* header_painter = new BrowserHeaderPainterAsh; |
| 121 header_painter_.reset(header_painter); | 138 header_painter_.reset(header_painter); |
| 122 header_painter->Init(frame(), browser_view(), this, window_icon_, | 139 header_painter->Init(frame(), browser_view(), this, window_icon_, |
| 123 caption_button_container_); | 140 caption_button_container_); |
| 124 } | 141 } |
| 125 } | 142 } |
| 126 | 143 |
| 127 /////////////////////////////////////////////////////////////////////////////// | 144 /////////////////////////////////////////////////////////////////////////////// |
| 128 // BrowserNonClientFrameView: | 145 // BrowserNonClientFrameView: |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 149 if (!ShouldPaint() || UseImmersiveLightbarHeaderStyle()) | 166 if (!ShouldPaint() || UseImmersiveLightbarHeaderStyle()) |
| 150 return 0; | 167 return 0; |
| 151 | 168 |
| 152 if (browser_view()->IsTabStripVisible()) { | 169 if (browser_view()->IsTabStripVisible()) { |
| 153 if (frame()->IsMaximized() || frame()->IsFullscreen()) | 170 if (frame()->IsMaximized() || frame()->IsFullscreen()) |
| 154 return kTabstripTopSpacingShort; | 171 return kTabstripTopSpacingShort; |
| 155 else | 172 else |
| 156 return kTabstripTopSpacingTall; | 173 return kTabstripTopSpacingTall; |
| 157 } | 174 } |
| 158 | 175 |
| 159 if (UsePackagedAppHeaderStyle()) | 176 if (UsePackagedAppHeaderStyle() || UseWebAppHeaderStyle()) |
| 160 return header_painter_->GetHeaderHeightForPainting(); | 177 return header_painter_->GetHeaderHeightForPainting(); |
| 161 | 178 |
| 162 int caption_buttons_bottom = caption_button_container_->bounds().bottom(); | 179 int caption_buttons_bottom = caption_button_container_->bounds().bottom(); |
| 163 | 180 |
| 164 // The toolbar partially overlaps the caption buttons. | 181 // The toolbar partially overlaps the caption buttons. |
| 165 if (browser_view()->IsToolbarVisible()) | 182 if (browser_view()->IsToolbarVisible()) |
| 166 return caption_buttons_bottom - kContentShadowHeight; | 183 return caption_buttons_bottom - kContentShadowHeight; |
| 167 | 184 |
| 168 return caption_buttons_bottom + kClientEdgeThickness; | 185 return caption_buttons_bottom + kClientEdgeThickness; |
| 169 } | 186 } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 199 int hit_test = ash::FrameBorderHitTestController::NonClientHitTest(this, | 216 int hit_test = ash::FrameBorderHitTestController::NonClientHitTest(this, |
| 200 caption_button_container_, point); | 217 caption_button_container_, point); |
| 201 | 218 |
| 202 // See if the point is actually within the avatar menu button or within | 219 // See if the point is actually within the avatar menu button or within |
| 203 // the avatar label. | 220 // the avatar label. |
| 204 if (hit_test == HTCAPTION && ((avatar_button() && | 221 if (hit_test == HTCAPTION && ((avatar_button() && |
| 205 avatar_button()->GetMirroredBounds().Contains(point)) || | 222 avatar_button()->GetMirroredBounds().Contains(point)) || |
| 206 (avatar_label() && avatar_label()->GetMirroredBounds().Contains(point)))) | 223 (avatar_label() && avatar_label()->GetMirroredBounds().Contains(point)))) |
| 207 return HTCLIENT; | 224 return HTCLIENT; |
| 208 | 225 |
| 226 if (hit_test == HTCAPTION && webapp_back_button_ && | |
| 227 webapp_back_button_->GetMirroredBounds().Contains(point)) | |
| 228 return HTCLIENT; | |
| 229 | |
| 209 // When the window is restored we want a large click target above the tabs | 230 // When the window is restored we want a large click target above the tabs |
| 210 // to drag the window, so redirect clicks in the tab's shadow to caption. | 231 // to drag the window, so redirect clicks in the tab's shadow to caption. |
| 211 if (hit_test == HTCLIENT && | 232 if (hit_test == HTCLIENT && |
| 212 !(frame()->IsMaximized() || frame()->IsFullscreen())) { | 233 !(frame()->IsMaximized() || frame()->IsFullscreen())) { |
| 213 // Convert point to client coordinates. | 234 // Convert point to client coordinates. |
| 214 gfx::Point client_point(point); | 235 gfx::Point client_point(point); |
| 215 View::ConvertPointToTarget(this, frame()->client_view(), &client_point); | 236 View::ConvertPointToTarget(this, frame()->client_view(), &client_point); |
| 216 // Report hits in shadow at top of tabstrip as caption. | 237 // Report hits in shadow at top of tabstrip as caption. |
| 217 gfx::Rect tabstrip_bounds(browser_view()->tabstrip()->bounds()); | 238 gfx::Rect tabstrip_bounds(browser_view()->tabstrip()->bounds()); |
| 218 if (client_point.y() < tabstrip_bounds.y() + kTabShadowHeight) | 239 if (client_point.y() < tabstrip_bounds.y() + kTabShadowHeight) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 return; | 279 return; |
| 259 } | 280 } |
| 260 | 281 |
| 261 caption_button_container_->SetPaintAsActive(ShouldPaintAsActive()); | 282 caption_button_container_->SetPaintAsActive(ShouldPaintAsActive()); |
| 262 | 283 |
| 263 ash::HeaderPainter::Mode header_mode = ShouldPaintAsActive() ? | 284 ash::HeaderPainter::Mode header_mode = ShouldPaintAsActive() ? |
| 264 ash::HeaderPainter::MODE_ACTIVE : ash::HeaderPainter::MODE_INACTIVE; | 285 ash::HeaderPainter::MODE_ACTIVE : ash::HeaderPainter::MODE_INACTIVE; |
| 265 header_painter_->PaintHeader(canvas, header_mode); | 286 header_painter_->PaintHeader(canvas, header_mode); |
| 266 if (browser_view()->IsToolbarVisible()) | 287 if (browser_view()->IsToolbarVisible()) |
| 267 PaintToolbarBackground(canvas); | 288 PaintToolbarBackground(canvas); |
| 268 else if (!UsePackagedAppHeaderStyle()) | 289 else if (!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()) |
| 269 PaintContentEdge(canvas); | 290 PaintContentEdge(canvas); |
| 270 } | 291 } |
| 271 | 292 |
| 272 void BrowserNonClientFrameViewAsh::Layout() { | 293 void BrowserNonClientFrameViewAsh::Layout() { |
| 273 // The header must be laid out before computing |painted_height| because the | 294 // The header must be laid out before computing |painted_height| because the |
| 274 // computation of |painted_height| for app and popup windows depends on the | 295 // computation of |painted_height| for app and popup windows depends on the |
| 275 // position of the window controls. | 296 // position of the window controls. |
| 276 header_painter_->LayoutHeader(); | 297 header_painter_->LayoutHeader(); |
| 277 | 298 |
| 278 int painted_height = 0; | 299 int painted_height = 0; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 } | 366 } |
| 346 | 367 |
| 347 gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() { | 368 gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() { |
| 348 views::WidgetDelegate* delegate = frame()->widget_delegate(); | 369 views::WidgetDelegate* delegate = frame()->widget_delegate(); |
| 349 if (!delegate) | 370 if (!delegate) |
| 350 return gfx::ImageSkia(); | 371 return gfx::ImageSkia(); |
| 351 return delegate->GetWindowIcon(); | 372 return delegate->GetWindowIcon(); |
| 352 } | 373 } |
| 353 | 374 |
| 354 /////////////////////////////////////////////////////////////////////////////// | 375 /////////////////////////////////////////////////////////////////////////////// |
| 376 // views::ButtonListener: | |
|
calamity
2014/08/06 07:07:06
nit: CommandObserver.
benwells
2014/08/06 08:13:59
Done.
| |
| 377 | |
| 378 void BrowserNonClientFrameViewAsh::EnabledStateChangedForCommand(int id, | |
| 379 bool enabled) { | |
| 380 DCHECK_EQ(IDC_BACK, id); | |
| 381 UpdateBackButtonState(enabled); | |
| 382 } | |
| 383 | |
| 384 /////////////////////////////////////////////////////////////////////////////// | |
| 385 // views::ButtonListener: | |
| 386 | |
| 387 void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender, | |
| 388 const ui::Event& event) { | |
| 389 DCHECK_EQ(sender, webapp_back_button_); | |
| 390 chrome::ExecuteCommand(browser_view()->browser(), IDC_BACK); | |
| 391 } | |
| 392 | |
| 393 /////////////////////////////////////////////////////////////////////////////// | |
| 355 // BrowserNonClientFrameViewAsh, private: | 394 // BrowserNonClientFrameViewAsh, private: |
| 356 | 395 |
| 357 // views::NonClientFrameView: | 396 // views::NonClientFrameView: |
| 358 bool BrowserNonClientFrameViewAsh::DoesIntersectRect( | 397 bool BrowserNonClientFrameViewAsh::DoesIntersectRect( |
| 359 const views::View* target, | 398 const views::View* target, |
| 360 const gfx::Rect& rect) const { | 399 const gfx::Rect& rect) const { |
| 361 CHECK_EQ(target, this); | 400 CHECK_EQ(target, this); |
| 362 if (!views::ViewTargeterDelegate::DoesIntersectRect(this, rect)) { | 401 if (!views::ViewTargeterDelegate::DoesIntersectRect(this, rect)) { |
| 363 // |rect| is outside BrowserNonClientFrameViewAsh's bounds. | 402 // |rect| is outside BrowserNonClientFrameViewAsh's bounds. |
| 364 return false; | 403 return false; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 ImmersiveModeController* immersive_controller = | 438 ImmersiveModeController* immersive_controller = |
| 400 browser_view()->immersive_mode_controller(); | 439 browser_view()->immersive_mode_controller(); |
| 401 return immersive_controller->IsEnabled() && | 440 return immersive_controller->IsEnabled() && |
| 402 !immersive_controller->IsRevealed() && | 441 !immersive_controller->IsRevealed() && |
| 403 browser_view()->IsTabStripVisible(); | 442 browser_view()->IsTabStripVisible(); |
| 404 } | 443 } |
| 405 | 444 |
| 406 bool BrowserNonClientFrameViewAsh::UsePackagedAppHeaderStyle() const { | 445 bool BrowserNonClientFrameViewAsh::UsePackagedAppHeaderStyle() const { |
| 407 // Non streamlined hosted apps do not have a toolbar or tabstrip. Their header | 446 // Non streamlined hosted apps do not have a toolbar or tabstrip. Their header |
| 408 // should look the same as the header for packaged apps. Streamlined hosted | 447 // should look the same as the header for packaged apps. Streamlined hosted |
| 409 // apps have a toolbar so should use the browser header style. | 448 // apps have the experimental WebApp header style. |
| 410 return browser_view()->browser()->is_app() && | 449 return browser_view()->browser()->is_app() && |
| 411 !CommandLine::ForCurrentProcess()->HasSwitch( | 450 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 412 switches::kEnableStreamlinedHostedApps); | 451 switches::kEnableStreamlinedHostedApps); |
| 413 } | 452 } |
| 414 | 453 |
| 454 bool BrowserNonClientFrameViewAsh::UseWebAppHeaderStyle() const { | |
| 455 // Use of the experimental WebApp header style is guarded with the | |
| 456 // streamlined hosted app style. | |
| 457 return browser_view()->browser()->is_app() && | |
| 458 CommandLine::ForCurrentProcess()->HasSwitch( | |
| 459 switches::kEnableStreamlinedHostedApps); | |
| 460 } | |
| 461 | |
| 415 void BrowserNonClientFrameViewAsh::LayoutAvatar() { | 462 void BrowserNonClientFrameViewAsh::LayoutAvatar() { |
| 416 DCHECK(avatar_button()); | 463 DCHECK(avatar_button()); |
| 417 #if !defined(OS_CHROMEOS) | 464 #if !defined(OS_CHROMEOS) |
| 418 // ChromeOS shows avatar on V1 app. | 465 // ChromeOS shows avatar on V1 app. |
| 419 DCHECK(browser_view()->IsTabStripVisible()); | 466 DCHECK(browser_view()->IsTabStripVisible()); |
| 420 #endif | 467 #endif |
| 421 gfx::ImageSkia incognito_icon = browser_view()->GetOTRAvatarIcon(); | 468 gfx::ImageSkia incognito_icon = browser_view()->GetOTRAvatarIcon(); |
| 422 | 469 |
| 423 int avatar_bottom = GetTopInset() + | 470 int avatar_bottom = GetTopInset() + |
| 424 browser_view()->GetTabStripHeight() - kAvatarBottomSpacing; | 471 browser_view()->GetTabStripHeight() - kAvatarBottomSpacing; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 532 canvas->FillRect( | 579 canvas->FillRect( |
| 533 gfx::Rect(x + kClientEdgeThickness, | 580 gfx::Rect(x + kClientEdgeThickness, |
| 534 toolbar_bounds.bottom() - kClientEdgeThickness, | 581 toolbar_bounds.bottom() - kClientEdgeThickness, |
| 535 w - (2 * kClientEdgeThickness), | 582 w - (2 * kClientEdgeThickness), |
| 536 kClientEdgeThickness), | 583 kClientEdgeThickness), |
| 537 ThemeProperties::GetDefaultColor( | 584 ThemeProperties::GetDefaultColor( |
| 538 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); | 585 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); |
| 539 } | 586 } |
| 540 | 587 |
| 541 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { | 588 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { |
| 542 DCHECK(!UsePackagedAppHeaderStyle()); | 589 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); |
| 543 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), | 590 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), |
| 544 width(), kClientEdgeThickness), | 591 width(), kClientEdgeThickness), |
| 545 ThemeProperties::GetDefaultColor( | 592 ThemeProperties::GetDefaultColor( |
| 546 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); | 593 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); |
| 547 } | 594 } |
| 595 | |
| 596 void BrowserNonClientFrameViewAsh::UpdateBackButtonState(bool enabled) { | |
| 597 webapp_back_button_->SetState(enabled ? views::Button::STATE_NORMAL | |
| 598 : views::Button::STATE_DISABLED); | |
| 599 webapp_back_button_->set_paint_as_active(enabled); | |
| 600 } | |
| OLD | NEW |