| 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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 // views::ContextMenuController: | 190 // views::ContextMenuController: |
| 191 void ShowContextMenuForView(views::View* source, | 191 void ShowContextMenuForView(views::View* source, |
| 192 const gfx::Point& point, | 192 const gfx::Point& point, |
| 193 ui::MenuSourceType source_type) override; | 193 ui::MenuSourceType source_type) override; |
| 194 | 194 |
| 195 // views::MaskedTargeterDelegate: | 195 // views::MaskedTargeterDelegate: |
| 196 bool GetHitTestMask(gfx::Path* mask) const override; | 196 bool GetHitTestMask(gfx::Path* mask) const override; |
| 197 | 197 |
| 198 // views::View: | 198 // views::View: |
| 199 void ViewHierarchyChanged( |
| 200 const ViewHierarchyChangedDetails& details) override; |
| 199 void OnPaint(gfx::Canvas* canvas) override; | 201 void OnPaint(gfx::Canvas* canvas) override; |
| 200 void Layout() override; | 202 void Layout() override; |
| 201 void OnThemeChanged() override; | 203 void OnThemeChanged() override; |
| 202 const char* GetClassName() const override; | 204 const char* GetClassName() const override; |
| 203 bool GetTooltipText(const gfx::Point& p, | 205 bool GetTooltipText(const gfx::Point& p, |
| 204 base::string16* tooltip) const override; | 206 base::string16* tooltip) const override; |
| 205 bool GetTooltipTextOrigin(const gfx::Point& p, | 207 bool GetTooltipTextOrigin(const gfx::Point& p, |
| 206 gfx::Point* origin) const override; | 208 gfx::Point* origin) const override; |
| 207 bool OnMousePressed(const ui::MouseEvent& event) override; | 209 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 208 bool OnMouseDragged(const ui::MouseEvent& event) override; | 210 bool OnMouseDragged(const ui::MouseEvent& event) override; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 274 |
| 273 void DisplayCrashedFavicon(); | 275 void DisplayCrashedFavicon(); |
| 274 void ResetCrashedFavicon(); | 276 void ResetCrashedFavicon(); |
| 275 | 277 |
| 276 void StopCrashAnimation(); | 278 void StopCrashAnimation(); |
| 277 void StartCrashAnimation(); | 279 void StartCrashAnimation(); |
| 278 | 280 |
| 279 // Returns true if the crash animation is currently running. | 281 // Returns true if the crash animation is currently running. |
| 280 bool IsPerformingCrashAnimation() const; | 282 bool IsPerformingCrashAnimation() const; |
| 281 | 283 |
| 284 // Calculates the correct |close_button_color_| and sets the close button |
| 285 // normal-state image. This should be called any time the theme or active |
| 286 // state may have changed. |
| 287 void SetCloseButtonNormalStateImage(); |
| 288 |
| 282 // Schedules repaint task for icon. | 289 // Schedules repaint task for icon. |
| 283 void ScheduleIconPaint(); | 290 void ScheduleIconPaint(); |
| 284 | 291 |
| 285 // Returns a |path| containing the region that matches the bitmap display of | 292 // Returns a |path| containing the region that matches the bitmap display of |
| 286 // this tab, for input event hit testing. Set |include_top_shadow| to include | 293 // this tab, for input event hit testing. Set |include_top_shadow| to include |
| 287 // the mostly-transparent shadow pixels above the top edge of the tab in the | 294 // the mostly-transparent shadow pixels above the top edge of the tab in the |
| 288 // path. | 295 // path. |
| 289 void GetHitTestMaskHelper(bool include_top_shadow, gfx::Path* path) const; | 296 void GetHitTestMaskHelper(bool include_top_shadow, gfx::Path* path) const; |
| 290 | 297 |
| 291 // Returns the rectangle for the light bar in immersive mode. | 298 // Returns the rectangle for the light bar in immersive mode. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 SkColor close_button_color_; | 406 SkColor close_button_color_; |
| 400 | 407 |
| 401 // As the majority of the tabs are inactive, and painting tabs is slowish, | 408 // As the majority of the tabs are inactive, and painting tabs is slowish, |
| 402 // we cache a handful of the inactive tab backgrounds here. | 409 // we cache a handful of the inactive tab backgrounds here. |
| 403 static ImageCache* image_cache_; | 410 static ImageCache* image_cache_; |
| 404 | 411 |
| 405 DISALLOW_COPY_AND_ASSIGN(Tab); | 412 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 406 }; | 413 }; |
| 407 | 414 |
| 408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 415 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |