summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 05:46:20 +0000
committerhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 05:46:20 +0000
commit7d2cf18045bf3203726a0c87e3d78d72765b3417 (patch)
tree446134bcf7c9a194acc54efa6783f03ddf10a86d
parent80d5aa4a1de9107d1442480b8ea9ba06feff2be2 (diff)
downloadchromium_src-7d2cf18045bf3203726a0c87e3d78d72765b3417.zip
chromium_src-7d2cf18045bf3203726a0c87e3d78d72765b3417.tar.gz
chromium_src-7d2cf18045bf3203726a0c87e3d78d72765b3417.tar.bz2
Remove the drive status from the ash try.
The drive status is shown in Files.app now. We can remove the status from the ash try. BUG=379979 TEST=None Review URL: https://codereview.chromium.org/410333005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285493 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash.gyp3
-rw-r--r--ash/system/chromeos/enterprise/tray_enterprise.cc1
-rw-r--r--ash/system/chromeos/supervised/tray_supervised_user.cc1
-rw-r--r--ash/system/chromeos/tray_caps_lock.cc1
-rw-r--r--ash/system/drive/drive_observer.h22
-rw-r--r--ash/system/drive/tray_drive.cc517
-rw-r--r--ash/system/drive/tray_drive.h55
-rw-r--r--ash/system/tray/default_system_tray_delegate.cc10
-rw-r--r--ash/system/tray/default_system_tray_delegate.h4
-rw-r--r--ash/system/tray/system_tray.cc3
-rw-r--r--ash/system/tray/system_tray_delegate.cc10
-rw-r--r--ash/system/tray/system_tray_delegate.h41
-rw-r--r--ash/system/tray/system_tray_notifier.cc15
-rw-r--r--ash/system/tray/system_tray_notifier.h6
-rw-r--r--ash/system/user/tray_user.cc1
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc139
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.h21
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_linux.cc10
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_win.cc10
19 files changed, 6 insertions, 864 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 759f936..7141ae5 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -361,9 +361,6 @@
'system/date/date_view.h',
'system/date/tray_date.cc',
'system/date/tray_date.h',
- 'system/drive/drive_observer.h',
- 'system/drive/tray_drive.cc',
- 'system/drive/tray_drive.h',
'system/ime/ime_observer.h',
'system/ime/tray_ime.cc',
'system/ime/tray_ime.h',
diff --git a/ash/system/chromeos/enterprise/tray_enterprise.cc b/ash/system/chromeos/enterprise/tray_enterprise.cc
index d3f9ccd..23e954f 100644
--- a/ash/system/chromeos/enterprise/tray_enterprise.cc
+++ b/ash/system/chromeos/enterprise/tray_enterprise.cc
@@ -6,6 +6,7 @@
#include "ash/shell.h"
#include "ash/system/chromeos/label_tray_view.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/user/login_status.h"
#include "base/logging.h"
diff --git a/ash/system/chromeos/supervised/tray_supervised_user.cc b/ash/system/chromeos/supervised/tray_supervised_user.cc
index 2d0012f..e18a4fd 100644
--- a/ash/system/chromeos/supervised/tray_supervised_user.cc
+++ b/ash/system/chromeos/supervised/tray_supervised_user.cc
@@ -7,6 +7,7 @@
#include "ash/shell.h"
#include "ash/system/chromeos/label_tray_view.h"
#include "ash/system/system_notifier.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_notification_view.h"
#include "ash/system/user/login_status.h"
diff --git a/ash/system/chromeos/tray_caps_lock.cc b/ash/system/chromeos/tray_caps_lock.cc
index 0c83ea4..2a1d732 100644
--- a/ash/system/chromeos/tray_caps_lock.cc
+++ b/ash/system/chromeos/tray_caps_lock.cc
@@ -8,6 +8,7 @@
#include "ash/shell.h"
#include "ash/system/tray/actionable_view.h"
#include "ash/system/tray/fixed_sized_image_view.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_constants.h"
#include "base/sys_info.h"
diff --git a/ash/system/drive/drive_observer.h b/ash/system/drive/drive_observer.h
deleted file mode 100644
index a721dd4..0000000
--- a/ash/system/drive/drive_observer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
-#define ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
-
-#include "ash/system/tray/system_tray_delegate.h"
-
-namespace ash {
-
-class DriveObserver {
- public:
- virtual void OnDriveJobUpdated(const DriveOperationStatus& status) = 0;
-
- protected:
- virtual ~DriveObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
diff --git a/ash/system/drive/tray_drive.cc b/ash/system/drive/tray_drive.cc
deleted file mode 100644
index 33217f1..0000000
--- a/ash/system/drive/tray_drive.cc
+++ /dev/null
@@ -1,517 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/drive/tray_drive.h"
-
-#include <vector>
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "base/logging.h"
-#include "base/stl_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/progress_bar.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace {
-
-const int kSidePadding = 8;
-const int kHorizontalPadding = 6;
-const int kVerticalPadding = 6;
-const int kTopPadding = 6;
-const int kBottomPadding = 10;
-const int kProgressBarWidth = 100;
-const int kProgressBarHeight = 11;
-const int64 kHideDelayInMs = 1000;
-
-base::string16 GetTrayLabel(const ash::DriveOperationStatusList& list) {
- return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_DRIVE_SYNCING,
- base::IntToString16(static_cast<int>(list.size())));
-}
-
-scoped_ptr<ash::DriveOperationStatusList> GetCurrentOperationList() {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- scoped_ptr<ash::DriveOperationStatusList> list(
- new ash::DriveOperationStatusList);
- delegate->GetDriveOperationStatusList(list.get());
- return list.Pass();
-}
-
-}
-
-namespace tray {
-
-class DriveDefaultView : public TrayItemMore {
- public:
- DriveDefaultView(SystemTrayItem* owner,
- const DriveOperationStatusList* list)
- : TrayItemMore(owner, true) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
-
- SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DRIVE).ToImageSkia());
- Update(list);
- }
-
- virtual ~DriveDefaultView() {}
-
- void Update(const DriveOperationStatusList* list) {
- DCHECK(list);
- base::string16 label = GetTrayLabel(*list);
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DriveDefaultView);
-};
-
-class DriveDetailedView : public TrayDetailsView,
- public ViewClickListener {
- public:
- DriveDetailedView(SystemTrayItem* owner,
- const DriveOperationStatusList* list)
- : TrayDetailsView(owner),
- settings_(NULL),
- in_progress_img_(NULL),
- done_img_(NULL),
- failed_img_(NULL) {
- in_progress_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE);
- done_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_DONE);
- failed_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_FAILED);
-
- Update(list);
- }
-
- virtual ~DriveDetailedView() {
- STLDeleteValues(&update_map_);
- }
-
- void Update(const DriveOperationStatusList* list) {
- AppendOperationList(list);
- AppendSettings();
- AppendHeaderEntry(list);
-
- SchedulePaint();
- }
-
- private:
-
- class OperationProgressBar : public views::ProgressBar {
- public:
- OperationProgressBar() {}
- private:
-
- // Overridden from View:
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
- return gfx::Size(kProgressBarWidth, kProgressBarHeight);
- }
-
- DISALLOW_COPY_AND_ASSIGN(OperationProgressBar);
- };
-
- class RowView : public HoverHighlightView,
- public views::ButtonListener {
- public:
- RowView(DriveDetailedView* parent,
- ash::DriveOperationStatus::OperationState state,
- double progress,
- const base::FilePath& file_path,
- int32 operation_id)
- : HoverHighlightView(parent),
- container_(parent),
- status_img_(NULL),
- label_container_(NULL),
- progress_bar_(NULL),
- cancel_button_(NULL),
- operation_id_(operation_id) {
- // Status image.
- status_img_ = new views::ImageView();
- AddChildView(status_img_);
-
- label_container_ = new views::View();
- label_container_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, kVerticalPadding));
-#if defined(OS_POSIX)
- base::string16 file_label =
- base::UTF8ToUTF16(file_path.BaseName().value());
-#elif defined(OS_WIN)
- base::string16 file_label =
- base::WideToUTF16(file_path.BaseName().value());
-#endif
- views::Label* label = new views::Label(file_label);
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_container_->AddChildView(label);
- // Add progress bar.
- progress_bar_ = new OperationProgressBar();
- label_container_->AddChildView(progress_bar_);
-
- AddChildView(label_container_);
-
- cancel_button_ = new views::ImageButton(this);
- cancel_button_->SetImage(views::ImageButton::STATE_NORMAL,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_CANCEL));
- cancel_button_->SetImage(views::ImageButton::STATE_HOVERED,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_CANCEL_HOVER));
-
- UpdateStatus(state, progress);
- AddChildView(cancel_button_);
- }
-
- void UpdateStatus(ash::DriveOperationStatus::OperationState state,
- double progress) {
- status_img_->SetImage(container_->GetImageForState(state));
- progress_bar_->SetValue(progress);
- cancel_button_->SetVisible(
- state == ash::DriveOperationStatus::OPERATION_NOT_STARTED ||
- state == ash::DriveOperationStatus::OPERATION_IN_PROGRESS);
- }
-
- private:
-
- // views::View overrides.
- virtual gfx::Size GetPreferredSize() const OVERRIDE {
- return gfx::Size(
- status_img_->GetPreferredSize().width() +
- label_container_->GetPreferredSize().width() +
- cancel_button_->GetPreferredSize().width() +
- 2 * kSidePadding + 2 * kHorizontalPadding,
- std::max(status_img_->GetPreferredSize().height(),
- std::max(label_container_->GetPreferredSize().height(),
- cancel_button_->GetPreferredSize().height())) +
- kTopPadding + kBottomPadding);
- }
-
- virtual void Layout() OVERRIDE {
- gfx::Rect child_area(GetLocalBounds());
- if (child_area.IsEmpty())
- return;
-
- int pos_x = child_area.x() + kSidePadding;
- int pos_y = child_area.y() + kTopPadding;
-
- gfx::Rect bounds_status(
- gfx::Point(pos_x,
- pos_y + (child_area.height() - kTopPadding -
- kBottomPadding -
- status_img_->GetPreferredSize().height())/2),
- status_img_->GetPreferredSize());
- status_img_->SetBoundsRect(
- gfx::IntersectRects(bounds_status, child_area));
- pos_x += status_img_->bounds().width() + kHorizontalPadding;
-
- gfx::Rect bounds_label(pos_x,
- pos_y,
- child_area.width() - 2 * kSidePadding -
- 2 * kHorizontalPadding -
- status_img_->GetPreferredSize().width() -
- cancel_button_->GetPreferredSize().width(),
- label_container_->GetPreferredSize().height());
- label_container_->SetBoundsRect(
- gfx::IntersectRects(bounds_label, child_area));
- pos_x += label_container_->bounds().width() + kHorizontalPadding;
-
- gfx::Rect bounds_button(
- gfx::Point(pos_x,
- pos_y + (child_area.height() - kTopPadding -
- kBottomPadding -
- cancel_button_->GetPreferredSize().height())/2),
- cancel_button_->GetPreferredSize());
- cancel_button_->SetBoundsRect(
- gfx::IntersectRects(bounds_button, child_area));
- }
-
- // views::ButtonListener overrides.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- DCHECK(sender == cancel_button_);
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DRIVE_CANCEL_OPERATION);
- container_->OnCancelOperation(operation_id_);
- }
-
- DriveDetailedView* container_;
- views::ImageView* status_img_;
- views::View* label_container_;
- views::ProgressBar* progress_bar_;
- views::ImageButton* cancel_button_;
- int32 operation_id_;
-
- DISALLOW_COPY_AND_ASSIGN(RowView);
- };
-
- void AppendHeaderEntry(const DriveOperationStatusList* list) {
- if (footer())
- return;
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_DRIVE, this);
- }
-
- gfx::ImageSkia* GetImageForState(
- ash::DriveOperationStatus::OperationState state) {
- switch (state) {
- case ash::DriveOperationStatus::OPERATION_NOT_STARTED:
- case ash::DriveOperationStatus::OPERATION_IN_PROGRESS:
- return in_progress_img_;
- case ash::DriveOperationStatus::OPERATION_COMPLETED:
- return done_img_;
- case ash::DriveOperationStatus::OPERATION_FAILED:
- return failed_img_;
- }
- return failed_img_;
- }
-
- void OnCancelOperation(int32 operation_id) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- delegate->CancelDriveOperation(operation_id);
- }
-
- void AppendOperationList(const DriveOperationStatusList* list) {
- if (!scroller())
- CreateScrollableList();
-
- // Apply the update.
- std::set<base::FilePath> new_set;
- bool item_list_changed = false;
- for (DriveOperationStatusList::const_iterator it = list->begin();
- it != list->end(); ++it) {
- const DriveOperationStatus& operation = *it;
-
- new_set.insert(operation.file_path);
- std::map<base::FilePath, RowView*>::iterator existing_item =
- update_map_.find(operation.file_path);
-
- if (existing_item != update_map_.end()) {
- existing_item->second->UpdateStatus(operation.state,
- operation.progress);
- } else {
- RowView* row_view = new RowView(this,
- operation.state,
- operation.progress,
- operation.file_path,
- operation.id);
-
- update_map_[operation.file_path] = row_view;
- scroll_content()->AddChildView(row_view);
- item_list_changed = true;
- }
- }
-
- // Remove items from the list that haven't been added or modified with this
- // update batch.
- std::set<base::FilePath> remove_set;
- for (std::map<base::FilePath, RowView*>::iterator update_iter =
- update_map_.begin();
- update_iter != update_map_.end(); ++update_iter) {
- if (new_set.find(update_iter->first) == new_set.end()) {
- remove_set.insert(update_iter->first);
- }
- }
-
- for (std::set<base::FilePath>::iterator removed_iter = remove_set.begin();
- removed_iter != remove_set.end(); ++removed_iter) {
- delete update_map_[*removed_iter];
- update_map_.erase(*removed_iter);
- item_list_changed = true;
- }
-
- if (item_list_changed)
- scroller()->Layout();
-
- // Close the details if there is really nothing to show there anymore.
- if (new_set.empty() && GetWidget())
- GetWidget()->Close();
- }
-
- void AppendSettings() {
- if (settings_)
- return;
-
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_DRIVE_SETTINGS),
- gfx::ALIGN_LEFT,
- gfx::Font::NORMAL);
- AddChildView(container);
- settings_ = container;
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else if (sender == settings_) {
- delegate->ShowDriveSettings();
- }
- }
-
- // Maps operation entries to their file paths.
- std::map<base::FilePath, RowView*> update_map_;
- views::View* settings_;
- gfx::ImageSkia* in_progress_img_;
- gfx::ImageSkia* done_img_;
- gfx::ImageSkia* failed_img_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveDetailedView);
-};
-
-} // namespace tray
-
-TrayDrive::TrayDrive(SystemTray* system_tray) :
- TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_DRIVE_LIGHT),
- default_(NULL),
- detailed_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->AddDriveObserver(this);
-}
-
-TrayDrive::~TrayDrive() {
- Shell::GetInstance()->system_tray_notifier()->RemoveDriveObserver(this);
-}
-
-bool TrayDrive::GetInitialVisibility() {
- return false;
-}
-
-views::View* TrayDrive::CreateDefaultView(user::LoginStatus status) {
- DCHECK(!default_);
-
- if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER)
- return NULL;
-
- // If the list is empty AND the tray icon is invisible (= not in the margin
- // duration of delayed item hiding), don't show the item.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- if (list->empty() && !tray_view()->visible())
- return NULL;
-
- default_ = new tray::DriveDefaultView(this, list.get());
- return default_;
-}
-
-views::View* TrayDrive::CreateDetailedView(user::LoginStatus status) {
- DCHECK(!detailed_);
-
- if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER)
- return NULL;
-
- // If the list is empty AND the tray icon is invisible (= not in the margin
- // duration of delayed item hiding), don't show the item.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- if (list->empty() && !tray_view()->visible())
- return NULL;
-
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_DRIVE_VIEW);
- detailed_ = new tray::DriveDetailedView(this, list.get());
- return detailed_;
-}
-
-void TrayDrive::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayDrive::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayDrive::UpdateAfterLoginStatusChange(user::LoginStatus status) {
- if (status == user::LOGGED_IN_USER || status == user::LOGGED_IN_OWNER)
- return;
-
- tray_view()->SetVisible(false);
- DestroyDefaultView();
- DestroyDetailedView();
-}
-
-void TrayDrive::OnDriveJobUpdated(const DriveOperationStatus& status) {
- // The Drive job list manager changed its notification interface *not* to send
- // the whole list of operations each time, to clarify which operation is
- // updated and to reduce redundancy.
- //
- // TrayDrive should be able to benefit from the change, but for now, to
- // incrementally migrate to the new way with minimum diffs, we still get the
- // list of operations each time the event is fired.
- // TODO(kinaba) http://crbug.com/128079 clean it up.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- bool is_new_item = true;
- for (size_t i = 0; i < list->size(); ++i) {
- if ((*list)[i].id == status.id) {
- (*list)[i] = status;
- is_new_item = false;
- break;
- }
- }
- if (is_new_item)
- list->push_back(status);
-
- // Check if all the operations are in the finished state.
- bool all_jobs_finished = true;
- for (size_t i = 0; i < list->size(); ++i) {
- if ((*list)[i].state != DriveOperationStatus::OPERATION_COMPLETED &&
- (*list)[i].state != DriveOperationStatus::OPERATION_FAILED) {
- all_jobs_finished = false;
- break;
- }
- }
-
- if (all_jobs_finished) {
- // If all the jobs ended, the tray item will be hidden after a certain
- // amount of delay. This is to avoid flashes between sequentially executed
- // Drive operations (see crbug/165679).
- hide_timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kHideDelayInMs),
- this,
- &TrayDrive::HideIfNoOperations);
- return;
- }
-
- // If the list is non-empty, stop the hiding timer (if any).
- hide_timer_.Stop();
-
- tray_view()->SetVisible(true);
- if (default_)
- default_->Update(list.get());
- if (detailed_)
- detailed_->Update(list.get());
-}
-
-void TrayDrive::HideIfNoOperations() {
- DriveOperationStatusList empty_list;
-
- tray_view()->SetVisible(false);
- if (default_)
- default_->Update(&empty_list);
- if (detailed_)
- detailed_->Update(&empty_list);
-}
-
-} // namespace ash
diff --git a/ash/system/drive/tray_drive.h b/ash/system/drive/tray_drive.h
deleted file mode 100644
index 3fea2b5..0000000
--- a/ash/system/drive/tray_drive.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
-#define ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
-
-#include "ash/system/drive/drive_observer.h"
-#include "ash/system/tray/tray_image_item.h"
-#include "base/timer/timer.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace tray {
-class DriveTrayView;
-class DriveDefaultView;
-class DriveDetailedView;
-}
-
-class TrayDrive : public TrayImageItem,
- public DriveObserver {
- public:
- explicit TrayDrive(SystemTray* system_tray);
- virtual ~TrayDrive();
-
- private:
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- // Overridden from DriveObserver.
- virtual void OnDriveJobUpdated(const DriveOperationStatus& status) OVERRIDE;
-
- // Delayed hiding of the tray item after encountering an empty operation list.
- void HideIfNoOperations();
-
- tray::DriveDefaultView* default_;
- tray::DriveDetailedView* detailed_;
- base::OneShotTimer<TrayDrive> hide_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDrive);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
diff --git a/ash/system/tray/default_system_tray_delegate.cc b/ash/system/tray/default_system_tray_delegate.cc
index 839575bef..e2aeae3 100644
--- a/ash/system/tray/default_system_tray_delegate.cc
+++ b/ash/system/tray/default_system_tray_delegate.cc
@@ -124,9 +124,6 @@ bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
return false;
}
-void DefaultSystemTrayDelegate::ShowDriveSettings() {
-}
-
void DefaultSystemTrayDelegate::ShowIMESettings() {
}
@@ -205,13 +202,6 @@ void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
}
-void DefaultSystemTrayDelegate::CancelDriveOperation(int32 operation_id) {
-}
-
-void DefaultSystemTrayDelegate::GetDriveOperationStatusList(
- ash::DriveOperationStatusList*) {
-}
-
void DefaultSystemTrayDelegate::ShowNetworkConfigure(
const std::string& network_id,
gfx::NativeWindow parent_window) {
diff --git a/ash/system/tray/default_system_tray_delegate.h b/ash/system/tray/default_system_tray_delegate.h
index 84594bd..0c7625b 100644
--- a/ash/system/tray/default_system_tray_delegate.h
+++ b/ash/system/tray/default_system_tray_delegate.h
@@ -40,7 +40,6 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
virtual void ShowDisplaySettings() OVERRIDE;
virtual void ShowChromeSlow() OVERRIDE;
virtual bool ShouldShowDisplayNotification() OVERRIDE;
- virtual void ShowDriveSettings() OVERRIDE;
virtual void ShowIMESettings() OVERRIDE;
virtual void ShowHelp() OVERRIDE;
virtual void ShowAccessibilityHelp() OVERRIDE;
@@ -65,9 +64,6 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) OVERRIDE;
virtual void SwitchIME(const std::string& ime_id) OVERRIDE;
virtual void ActivateIMEProperty(const std::string& key) OVERRIDE;
- virtual void CancelDriveOperation(int32 operation_id) OVERRIDE;
- virtual void GetDriveOperationStatusList(
- ash::DriveOperationStatusList*) OVERRIDE;
virtual void ShowNetworkConfigure(const std::string& network_id,
gfx::NativeWindow parent_window) OVERRIDE;
virtual bool EnrollNetwork(const std::string& network_id,
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index ef0d0fd..a28f784 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -13,7 +13,6 @@
#include "ash/system/audio/tray_audio.h"
#include "ash/system/bluetooth/tray_bluetooth.h"
#include "ash/system/date/tray_date.h"
-#include "ash/system/drive/tray_drive.h"
#include "ash/system/ime/tray_ime.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -183,7 +182,6 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayVPN(this));
AddTrayItem(new TraySms(this));
AddTrayItem(new TrayBluetooth(this));
- AddTrayItem(new TrayDrive(this));
AddTrayItem(new TrayDisplay(this));
AddTrayItem(new ScreenCaptureTrayItem(this));
AddTrayItem(new ScreenShareTrayItem(this));
@@ -205,7 +203,6 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayIME(this));
AddTrayItem(tray_accessibility_);
AddTrayItem(new TrayBluetooth(this));
- AddTrayItem(new TrayDrive(this));
AddTrayItem(new TrayUpdate(this));
AddTrayItem(tray_date_);
#endif
diff --git a/ash/system/tray/system_tray_delegate.cc b/ash/system/tray/system_tray_delegate.cc
index 084e158..d0b9fb1 100644
--- a/ash/system/tray/system_tray_delegate.cc
+++ b/ash/system/tray/system_tray_delegate.cc
@@ -25,16 +25,6 @@ BluetoothDeviceInfo::BluetoothDeviceInfo()
BluetoothDeviceInfo::~BluetoothDeviceInfo() {
}
-DriveOperationStatus::DriveOperationStatus()
- : id(-1),
- progress(0.0),
- type(OPERATION_DOWNLOAD),
- state(OPERATION_NOT_STARTED) {
-}
-
-DriveOperationStatus::~DriveOperationStatus() {
-}
-
IMEInfo::IMEInfo()
: selected(false),
third_party(false) {
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index dffa9f1..de86112 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -53,37 +53,6 @@ struct ASH_EXPORT BluetoothDeviceInfo {
typedef std::vector<BluetoothDeviceInfo> BluetoothDeviceList;
-// Structure that packs progress information of each operation.
-struct ASH_EXPORT DriveOperationStatus {
- enum OperationType {
- OPERATION_UPLOAD,
- OPERATION_DOWNLOAD
- };
-
- enum OperationState {
- OPERATION_NOT_STARTED,
- OPERATION_IN_PROGRESS,
- OPERATION_COMPLETED,
- OPERATION_FAILED,
- };
-
- DriveOperationStatus();
- ~DriveOperationStatus();
-
- // Unique ID for the operation.
- int32 id;
-
- // File path.
- base::FilePath file_path;
- // Current operation completion progress [0.0 - 1.0].
- double progress;
- OperationType type;
- OperationState state;
-};
-
-typedef std::vector<DriveOperationStatus> DriveOperationStatusList;
-
-
struct ASH_EXPORT IMEPropertyInfo {
IMEPropertyInfo();
~IMEPropertyInfo();
@@ -185,9 +154,6 @@ class ASH_EXPORT SystemTrayDelegate {
// should appear.
virtual bool ShouldShowDisplayNotification() = 0;
- // Shows settings related to Google Drive.
- virtual void ShowDriveSettings() = 0;
-
// Shows settings related to input methods.
virtual void ShowIMESettings() = 0;
@@ -264,13 +230,6 @@ class ASH_EXPORT SystemTrayDelegate {
// Activates an IME property.
virtual void ActivateIMEProperty(const std::string& key) = 0;
- // Cancels ongoing drive operation.
- virtual void CancelDriveOperation(int32 operation_id) = 0;
-
- // Returns information about the ongoing drive operations.
- virtual void GetDriveOperationStatusList(
- DriveOperationStatusList* list) = 0;
-
// Shows UI to configure or activate the network specified by |network_id|,
// which may include showing Payment or Portal UI when appropriate.
// |parent_window| is used to parent any configuration UI. If NULL a default
diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc
index 5801ce6..1a55f8a 100644
--- a/ash/system/tray/system_tray_notifier.cc
+++ b/ash/system/tray/system_tray_notifier.cc
@@ -53,14 +53,6 @@ void SystemTrayNotifier::RemoveClockObserver(ClockObserver* observer) {
clock_observers_.RemoveObserver(observer);
}
-void SystemTrayNotifier::AddDriveObserver(DriveObserver* observer) {
- drive_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveDriveObserver(DriveObserver* observer) {
- drive_observers_.RemoveObserver(observer);
-}
-
void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) {
ime_observers_.AddObserver(observer);
}
@@ -276,13 +268,6 @@ void SystemTrayNotifier::NotifySystemClockCanSetTimeChanged(bool can_set_time) {
OnSystemClockCanSetTimeChanged(can_set_time));
}
-void SystemTrayNotifier::NotifyDriveJobUpdated(
- const DriveOperationStatus& status) {
- FOR_EACH_OBSERVER(DriveObserver,
- drive_observers_,
- OnDriveJobUpdated(status));
-}
-
void SystemTrayNotifier::NotifyRefreshIME() {
FOR_EACH_OBSERVER(IMEObserver,
ime_observers_,
diff --git a/ash/system/tray/system_tray_notifier.h b/ash/system/tray/system_tray_notifier.h
index 6e6b03f..4015319 100644
--- a/ash/system/tray/system_tray_notifier.h
+++ b/ash/system/tray/system_tray_notifier.h
@@ -13,7 +13,6 @@
#include "ash/system/bluetooth/bluetooth_observer.h"
#include "ash/system/chromeos/tray_tracing.h"
#include "ash/system/date/clock_observer.h"
-#include "ash/system/drive/drive_observer.h"
#include "ash/system/ime/ime_observer.h"
#include "ash/system/locale/locale_observer.h"
#include "ash/system/tray_accessibility.h"
@@ -57,9 +56,6 @@ class ASH_EXPORT SystemTrayNotifier {
void AddClockObserver(ClockObserver* observer);
void RemoveClockObserver(ClockObserver* observer);
- void AddDriveObserver(DriveObserver* observer);
- void RemoveDriveObserver(DriveObserver* observer);
-
void AddIMEObserver(IMEObserver* observer);
void RemoveIMEObserver(IMEObserver* observer);
@@ -120,7 +116,6 @@ class ASH_EXPORT SystemTrayNotifier {
void NotifyDateFormatChanged();
void NotifySystemClockTimeUpdated();
void NotifySystemClockCanSetTimeChanged(bool can_set_time);
- void NotifyDriveJobUpdated(const DriveOperationStatus& status);
void NotifyRefreshIME();
void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
const std::string& cur_locale,
@@ -156,7 +151,6 @@ class ASH_EXPORT SystemTrayNotifier {
ObserverList<AudioObserver> audio_observers_;
ObserverList<BluetoothObserver> bluetooth_observers_;
ObserverList<ClockObserver> clock_observers_;
- ObserverList<DriveObserver> drive_observers_;
ObserverList<IMEObserver> ime_observers_;
ObserverList<LocaleObserver> locale_observers_;
ObserverList<TracingObserver> tracing_observers_;
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 1d26441..3ce1c25 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -10,6 +10,7 @@
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell_delegate.h"
#include "ash/system/tray/system_tray.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_item_view.h"
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 27e06ef..8d5ddf2 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -22,7 +22,6 @@
#include "ash/system/bluetooth/bluetooth_observer.h"
#include "ash/system/chromeos/session/logout_button_observer.h"
#include "ash/system/date/clock_observer.h"
-#include "ash/system/drive/drive_observer.h"
#include "ash/system/ime/ime_observer.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -48,8 +47,6 @@
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
#include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h"
-#include "chrome/browser/chromeos/drive/drive_integration_service.h"
-#include "chrome/browser/chromeos/drive/job_list.h"
#include "chrome/browser/chromeos/enrollment_dialog_view.h"
#include "chrome/browser/chromeos/events/system_key_event_listener.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
@@ -70,7 +67,6 @@
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/sim_dialog_delegate.h"
#include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
-#include "chrome/browser/drive/drive_service_interface.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
@@ -116,9 +112,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
-using drive::DriveIntegrationService;
-using drive::DriveIntegrationServiceFactory;
-
namespace chromeos {
namespace {
@@ -132,9 +125,6 @@ const int kSessionLengthLimitMaxMs = 24 * 60 * 60 * 1000; // 24 hours.
const char kDisplaySettingsSubPageName[] = "display";
const char kDisplayOverscanSettingsSubPageName[] = "displayOverscan";
-// The URL for the Google Drive settings page.
-const char kDriveSettingsPageURL[] = "https://drive.google.com";
-
void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime,
const input_method::InputMethodUtil& util,
ash::IMEInfo* info) {
@@ -156,58 +146,6 @@ gfx::NativeWindow GetNativeWindowByStatus(ash::user::LoginStatus login_status,
container_id);
}
-// Converts drive::JobInfo to ash::DriveOperationStatus.
-// If the job is not of type that ash tray is interested, returns false.
-bool ConvertToDriveOperationStatus(const drive::JobInfo& info,
- ash::DriveOperationStatus* status) {
- if (info.job_type == drive::TYPE_DOWNLOAD_FILE) {
- status->type = ash::DriveOperationStatus::OPERATION_DOWNLOAD;
- } else if (info.job_type == drive::TYPE_UPLOAD_NEW_FILE ||
- info.job_type == drive::TYPE_UPLOAD_EXISTING_FILE) {
- status->type = ash::DriveOperationStatus::OPERATION_UPLOAD;
- } else {
- return false;
- }
-
- if (info.state == drive::STATE_NONE)
- status->state = ash::DriveOperationStatus::OPERATION_NOT_STARTED;
- else
- status->state = ash::DriveOperationStatus::OPERATION_IN_PROGRESS;
-
- status->id = info.job_id;
- status->file_path = info.file_path;
- status->progress = info.num_total_bytes == 0 ? 0.0 :
- static_cast<double>(info.num_completed_bytes) /
- static_cast<double>(info.num_total_bytes);
- return true;
-}
-
-// Converts drive::JobInfo that has finished in |error| state
-// to ash::DriveOperationStatus.
-// If the job is not of type that ash tray is interested, returns false.
-bool ConvertToFinishedDriveOperationStatus(const drive::JobInfo& info,
- drive::FileError error,
- ash::DriveOperationStatus* status) {
- if (!ConvertToDriveOperationStatus(info, status))
- return false;
- status->state = (error == drive::FILE_ERROR_OK)
- ? ash::DriveOperationStatus::OPERATION_COMPLETED
- : ash::DriveOperationStatus::OPERATION_FAILED;
- return true;
-}
-
-// Converts a list of drive::JobInfo to a list of ash::DriveOperationStatusList.
-ash::DriveOperationStatusList ConvertToDriveStatusList(
- const std::vector<drive::JobInfo>& list) {
- ash::DriveOperationStatusList results;
- for (size_t i = 0; i < list.size(); ++i) {
- ash::DriveOperationStatus status;
- if (ConvertToDriveOperationStatus(list[i], &status))
- results.push_back(status);
- }
- return results;
-}
-
void BluetoothPowerFailure() {
// TODO(sad): Show an error bubble?
}
@@ -366,9 +304,6 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() {
BrowserList::RemoveObserver(this);
StopObservingAppWindowRegistry();
- // Stop observing Drive operations.
- UnobserveDriveUpdates();
-
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
@@ -531,17 +466,6 @@ bool SystemTrayDelegateChromeOS::ShouldShowDisplayNotification() {
visible_url != display_overscan_url);
}
-void SystemTrayDelegateChromeOS::ShowDriveSettings() {
- // TODO(tengs): Open the drive-specific settings page once we put it in.
- // For now just show Google Drive main page.
- chrome::ScopedTabbedBrowserDisplayer displayer(
- ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH);
- chrome::ShowSingletonTabOverwritingNTP(
- displayer.browser(),
- chrome::GetSingletonTabNavigateParams(displayer.browser(),
- GURL(kDriveSettingsPageURL)));
-}
-
void SystemTrayDelegateChromeOS::ShowIMESettings() {
content::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog"));
ShowSettingsSubPageForActiveUser(chrome::kLanguageOptionsSubPage);
@@ -789,24 +713,6 @@ void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) {
input_method::InputMethodManager::Get()->ActivateInputMethodMenuItem(key);
}
-void SystemTrayDelegateChromeOS::CancelDriveOperation(int32 operation_id) {
- DriveIntegrationService* integration_service = FindDriveIntegrationService();
- if (!integration_service)
- return;
-
- integration_service->job_list()->CancelJob(operation_id);
-}
-
-void SystemTrayDelegateChromeOS::GetDriveOperationStatusList(
- ash::DriveOperationStatusList* list) {
- DriveIntegrationService* integration_service = FindDriveIntegrationService();
- if (!integration_service)
- return;
-
- *list = ConvertToDriveStatusList(
- integration_service->job_list()->GetJobInfoList());
-}
-
void SystemTrayDelegateChromeOS::ShowNetworkConfigure(
const std::string& network_id,
gfx::NativeWindow parent_window) {
@@ -929,16 +835,12 @@ ash::SystemTrayNotifier* SystemTrayDelegateChromeOS::GetSystemTrayNotifier() {
}
void SystemTrayDelegateChromeOS::SetProfile(Profile* profile) {
- // Stop observing the Drive integration status and the AppWindowRegistry of
- // the current |user_profile_|.
- UnobserveDriveUpdates();
+ // Stop observing the AppWindowRegistry of the current |user_profile_|.
StopObservingAppWindowRegistry();
user_profile_ = profile;
- // Start observing the Drive integration status and the AppWindowRegistry of
- // the newly set |user_profile_|.
- ObserveDriveUpdates();
+ // Start observing the AppWindowRegistry of the newly set |user_profile_|.
apps::AppWindowRegistry::Get(user_profile_)->AddObserver(this);
PrefService* prefs = profile->GetPrefs();
@@ -996,18 +898,6 @@ bool SystemTrayDelegateChromeOS::UnsetProfile(Profile* profile) {
return true;
}
-void SystemTrayDelegateChromeOS::ObserveDriveUpdates() {
- DriveIntegrationService* integration_service = FindDriveIntegrationService();
- if (integration_service)
- integration_service->job_list()->AddObserver(this);
-}
-
-void SystemTrayDelegateChromeOS::UnobserveDriveUpdates() {
- DriveIntegrationService* integration_service = FindDriveIntegrationService();
- if (integration_service)
- integration_service->job_list()->RemoveObserver(this);
-}
-
bool SystemTrayDelegateChromeOS::GetShouldUse24HourClockForTesting() const {
return ShouldUse24HourClock();
}
@@ -1282,31 +1172,6 @@ void SystemTrayDelegateChromeOS::OnActiveInputNodeChanged() {
GetSystemTrayNotifier()->NotifyAudioActiveInputNodeChanged();
}
-// drive::JobListObserver overrides.
-void SystemTrayDelegateChromeOS::OnJobAdded(const drive::JobInfo& job_info) {
- OnJobUpdated(job_info);
-}
-
-void SystemTrayDelegateChromeOS::OnJobDone(const drive::JobInfo& job_info,
- drive::FileError error) {
- ash::DriveOperationStatus status;
- if (ConvertToFinishedDriveOperationStatus(job_info, error, &status))
- GetSystemTrayNotifier()->NotifyDriveJobUpdated(status);
-}
-
-void SystemTrayDelegateChromeOS::OnJobUpdated(const drive::JobInfo& job_info) {
- ash::DriveOperationStatus status;
- if (ConvertToDriveOperationStatus(job_info, &status))
- GetSystemTrayNotifier()->NotifyDriveJobUpdated(status);
-}
-
-DriveIntegrationService*
-SystemTrayDelegateChromeOS::FindDriveIntegrationService() {
- return user_profile_
- ? DriveIntegrationServiceFactory::FindForProfile(user_profile_)
- : NULL;
-}
-
// Overridden from BluetoothAdapter::Observer.
void SystemTrayDelegateChromeOS::AdapterPresentChanged(
device::BluetoothAdapter* adapter,
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
index 742a7cc..6aafa9a 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
@@ -18,8 +18,6 @@
#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
-#include "chrome/browser/chromeos/drive/drive_integration_service.h"
-#include "chrome/browser/chromeos/drive/job_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
#include "chrome/browser/ui/browser_list_observer.h"
@@ -39,7 +37,6 @@ class SystemTrayDelegateChromeOS
: public ash::ime::InputMethodMenuManager::Observer,
public ash::SystemTrayDelegate,
public SessionManagerClient::Observer,
- public drive::JobListObserver,
public content::NotificationObserver,
public input_method::InputMethodManager::Observer,
public chromeos::LoginState::Observer,
@@ -79,7 +76,6 @@ class SystemTrayDelegateChromeOS
virtual void ShowDisplaySettings() OVERRIDE;
virtual void ShowChromeSlow() OVERRIDE;
virtual bool ShouldShowDisplayNotification() OVERRIDE;
- virtual void ShowDriveSettings() OVERRIDE;
virtual void ShowIMESettings() OVERRIDE;
virtual void ShowHelp() OVERRIDE;
virtual void ShowAccessibilityHelp() OVERRIDE;
@@ -106,9 +102,6 @@ class SystemTrayDelegateChromeOS
virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE;
virtual void SwitchIME(const std::string& ime_id) OVERRIDE;
virtual void ActivateIMEProperty(const std::string& key) OVERRIDE;
- virtual void CancelDriveOperation(int32 operation_id) OVERRIDE;
- virtual void GetDriveOperationStatusList(ash::DriveOperationStatusList* list)
- OVERRIDE;
virtual void ShowNetworkConfigure(const std::string& network_id,
gfx::NativeWindow parent_window) OVERRIDE;
virtual bool EnrollNetwork(const std::string& network_id,
@@ -151,10 +144,6 @@ class SystemTrayDelegateChromeOS
bool UnsetProfile(Profile* profile);
- void ObserveDriveUpdates();
-
- void UnobserveDriveUpdates();
-
bool ShouldUse24HourClock() const;
void UpdateClockType();
@@ -211,16 +200,6 @@ class SystemTrayDelegateChromeOS
virtual void OnActiveOutputNodeChanged() OVERRIDE;
virtual void OnActiveInputNodeChanged() OVERRIDE;
- // drive::JobListObserver overrides.
- virtual void OnJobAdded(const drive::JobInfo& job_info) OVERRIDE;
-
- virtual void OnJobDone(const drive::JobInfo& job_info,
- drive::FileError error) OVERRIDE;
-
- virtual void OnJobUpdated(const drive::JobInfo& job_info) OVERRIDE;
-
- drive::DriveIntegrationService* FindDriveIntegrationService();
-
// Overridden from BluetoothAdapter::Observer.
virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter,
bool present) OVERRIDE;
diff --git a/chrome/browser/ui/ash/system_tray_delegate_linux.cc b/chrome/browser/ui/ash/system_tray_delegate_linux.cc
index db5e813..756cb3e 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_linux.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_linux.cc
@@ -123,9 +123,6 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate,
return false;
}
- virtual void ShowDriveSettings() OVERRIDE {
- }
-
virtual void ShowIMESettings() OVERRIDE {
}
@@ -212,13 +209,6 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate,
virtual void ActivateIMEProperty(const std::string& key) OVERRIDE {
}
- virtual void CancelDriveOperation(int32 operation_id) OVERRIDE {
- }
-
- virtual void GetDriveOperationStatusList(
- ash::DriveOperationStatusList* list) OVERRIDE {
- }
-
virtual void ShowNetworkConfigure(const std::string& network_id,
gfx::NativeWindow parent_window) OVERRIDE {
}
diff --git a/chrome/browser/ui/ash/system_tray_delegate_win.cc b/chrome/browser/ui/ash/system_tray_delegate_win.cc
index 0dbaa63..eef9cbe 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_win.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_win.cc
@@ -121,9 +121,6 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate,
return false;
}
- virtual void ShowDriveSettings() OVERRIDE {
- }
-
virtual void ShowIMESettings() OVERRIDE {
}
@@ -210,13 +207,6 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate,
virtual void ActivateIMEProperty(const std::string& key) OVERRIDE {
}
- virtual void CancelDriveOperation(int32 operation_id) OVERRIDE {
- }
-
- virtual void GetDriveOperationStatusList(
- ash::DriveOperationStatusList* list) OVERRIDE {
- }
-
virtual void ShowNetworkConfigure(const std::string& network_id,
gfx::NativeWindow parent_window) OVERRIDE {
}