| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/frame/panel_controller.h" | 5 #include "chrome/browser/chromeos/frame/panel_controller.h" |
| 6 | 6 |
| 7 #if defined(TOUCH_UI) | 7 #if defined(TOUCH_UI) |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 #endif | 10 #endif |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 SkColor colors[2] = {kTitleActiveGradientStart, kTitleActiveGradientEnd}; | 124 SkColor colors[2] = {kTitleActiveGradientStart, kTitleActiveGradientEnd}; |
| 125 if (panel_controller_->urgent()) { | 125 if (panel_controller_->urgent()) { |
| 126 colors[0] = kTitleUrgentGradientStart; | 126 colors[0] = kTitleUrgentGradientStart; |
| 127 colors[1] = kTitleUrgentGradientEnd; | 127 colors[1] = kTitleUrgentGradientEnd; |
| 128 } | 128 } |
| 129 SkShader* s = SkGradientShader::CreateLinear( | 129 SkShader* s = SkGradientShader::CreateLinear( |
| 130 p, colors, NULL, 2, SkShader::kClamp_TileMode, NULL); | 130 p, colors, NULL, 2, SkShader::kClamp_TileMode, NULL); |
| 131 paint.setShader(s); | 131 paint.setShader(s); |
| 132 // Need to unref shader, otherwise never deleted. | 132 // Need to unref shader, otherwise never deleted. |
| 133 s->unref(); | 133 s->unref(); |
| 134 canvas->AsCanvasSkia()->drawPath(path, paint); | 134 canvas->GetSkCanvas()->drawPath(path, paint); |
| 135 } | 135 } |
| 136 | 136 |
| 137 PanelController* panel_controller_; | 137 PanelController* panel_controller_; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 static bool resources_initialized; | 140 static bool resources_initialized; |
| 141 static void InitializeResources() { | 141 static void InitializeResources() { |
| 142 if (resources_initialized) { | 142 if (resources_initialized) { |
| 143 return; | 143 return; |
| 144 } | 144 } |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 views::Button* sender, const views::Event& event) { | 512 views::Button* sender, const views::Event& event) { |
| 513 if (panel_controller_ && sender == close_button_) | 513 if (panel_controller_ && sender == close_button_) |
| 514 panel_controller_->OnCloseButtonPressed(); | 514 panel_controller_->OnCloseButtonPressed(); |
| 515 } | 515 } |
| 516 | 516 |
| 517 PanelController::TitleContentView::~TitleContentView() { | 517 PanelController::TitleContentView::~TitleContentView() { |
| 518 VLOG(1) << "panel: delete " << this; | 518 VLOG(1) << "panel: delete " << this; |
| 519 } | 519 } |
| 520 | 520 |
| 521 } // namespace chromeos | 521 } // namespace chromeos |
| OLD | NEW |