summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 22:37:43 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 22:37:43 +0000
commita6d8d8146111683fb1e9a399ad3cd04cfdaba40b (patch)
tree0fcf4137c56a2017e431f2fde6df602dee502b9b
parent2d531a22a4929c86b20a5fe7bfdc3f037d661a8f (diff)
downloadchromium_src-a6d8d8146111683fb1e9a399ad3cd04cfdaba40b.zip
chromium_src-a6d8d8146111683fb1e9a399ad3cd04cfdaba40b.tar.gz
chromium_src-a6d8d8146111683fb1e9a399ad3cd04cfdaba40b.tar.bz2
Move status_bubble_touch.{cc.h} into views/ directory.
BUG=125846 R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10391149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137277 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/touch/status_bubble_touch.cc37
-rw-r--r--chrome/browser/ui/touch/status_bubble_touch.h31
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc8
-rw-r--r--chrome/chrome_browser.gypi3
4 files changed, 0 insertions, 79 deletions
diff --git a/chrome/browser/ui/touch/status_bubble_touch.cc b/chrome/browser/ui/touch/status_bubble_touch.cc
deleted file mode 100644
index 8604c1d..0000000
--- a/chrome/browser/ui/touch/status_bubble_touch.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2011 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 "chrome/browser/ui/touch/status_bubble_touch.h"
-
-#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
-
-StatusBubbleTouch::StatusBubbleTouch(views::View* base_view)
- : StatusBubbleViews(base_view) {
- VirtualKeyboardManager::GetInstance()->keyboard()->AddObserver(this);
-}
-
-StatusBubbleTouch::~StatusBubbleTouch() {
- views::Widget* keyboard = VirtualKeyboardManager::GetInstance()->keyboard();
- if (keyboard)
- keyboard->RemoveObserver(this);
-}
-
-void StatusBubbleTouch::Reposition() {
- StatusBubbleViews::Reposition();
- views::Widget* keyboard = VirtualKeyboardManager::GetInstance()->keyboard();
- if (popup() && keyboard && keyboard->IsVisible()) {
- gfx::Rect popup_screen = popup()->GetWindowScreenBounds();
- gfx::Rect keyboard_screen = keyboard->GetWindowScreenBounds();
- if (popup_screen.Intersects(keyboard_screen)) {
- // The keyboard may be hiding the popup. Reposition above the keyboard.
- popup_screen.set_y(keyboard_screen.y() - popup_screen.height());
- popup()->SetBounds(popup_screen);
- }
- }
-}
-
-void StatusBubbleTouch::OnWidgetVisibilityChanged(views::Widget* widget,
- bool visible) {
- Reposition();
-}
diff --git a/chrome/browser/ui/touch/status_bubble_touch.h b/chrome/browser/ui/touch/status_bubble_touch.h
deleted file mode 100644
index 15fc1f1..0000000
--- a/chrome/browser/ui/touch/status_bubble_touch.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2011 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 CHROME_BROWSER_UI_TOUCH_STATUS_BUBBLE_TOUCH_H_
-#define CHROME_BROWSER_UI_TOUCH_STATUS_BUBBLE_TOUCH_H_
-#pragma once
-
-#include "chrome/browser/ui/views/status_bubble_views.h"
-#include "ui/views/widget/widget.h"
-
-// The touch version of the status bubble. This repositions itself as the
-// keyboard slides up/down.
-class StatusBubbleTouch : public StatusBubbleViews,
- public views::Widget::Observer {
- public:
- explicit StatusBubbleTouch(views::View* base_view);
- virtual ~StatusBubbleTouch();
-
- private:
- // Overridden from StatusBubbleViews.
- virtual void Reposition() OVERRIDE;
-
- // Overridden from views::Widget::Observer.
- virtual void OnWidgetVisibilityChanged(views::Widget* widget,
- bool visible) OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(StatusBubbleTouch);
-};
-
-#endif // CHROME_BROWSER_UI_TOUCH_STATUS_BUBBLE_TOUCH_H_
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index b65d8ce..2827d6e 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -123,10 +123,6 @@
#include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h"
#endif
-#if defined(USE_VIRTUAL_KEYBOARD)
-#include "chrome/browser/ui/touch/status_bubble_touch.h"
-#endif
-
using base::TimeDelta;
using content::SSLStatus;
using content::UserMetricsAction;
@@ -1815,11 +1811,7 @@ void BrowserView::Init() {
AddChildView(contents_split_);
set_contents_view(contents_split_);
-#if defined(USE_VIRTUAL_KEYBOARD)
- status_bubble_.reset(new StatusBubbleTouch(contents_));
-#else
status_bubble_.reset(new StatusBubbleViews(contents_));
-#endif
#if defined(OS_WIN) && !defined(USE_AURA)
// Create a custom JumpList and add it to an observer of TabRestoreService
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index ec1da5e..27ea9f9 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3241,8 +3241,6 @@
'browser/ui/toolbar/toolbar_model_delegate.h',
'browser/ui/toolbar/wrench_menu_model.cc',
'browser/ui/toolbar/wrench_menu_model.h',
- 'browser/ui/touch/status_bubble_touch.cc',
- 'browser/ui/touch/status_bubble_touch.h',
'browser/ui/uninstall_browser_prompt.h',
'browser/ui/user_data_dir_dialog.h',
'browser/ui/view_ids.h',
@@ -4379,7 +4377,6 @@
['use_virtual_keyboard==0', {
'sources/': [
['exclude', '^browser/chromeos/input_method/virtual_keyboard_selector.*'],
- ['exclude', '^browser/ui/touch/status_bubble_touch.*'],
['exclude', '^browser/ui/virtual_keyboard/*'],
['exclude', '^browser/ui/webui/keyboard_ui.*'],
['exclude', '^browser/ui/webui/options2/chromeos/virtual_keyboard_manager_handler2.*'],