Commit 7913d649 authored by tfarina@chromium.org's avatar tfarina@chromium.org

views/examples: Pure pedantic change.

No need of views:: while already inside views namespace. Using views:: is
incosistent, as at other places in examples we don't use it.

R=sky@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10824016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148904 0039d316-1c4b-4281-b951-d872f2087c98
parent 98599120
......@@ -32,15 +32,17 @@ namespace views {
namespace examples {
namespace {
class ExamplesViewsDelegate : public views::TestViewsDelegate {
class ExamplesViewsDelegate : public TestViewsDelegate {
public:
#if defined(USE_AURA)
virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper(
views::NativeWidgetAura* native_widget) OVERRIDE {
return new views::DesktopNativeWidgetHelperAura(native_widget);
virtual NativeWidgetHelperAura* CreateNativeWidgetHelper(
NativeWidgetAura* native_widget) OVERRIDE {
return new DesktopNativeWidgetHelperAura(native_widget);
}
#endif
};
} // namespace
ExamplesBrowserMainParts::ExamplesBrowserMainParts(
......@@ -60,8 +62,7 @@ void ExamplesBrowserMainParts::PreMainMessageLoopRun() {
#endif
views_delegate_.reset(new ExamplesViewsDelegate);
views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE,
browser_context_.get());
ShowExamplesWindow(QUIT_ON_CLOSE, browser_context_.get());
}
void ExamplesBrowserMainParts::PostMainMessageLoopRun() {
......@@ -76,7 +77,7 @@ void ExamplesBrowserMainParts::PostMainMessageLoopRun() {
bool ExamplesBrowserMainParts::MainMessageLoopRun(int* result_code) {
// xxx: Hax here because this kills event handling.
#if !defined(USE_AURA)
views::AcceleratorHandler accelerator_handler;
AcceleratorHandler accelerator_handler;
base::RunLoop run_loop(&accelerator_handler);
#else
base::RunLoop run_loop;
......
......@@ -16,13 +16,13 @@ class StackingClient;
}
namespace content {
class ShellBrowserContext;
struct MainFunctionParams;
}
namespace views {
class ViewsDelegate;
namespace examples {
class ExamplesBrowserMainParts : public content::BrowserMainParts {
......@@ -43,7 +43,7 @@ class ExamplesBrowserMainParts : public content::BrowserMainParts {
private:
scoped_ptr<content::ShellBrowserContext> browser_context_;
scoped_ptr<views::ViewsDelegate> views_delegate_;
scoped_ptr<ViewsDelegate> views_delegate_;
#if defined(USE_AURA)
scoped_ptr<aura::client::StackingClient> stacking_client_;
#endif
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// 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.
......@@ -7,17 +7,20 @@
#include "ui/views/controls/single_split_view.h"
#include "ui/views/layout/grid_layout.h"
namespace views {
namespace examples {
namespace {
// DoubleSplitViews's content, which draws gradient color on background.
class SplittedView : public views::View {
class SplittedView : public View {
public:
SplittedView();
virtual ~SplittedView();
void SetColor(SkColor from, SkColor to);
// Overridden from views::View.
// Overridden from View.
virtual gfx::Size GetMinimumSize() OVERRIDE;
private:
......@@ -32,8 +35,7 @@ SplittedView::~SplittedView() {
}
void SplittedView::SetColor(SkColor from, SkColor to) {
set_background(
views::Background::CreateVerticalGradientBackground(from, to));
set_background(Background::CreateVerticalGradientBackground(from, to));
}
gfx::Size SplittedView::GetMinimumSize() {
......@@ -42,9 +44,6 @@ gfx::Size SplittedView::GetMinimumSize() {
} // namespace
namespace views {
namespace examples {
DoubleSplitViewExample::DoubleSplitViewExample()
: ExampleBase("Double Split View") {
}
......
......@@ -190,8 +190,8 @@ void ExampleMenuButton::OnMenuButtonClicked(View* source,
menu_runner_.reset(new MenuRunner(menu_model_adapter.CreateMenu()));
if (menu_runner_->RunMenuAt(source->GetWidget()->GetTopLevelWidget(), this,
gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPRIGHT,
views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED)
gfx::Rect(point, gfx::Size()), MenuItemView::TOPRIGHT,
MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED)
return;
}
......
......@@ -36,7 +36,7 @@ void SliderExample::CreateExampleView(View* container) {
void SliderExample::SliderValueChanged(Slider* sender,
float value,
float old_value,
views::SliderChangeReason reason) {
SliderChangeReason reason) {
label_->SetText(ASCIIToUTF16(base::StringPrintf("%.3lf", value)));
}
......
......@@ -28,7 +28,7 @@ class SliderExample : public ExampleBase, public SliderListener {
virtual void SliderValueChanged(Slider* sender,
float value,
float old_value,
views::SliderChangeReason reason) OVERRIDE;
SliderChangeReason reason) OVERRIDE;
Slider* slider_;
Label* label_;
......
......@@ -14,6 +14,9 @@
#include "ui/views/layout/grid_layout.h"
#include "ui/views/view.h"
namespace views {
namespace examples {
namespace {
// Number of columns in the view layout.
......@@ -73,7 +76,7 @@ const char* kVerticalAlignments[] = {
};
// Toggles bit |flag| on |flags| based on state of |checkbox|.
void SetFlagFromCheckbox(views::Checkbox* checkbox, int* flags, int flag) {
void SetFlagFromCheckbox(Checkbox* checkbox, int* flags, int flag) {
if (checkbox->checked())
*flags |= flag;
else
......@@ -82,9 +85,6 @@ void SetFlagFromCheckbox(views::Checkbox* checkbox, int* flags, int flag) {
} // namespace
namespace views {
namespace examples {
// TextExample's content view, which is responsible for drawing a string with
// the specified style.
class TextExample::TextExampleView : public View {
......@@ -202,7 +202,7 @@ Combobox* TextExample::AddCombobox(GridLayout* layout,
void TextExample::CreateExampleView(View* container) {
text_view_ = new TextExampleView;
text_view_->set_border(views::Border::CreateSolidBorder(1, SK_ColorGRAY));
text_view_->set_border(Border::CreateSolidBorder(1, SK_ColorGRAY));
GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// 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.
......@@ -19,8 +19,8 @@ namespace examples {
// TextfieldExample mimics login screen.
class TextfieldExample : public ExampleBase,
public views::TextfieldController,
public views::ButtonListener {
public TextfieldController,
public ButtonListener {
public:
TextfieldExample();
virtual ~TextfieldExample();
......
......@@ -128,11 +128,11 @@ void TreeViewExample::ShowContextMenuForView(View* source,
context_menu_model.AddItem(ID_EDIT, ASCIIToUTF16("Edit"));
context_menu_model.AddItem(ID_REMOVE, ASCIIToUTF16("Remove"));
context_menu_model.AddItem(ID_ADD, ASCIIToUTF16("Add"));
views::MenuModelAdapter menu_adapter(&context_menu_model);
context_menu_runner_.reset(new views::MenuRunner(menu_adapter.CreateMenu()));
MenuModelAdapter menu_adapter(&context_menu_model);
context_menu_runner_.reset(new MenuRunner(menu_adapter.CreateMenu()));
if (context_menu_runner_->RunMenuAt(source->GetWidget(), NULL,
gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, 0) ==
views::MenuRunner::MENU_DELETED)
gfx::Rect(point, gfx::Size()), MenuItemView::TOPLEFT, 0) ==
MenuRunner::MENU_DELETED)
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment