| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ |
| 7 | 7 |
| 8 #include "views/view.h" | 8 #include "views/view.h" |
| 9 #include "views/controls/link.h" | 9 #include "views/controls/link.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 26 class Delegate { | 26 class Delegate { |
| 27 public: | 27 public: |
| 28 virtual void ShowImportDialog() = 0; | 28 virtual void ShowImportDialog() = 0; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 explicit BookmarkBarInstructionsView(Delegate* delegate); | 31 explicit BookmarkBarInstructionsView(Delegate* delegate); |
| 32 | 32 |
| 33 // View overrides. | 33 // View overrides. |
| 34 virtual gfx::Size GetPreferredSize(); | 34 virtual gfx::Size GetPreferredSize(); |
| 35 virtual void Layout(); | 35 virtual void Layout(); |
| 36 virtual void ThemeChanged(); | 36 virtual void OnThemeChanged(); |
| 37 virtual void ViewHierarchyChanged(bool is_add, | 37 virtual void ViewHierarchyChanged(bool is_add, |
| 38 views::View* parent, | 38 views::View* parent, |
| 39 views::View* child); | 39 views::View* child); |
| 40 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); | 40 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
| 41 | 41 |
| 42 // LinkController. | 42 // LinkController. |
| 43 virtual void LinkActivated(views::Link* source, int event_flags); | 43 virtual void LinkActivated(views::Link* source, int event_flags); |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 void UpdateColors(); | 46 void UpdateColors(); |
| 47 | 47 |
| 48 Delegate* delegate_; | 48 Delegate* delegate_; |
| 49 | 49 |
| 50 views::Label* instructions_; | 50 views::Label* instructions_; |
| 51 views::Link* import_link_; | 51 views::Link* import_link_; |
| 52 | 52 |
| 53 // The baseline of the child views. This is -1 if none of the views support a | 53 // The baseline of the child views. This is -1 if none of the views support a |
| 54 // baseline. | 54 // baseline. |
| 55 int baseline_; | 55 int baseline_; |
| 56 | 56 |
| 57 // Have the colors of the child views been updated? This is initially false | 57 // Have the colors of the child views been updated? This is initially false |
| 58 // and set to true once we have a valid ThemeProvider. | 58 // and set to true once we have a valid ThemeProvider. |
| 59 bool updated_colors_; | 59 bool updated_colors_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(BookmarkBarInstructionsView); | 61 DISALLOW_COPY_AND_ASSIGN(BookmarkBarInstructionsView); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ | 64 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_INSTRUCTIONS_VIEW_H_ |
| OLD | NEW |