Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 23922007: Merge the LinuxUI interface from its own .so into libviews.so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/libgtk2ui/libgtk2ui.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/libgtk2ui/libgtk2ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698