Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 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_DATABASE_OPEN_INFO_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_DATABASE_OPEN_INFO_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_DATABASE_OPEN_INFO_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_DATABASE_OPEN_INFO_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/string16.h" | 8 #include "base/string16.h" |
| 12 #include "views/view.h" | 9 #include "chrome/browser/views/generic_info_view.h" |
| 13 | |
| 14 namespace views { | |
| 15 class Label; | |
| 16 class Textfield; | |
| 17 } | |
| 18 | 10 |
| 19 /////////////////////////////////////////////////////////////////////////////// | 11 /////////////////////////////////////////////////////////////////////////////// |
| 20 // DatabaseOpenInfoView | 12 // DatabaseOpenInfoView |
| 21 // | 13 // |
| 22 // Responsible for displaying a tabular grid of Database information when | 14 // Responsible for displaying a tabular grid of Database information when |
| 23 // prompting for permission to open a new database. | 15 // prompting for permission to open a new database. |
| 24 class DatabaseOpenInfoView : public views::View { | 16 class DatabaseOpenInfoView : public GenericInfoView { |
|
michaeln
2010/03/30 19:08:13
Thnx!
| |
| 25 public: | 17 public: |
| 26 DatabaseOpenInfoView(); | 18 DatabaseOpenInfoView(); |
| 27 virtual ~DatabaseOpenInfoView(); | |
| 28 | 19 |
| 29 // Update the display from the specified Database data. | 20 // Update the display from the specified Database data. |
| 30 void SetFields(const std::string& host, | 21 void SetFields(const std::string& host, |
| 31 const string16& database_name); | 22 const string16& database_name, |
| 32 | 23 const string16& display_name, |
| 33 // Enables or disables the local storate property text fields. | 24 unsigned long estimated_size); |
| 34 void EnableDisplay(bool enabled); | |
| 35 | |
| 36 protected: | |
| 37 // views::View overrides: | |
| 38 virtual void ViewHierarchyChanged( | |
| 39 bool is_add, views::View* parent, views::View* child); | |
| 40 | 25 |
| 41 private: | 26 private: |
| 42 // Set up the view layout | |
| 43 void Init(); | |
| 44 | |
| 45 // Individual property labels | |
| 46 views::Textfield* host_value_field_; | |
| 47 views::Textfield* database_name_value_field_; | |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(DatabaseOpenInfoView); | 27 DISALLOW_COPY_AND_ASSIGN(DatabaseOpenInfoView); |
| 50 }; | 28 }; |
| 51 | 29 |
| 52 | 30 |
| 53 #endif // CHROME_BROWSER_VIEWS_DATABASE_OPEN_INFO_VIEW_H_ | 31 #endif // CHROME_BROWSER_VIEWS_DATABASE_OPEN_INFO_VIEW_H_ |
| 54 | 32 |
| OLD | NEW |