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/libgtk2ui/gtk2_ui.h" | 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 void Gtk2UI::SetProgressFraction(float percentage) const { | 389 void Gtk2UI::SetProgressFraction(float percentage) const { |
390 if (unity::IsRunning()) | 390 if (unity::IsRunning()) |
391 unity::SetProgressFraction(percentage); | 391 unity::SetProgressFraction(percentage); |
392 } | 392 } |
393 | 393 |
394 bool Gtk2UI::IsStatusIconSupported() const { | 394 bool Gtk2UI::IsStatusIconSupported() const { |
395 return AppIndicatorIcon::CouldOpen(); | 395 return AppIndicatorIcon::CouldOpen(); |
396 } | 396 } |
397 | 397 |
398 scoped_ptr<StatusIconLinux> Gtk2UI::CreateLinuxStatusIcon( | 398 scoped_ptr<views::StatusIconLinux> Gtk2UI::CreateLinuxStatusIcon( |
399 const gfx::ImageSkia& image, | 399 const gfx::ImageSkia& image, |
400 const string16& tool_tip) const { | 400 const string16& tool_tip) const { |
401 if (AppIndicatorIcon::CouldOpen()) { | 401 if (AppIndicatorIcon::CouldOpen()) { |
402 ++indicators_count; | 402 ++indicators_count; |
403 return scoped_ptr<StatusIconLinux>(new AppIndicatorIcon( | 403 return scoped_ptr<views::StatusIconLinux>(new AppIndicatorIcon( |
404 base::StringPrintf("%s%d", kAppIndicatorIdPrefix, indicators_count), | 404 base::StringPrintf("%s%d", kAppIndicatorIdPrefix, indicators_count), |
405 image, | 405 image, |
406 tool_tip)); | 406 tool_tip)); |
407 } else { | 407 } else { |
408 return scoped_ptr<StatusIconLinux>(); | 408 return scoped_ptr<views::StatusIconLinux>(); |
409 } | 409 } |
410 } | 410 } |
411 | 411 |
412 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( | 412 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( |
413 ui::SelectFileDialog::Listener* listener, | 413 ui::SelectFileDialog::Listener* listener, |
414 ui::SelectFilePolicy* policy) const { | 414 ui::SelectFilePolicy* policy) const { |
415 return SelectFileDialogImpl::Create(listener, policy); | 415 return SelectFileDialogImpl::Create(listener, policy); |
416 } | 416 } |
417 | 417 |
418 void Gtk2UI::GetScrollbarColors(GdkColor* thumb_active_color, | 418 void Gtk2UI::GetScrollbarColors(GdkColor* thumb_active_color, |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 | 1035 |
1036 return border; | 1036 return border; |
1037 } | 1037 } |
1038 | 1038 |
1039 void Gtk2UI::ClearAllThemeData() { | 1039 void Gtk2UI::ClearAllThemeData() { |
1040 gtk_images_.clear(); | 1040 gtk_images_.clear(); |
1041 } | 1041 } |
1042 | 1042 |
1043 } // namespace libgtk2ui | 1043 } // namespace libgtk2ui |
1044 | 1044 |
1045 ui::LinuxUI* BuildGtk2UI() { | 1045 views::LinuxUI* BuildGtk2UI() { |
1046 return new libgtk2ui::Gtk2UI; | 1046 return new libgtk2ui::Gtk2UI; |
1047 } | 1047 } |
OLD | NEW |