summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/toolbar_view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:51:20 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:51:20 +0000
commita0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (patch)
treed8283a980977f11c43542016d57f698d3a83b73d /chrome/browser/views/toolbar_view.cc
parent933cc00eb856db684b9e64b7486ca20edbb2c3ea (diff)
downloadchromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.zip
chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.gz
chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.bz2
Rename Container->Widget
R=erg review url = http://codereview.chromium.org/11348/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/toolbar_view.cc')
-rw-r--r--chrome/browser/views/toolbar_view.cc28
1 files changed, 13 insertions, 15 deletions
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 1b56e84..ad3d8d0 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -34,12 +34,12 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
-#include "chrome/views/container.h"
+#include "chrome/views/background.h"
#include "chrome/views/button_dropdown.h"
#include "chrome/views/hwnd_view.h"
-#include "chrome/views/background.h"
#include "chrome/views/label.h"
#include "chrome/views/tooltip_manager.h"
+#include "chrome/views/widget.h"
#include "net/base/net_util.h"
#include "chromium_strings.h"
@@ -341,16 +341,14 @@ void BrowserToolbarView::DidGainFocus() {
acc_focused_view_->SetHotTracked(true);
// Show the tooltip for the view that got the focus.
- if (GetContainer()->GetTooltipManager()) {
- GetContainer()->GetTooltipManager()->
- ShowKeyboardTooltip(acc_focused_view_);
- }
+ if (GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->ShowKeyboardTooltip(acc_focused_view_);
// Update focused_view with MSAA-adjusted child id.
view_index = acc_focused_view_->GetID();
}
- HWND hwnd = GetContainer()->GetHWND();
+ HWND hwnd = GetWidget()->GetHWND();
// Notify Access Technology that there was a change in keyboard focus.
::NotifyWinEvent(EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT,
@@ -361,8 +359,8 @@ void BrowserToolbarView::WillLoseFocus() {
// Resetting focus state.
acc_focused_view_->SetHotTracked(false);
// Any tooltips that are active should be hidden when toolbar loses focus.
- if (GetContainer() && GetContainer()->GetTooltipManager())
- GetContainer()->GetTooltipManager()->HideKeyboardTooltip();
+ if (GetWidget() && GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->HideKeyboardTooltip();
acc_focused_view_ = NULL;
}
@@ -388,8 +386,8 @@ bool BrowserToolbarView::OnKeyPressed(const views::KeyEvent& e) {
acc_focused_view_->GetID() == VIEW_ID_APP_MENU) {
// If a menu button in toolbar is activated and its menu is displayed,
// then active tooltip should be hidden.
- if (GetContainer()->GetTooltipManager())
- GetContainer()->GetTooltipManager()->HideKeyboardTooltip();
+ if (GetWidget()->GetTooltipManager())
+ GetWidget()->GetTooltipManager()->HideKeyboardTooltip();
// Safe to cast, given to above view id check.
static_cast<views::MenuButton*>(acc_focused_view_)->Activate();
if (!acc_focused_view_) {
@@ -422,11 +420,11 @@ bool BrowserToolbarView::OnKeyPressed(const views::KeyEvent& e) {
// Retrieve information to generate an MSAA focus event.
int view_id = acc_focused_view_->GetID();
- HWND hwnd = GetContainer()->GetHWND();
+ HWND hwnd = GetWidget()->GetHWND();
// Show the tooltip for the view that got the focus.
- if (GetContainer()->GetTooltipManager()) {
- GetContainer()->GetTooltipManager()->
+ if (GetWidget()->GetTooltipManager()) {
+ GetWidget()->GetTooltipManager()->
ShowKeyboardTooltip(GetChildViewAt(next_view));
}
// Notify Access Technology that there was a change in keyboard focus.
@@ -717,6 +715,6 @@ bool BrowserToolbarView::GetAcceleratorInfo(int id,
return true;
}
// Else, we retrieve the accelerator information from the frame.
- return GetContainer()->GetAccelerator(id, accel);
+ return GetWidget()->GetAccelerator(id, accel);
}