summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 16:48:23 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 16:48:23 +0000
commita7488a134b0b011c8724ccca6d6f16a549a561e0 (patch)
tree02248ca3a406edee5ff7d346b30cd20125003456 /views/window
parent512ac40edc7551c76bbd9bf288afee209f6bba15 (diff)
downloadchromium_src-a7488a134b0b011c8724ccca6d6f16a549a561e0.zip
chromium_src-a7488a134b0b011c8724ccca6d6f16a549a561e0.tar.gz
chromium_src-a7488a134b0b011c8724ccca6d6f16a549a561e0.tar.bz2
Updated remaining button to text button. Reverted the interposed
class NativeButtonBase which is no longer needed. BUG=none TEST=none Review URL: http://codereview.chromium.org/7218035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/dialog_client_view.cc18
-rw-r--r--views/window/dialog_client_view.h16
-rw-r--r--views/window/dialog_delegate.cc4
3 files changed, 19 insertions, 19 deletions
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index b17f370..583443f 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -21,7 +21,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/font.h"
-#include "views/controls/button/native_button.h"
+#include "views/controls/button/text_button.h"
#include "views/layout/layout_constants.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
@@ -42,7 +42,7 @@ namespace views {
namespace {
// Updates any of the standard buttons according to the delegate.
-void UpdateButtonHelper(NativeButton* button_view,
+void UpdateButtonHelper(NativeTextButton* button_view,
DialogDelegate* delegate,
MessageBoxFlags::DialogButton button) {
std::wstring label = delegate->GetDialogButtonLabel(button);
@@ -65,14 +65,14 @@ void FillViewWithSysColor(gfx::Canvas* canvas, View* view, COLORREF color) {
// DialogButtons is used for the ok/cancel buttons of the window. DialogButton
// forwards AcceleratorPressed to the delegate.
-class DialogButton : public NativeButton {
+class DialogButton : public NativeTextButton {
public:
DialogButton(ButtonListener* listener,
Widget* owner,
MessageBoxFlags::DialogButton type,
const std::wstring& title,
bool is_default)
- : NativeButton(listener, title),
+ : NativeTextButton(listener, title),
owner_(owner),
type_(type) {
SetIsDefault(is_default);
@@ -84,7 +84,7 @@ class DialogButton : public NativeButton {
AreAcceleratorsEnabled(type_)) {
return false;
}
- return NativeButton::AcceleratorPressed(accelerator);
+ return NativeTextButton::AcceleratorPressed(accelerator);
}
private:
@@ -177,7 +177,7 @@ void DialogClientView::ShowDialogButtons() {
}
}
-void DialogClientView::SetDefaultButton(NativeButton* new_default_button) {
+void DialogClientView::SetDefaultButton(NativeTextButton* new_default_button) {
if (default_button_ && default_button_ != new_default_button) {
default_button_->SetIsDefault(false);
default_button_ = NULL;
@@ -191,10 +191,10 @@ void DialogClientView::SetDefaultButton(NativeButton* new_default_button) {
void DialogClientView::FocusWillChange(View* focused_before,
View* focused_now) {
- NativeButton* new_default_button = NULL;
+ NativeTextButton* new_default_button = NULL;
if (focused_now &&
- focused_now->GetClassName() == NativeButton::kViewClassName) {
- new_default_button = static_cast<NativeButton*>(focused_now);
+ focused_now->GetClassName() == NativeTextButton::kViewClassName) {
+ new_default_button = static_cast<NativeTextButton*>(focused_now);
} else {
// The focused view is not a button, get the default button from the
// delegate.
diff --git a/views/window/dialog_client_view.h b/views/window/dialog_client_view.h
index ad72e77..615cd50 100644
--- a/views/window/dialog_client_view.h
+++ b/views/window/dialog_client_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
@@ -14,7 +14,7 @@
namespace views {
class DialogDelegate;
-class NativeButton;
+class NativeTextButton;
class Widget;
namespace internal {
class RootView;
@@ -54,8 +54,8 @@ class DialogClientView : public ClientView,
void CancelWindow();
// Accessors in case the user wishes to adjust these buttons.
- NativeButton* ok_button() const { return ok_button_; }
- NativeButton* cancel_button() const { return cancel_button_; }
+ NativeTextButton* ok_button() const { return ok_button_; }
+ NativeTextButton* cancel_button() const { return cancel_button_; }
// Sets the view that is positioned along the bottom of the buttons. The
// bottom view is positioned beneath the buttons at the full width of the
@@ -107,7 +107,7 @@ class DialogClientView : public ClientView,
void LayoutContentsView();
// Makes the specified button the default button.
- void SetDefaultButton(NativeButton* button);
+ void SetDefaultButton(NativeTextButton* button);
bool has_dialog_buttons() const { return ok_button_ || cancel_button_; }
@@ -126,11 +126,11 @@ class DialogClientView : public ClientView,
static void InitClass();
// The dialog buttons.
- NativeButton* ok_button_;
- NativeButton* cancel_button_;
+ NativeTextButton* ok_button_;
+ NativeTextButton* cancel_button_;
// The button that is currently the default button if any.
- NativeButton* default_button_;
+ NativeTextButton* default_button_;
// The button-level extra view, NULL unless the dialog delegate supplies one.
View* extra_view_;
diff --git a/views/window/dialog_delegate.cc b/views/window/dialog_delegate.cc
index 13ff590..0d8f680 100644
--- a/views/window/dialog_delegate.cc
+++ b/views/window/dialog_delegate.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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 "views/window/dialog_delegate.h"
#include "base/logging.h"
-#include "views/controls/button/native_button.h"
+#include "views/controls/button/text_button.h"
#include "views/widget/widget.h"
namespace views {