summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 22:07:12 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 22:07:12 +0000
commiteddb2a80e8adc00bf71460ea9004635e801e4fa2 (patch)
tree138ad8dad59888a49240f16c16606f67cc946cbf /chrome
parent8b9765e56dfddf33374bfc14dcc5f9c954d60cdd (diff)
downloadchromium_src-eddb2a80e8adc00bf71460ea9004635e801e4fa2.zip
chromium_src-eddb2a80e8adc00bf71460ea9004635e801e4fa2.tar.gz
chromium_src-eddb2a80e8adc00bf71460ea9004635e801e4fa2.tar.bz2
WebUI: Rename NativeMenuDOMUI to NativeMenuWebUI.
BUG=59945 TEST=trybots Review URL: http://codereview.chromium.org/6368093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/dom_ui/menu_ui.cc4
-rw-r--r--chrome/browser/chromeos/dom_ui/network_menu_ui.cc10
-rw-r--r--chrome/browser/chromeos/dom_ui/wrench_menu_ui.cc4
-rw-r--r--chrome/browser/chromeos/views/native_menu_webui.cc (renamed from chrome/browser/chromeos/views/native_menu_domui.cc)100
-rw-r--r--chrome/browser/chromeos/views/native_menu_webui.h (renamed from chrome/browser/chromeos/views/native_menu_domui.h)24
-rw-r--r--chrome/browser/chromeos/views/webui_menu_widget.cc24
-rw-r--r--chrome/browser/chromeos/views/webui_menu_widget.h12
-rw-r--r--chrome/chrome_browser.gypi4
8 files changed, 91 insertions, 91 deletions
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.cc b/chrome/browser/chromeos/dom_ui/menu_ui.cc
index 2a5678f..24f0204 100644
--- a/chrome/browser/chromeos/dom_ui/menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/menu_ui.cc
@@ -17,7 +17,7 @@
#include "base/values.h"
#include "base/weak_ptr.h"
#include "chrome/browser/browser_thread.h"
-#include "chrome/browser/chromeos/views/native_menu_domui.h"
+#include "chrome/browser/chromeos/views/native_menu_webui.h"
#include "chrome/browser/chromeos/views/webui_menu_widget.h"
#include "chrome/browser/dom_ui/web_ui_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -508,7 +508,7 @@ chromeos::WebUIMenuControl* MenuHandlerBase::GetMenuControl() {
chromeos::WebUIMenuWidget::FindWebUIMenuWidget(
dom_ui_->tab_contents()->GetNativeView());
if (widget)
- return widget->domui_menu(); // NativeMenuDOMUI implements WebUIMenuControl
+ return widget->webui_menu(); // NativeMenuWebUI implements WebUIMenuControl
else
return NULL;
}
diff --git a/chrome/browser/chromeos/dom_ui/network_menu_ui.cc b/chrome/browser/chromeos/dom_ui/network_menu_ui.cc
index 7140dcb..e80c04ae 100644
--- a/chrome/browser/chromeos/dom_ui/network_menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/network_menu_ui.cc
@@ -10,7 +10,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/chromeos/status/network_menu.h"
-#include "chrome/browser/chromeos/views/native_menu_domui.h"
+#include "chrome/browser/chromeos/views/native_menu_webui.h"
#include "chrome/browser/chromeos/views/webui_menu_widget.h"
#include "chrome/browser/dom_ui/web_ui_theme_source.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -80,9 +80,9 @@ void NetworkMenuHandler::HandleAction(const ListValue* values) {
= chromeos::WebUIMenuWidget::FindWebUIMenuWidget(
dom_ui_->tab_contents()->GetNativeView());
if (widget) {
- chromeos::NativeMenuDOMUI* domui_menu = widget->domui_menu();
- if (domui_menu)
- domui_menu->Hide();
+ chromeos::NativeMenuWebUI* webui_menu = widget->webui_menu();
+ if (webui_menu)
+ webui_menu->Hide();
}
}
}
@@ -194,7 +194,7 @@ DictionaryValue* NetworkMenuUI::CreateMenuItem(const ui::MenuModel* model,
views::Menu2* NetworkMenuUI::CreateMenu2(ui::MenuModel* model) {
views::Menu2* menu = new views::Menu2(model);
- NativeMenuDOMUI::SetMenuURL(
+ NativeMenuWebUI::SetMenuURL(
menu, GURL(StringPrintf("chrome://%s", chrome::kChromeUINetworkMenu)));
return menu;
}
diff --git a/chrome/browser/chromeos/dom_ui/wrench_menu_ui.cc b/chrome/browser/chromeos/dom_ui/wrench_menu_ui.cc
index 9a1c35c..7bff31e 100644
--- a/chrome/browser/chromeos/dom_ui/wrench_menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/wrench_menu_ui.cc
@@ -11,7 +11,7 @@
#include "base/weak_ptr.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_list.h"
-#include "chrome/browser/chromeos/views/native_menu_domui.h"
+#include "chrome/browser/chromeos/views/native_menu_webui.h"
#include "chrome/browser/chromeos/views/webui_menu_widget.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/ui/browser.h"
@@ -106,7 +106,7 @@ void WrenchMenuUI::UpdateZoomControls() {
views::Menu2* WrenchMenuUI::CreateMenu2(ui::MenuModel* model) {
views::Menu2* menu = new views::Menu2(model);
- NativeMenuDOMUI::SetMenuURL(
+ NativeMenuWebUI::SetMenuURL(
menu, GURL(StringPrintf("chrome://%s", chrome::kChromeUIWrenchMenu)));
return menu;
}
diff --git a/chrome/browser/chromeos/views/native_menu_domui.cc b/chrome/browser/chromeos/views/native_menu_webui.cc
index 129f34d..4e0ba98 100644
--- a/chrome/browser/chromeos/views/native_menu_domui.cc
+++ b/chrome/browser/chromeos/views/native_menu_webui.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/views/native_menu_domui.h"
+#include "chrome/browser/chromeos/views/native_menu_webui.h"
#include <string>
@@ -30,7 +30,7 @@
namespace {
-using chromeos::NativeMenuDOMUI;
+using chromeos::NativeMenuWebUI;
using chromeos::WebUIMenuWidget;
// Returns true if the menu item type specified can be executed as a command.
@@ -42,10 +42,10 @@ bool MenuTypeCanExecute(ui::MenuModel::ItemType type) {
gboolean Destroy(GtkWidget* widget, gpointer data) {
WebUIMenuWidget* menu_widget = static_cast<WebUIMenuWidget*>(data);
- NativeMenuDOMUI* domui_menu = menu_widget->domui_menu();
- // domui_menu can be NULL if widget is destroyed by signal.
- if (domui_menu)
- domui_menu->Hide();
+ NativeMenuWebUI* webui_menu = menu_widget->webui_menu();
+ // webui_menu can be NULL if widget is destroyed by signal.
+ if (webui_menu)
+ webui_menu->Hide();
return true;
}
@@ -63,14 +63,14 @@ gfx::NativeWindow FindActiveToplevelWindow() {
}
// Currently opened menu. See RunMenuAt for reason why we need this.
-NativeMenuDOMUI* current_ = NULL;
+NativeMenuWebUI* current_ = NULL;
} // namespace
namespace chromeos {
// static
-void NativeMenuDOMUI::SetMenuURL(views::Menu2* menu2, const GURL& url) {
+void NativeMenuWebUI::SetMenuURL(views::Menu2* menu2, const GURL& url) {
// No-op if DOMUI menu is disabled.
if (!MenuUI::IsEnabled())
return;
@@ -79,13 +79,13 @@ void NativeMenuDOMUI::SetMenuURL(views::Menu2* menu2, const GURL& url) {
DCHECK(native);
WebUIMenuWidget* widget = WebUIMenuWidget::FindWebUIMenuWidget(native);
DCHECK(widget);
- widget->domui_menu()->set_menu_url(url);
+ widget->webui_menu()->set_menu_url(url);
}
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, public:
+// NativeMenuWebUI, public:
-NativeMenuDOMUI::NativeMenuDOMUI(ui::MenuModel* menu_model, bool root)
+NativeMenuWebUI::NativeMenuWebUI(ui::MenuModel* menu_model, bool root)
: parent_(NULL),
submenu_(NULL),
model_(menu_model),
@@ -103,7 +103,7 @@ NativeMenuDOMUI::NativeMenuDOMUI(ui::MenuModel* menu_model, bool root)
menu_widget_->Init(NULL, gfx::Rect(-10000, -10000, 1, 1));
}
-NativeMenuDOMUI::~NativeMenuDOMUI() {
+NativeMenuWebUI::~NativeMenuWebUI() {
if (nested_dispatcher_) {
// Menu is destroyed while its in message loop.
// Let nested dispatcher know the creator is deleted.
@@ -118,9 +118,9 @@ NativeMenuDOMUI::~NativeMenuDOMUI() {
}
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, MenuWrapper implementation:
+// NativeMenuWebUI, MenuWrapper implementation:
-void NativeMenuDOMUI::RunMenuAt(const gfx::Point& point, int alignment) {
+void NativeMenuWebUI::RunMenuAt(const gfx::Point& point, int alignment) {
if (current_ != NULL) {
// This happens when there is a nested task to show menu, which is
// executed after menu is open. Since we need to enable nested task,
@@ -188,54 +188,54 @@ void NativeMenuDOMUI::RunMenuAt(const gfx::Point& point, int alignment) {
ProcessActivate();
}
-void NativeMenuDOMUI::CancelMenu() {
+void NativeMenuWebUI::CancelMenu() {
Hide();
}
-void NativeMenuDOMUI::Rebuild() {
+void NativeMenuWebUI::Rebuild() {
activated_menu_ = NULL;
menu_widget_->ExecuteJavascript(L"modelUpdated()");
}
-void NativeMenuDOMUI::UpdateStates() {
+void NativeMenuWebUI::UpdateStates() {
// Update menu contnets and submenus.
Rebuild();
}
-gfx::NativeMenu NativeMenuDOMUI::GetNativeMenu() const {
+gfx::NativeMenu NativeMenuWebUI::GetNativeMenu() const {
return menu_widget_->GetNativeView();
}
-NativeMenuDOMUI::MenuAction NativeMenuDOMUI::GetMenuAction() const {
+NativeMenuWebUI::MenuAction NativeMenuWebUI::GetMenuAction() const {
return menu_action_;
}
-void NativeMenuDOMUI::AddMenuListener(views::MenuListener* listener) {
+void NativeMenuWebUI::AddMenuListener(views::MenuListener* listener) {
listeners_.AddObserver(listener);
}
-void NativeMenuDOMUI::RemoveMenuListener(views::MenuListener* listener) {
+void NativeMenuWebUI::RemoveMenuListener(views::MenuListener* listener) {
listeners_.RemoveObserver(listener);
}
-void NativeMenuDOMUI::SetMinimumWidth(int width) {
+void NativeMenuWebUI::SetMinimumWidth(int width) {
gtk_widget_set_size_request(menu_widget_->GetNativeView(), width, 1);
}
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, MessageLoopForUI::Dispatcher implementation:
+// NativeMenuWebUI, MessageLoopForUI::Dispatcher implementation:
-bool NativeMenuDOMUI::Dispatch(GdkEvent* event) {
+bool NativeMenuWebUI::Dispatch(GdkEvent* event) {
switch (event->type) {
case GDK_MOTION_NOTIFY: {
- NativeMenuDOMUI* target = FindMenuAt(
+ NativeMenuWebUI* target = FindMenuAt(
gfx::Point(event->motion.x_root, event->motion.y_root));
if (target)
target->menu_widget_->EnableInput(false);
break;
}
case GDK_BUTTON_PRESS: {
- NativeMenuDOMUI* target = FindMenuAt(
+ NativeMenuWebUI* target = FindMenuAt(
gfx::Point(event->motion.x_root, event->motion.y_root));
if (!target) {
Hide();
@@ -251,7 +251,7 @@ bool NativeMenuDOMUI::Dispatch(GdkEvent* event) {
}
#if defined(TOUCH_UI)
-base::MessagePumpGlibXDispatcher::DispatchStatus NativeMenuDOMUI::Dispatch(
+base::MessagePumpGlibXDispatcher::DispatchStatus NativeMenuWebUI::Dispatch(
XEvent* xevent) {
return views::DispatchXEvent(xevent) ?
base::MessagePumpGlibXDispatcher::EVENT_PROCESSED :
@@ -261,12 +261,12 @@ base::MessagePumpGlibXDispatcher::DispatchStatus NativeMenuDOMUI::Dispatch(
#endif
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, MenuControl implementation:
+// NativeMenuWebUI, MenuControl implementation:
-void NativeMenuDOMUI::Activate(ui::MenuModel* model,
+void NativeMenuWebUI::Activate(ui::MenuModel* model,
int index,
ActivationMode activation) {
- NativeMenuDOMUI* root = GetRoot();
+ NativeMenuWebUI* root = GetRoot();
if (root) {
if (activation == CLOSE_AND_ACTIVATE) {
root->activated_menu_ = model;
@@ -282,11 +282,11 @@ void NativeMenuDOMUI::Activate(ui::MenuModel* model,
}
}
-void NativeMenuDOMUI::OpenSubmenu(int index, int y) {
+void NativeMenuWebUI::OpenSubmenu(int index, int y) {
submenu_.reset();
// Returns the model for the submenu at the specified index.
ui::MenuModel* submenu = model_->GetSubmenuModelAt(index);
- submenu_.reset(new chromeos::NativeMenuDOMUI(submenu, false));
+ submenu_.reset(new chromeos::NativeMenuWebUI(submenu, false));
submenu_->set_menu_url(menu_url_);
// y in menu_widget_ coordinate.
submenu_->set_parent(this);
@@ -297,43 +297,43 @@ void NativeMenuDOMUI::OpenSubmenu(int index, int y) {
y));
}
-void NativeMenuDOMUI::CloseAll() {
- NativeMenuDOMUI* root = GetRoot();
+void NativeMenuWebUI::CloseAll() {
+ NativeMenuWebUI* root = GetRoot();
// root can be null if the submenu is detached from parent.
if (root)
root->Hide();
}
-void NativeMenuDOMUI::CloseSubmenu() {
+void NativeMenuWebUI::CloseSubmenu() {
submenu_.reset(); // This closes subsequent children.
}
-void NativeMenuDOMUI::MoveInputToSubmenu() {
+void NativeMenuWebUI::MoveInputToSubmenu() {
if (submenu_.get()) {
submenu_->menu_widget_->EnableInput(true);
}
}
-void NativeMenuDOMUI::MoveInputToParent() {
+void NativeMenuWebUI::MoveInputToParent() {
if (parent_) {
parent_->menu_widget_->EnableInput(true);
}
}
-void NativeMenuDOMUI::OnLoad() {
+void NativeMenuWebUI::OnLoad() {
// TODO(oshima): OnLoad is no longer used, but kept in case
// we may need it. Delete this if this is not necessary to
// implement wrench/network/bookmark menus.
}
-void NativeMenuDOMUI::SetSize(const gfx::Size& size) {
+void NativeMenuWebUI::SetSize(const gfx::Size& size) {
menu_widget_->SetSize(size);
}
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, public:
+// NativeMenuWebUI, public:
-void NativeMenuDOMUI::Hide() {
+void NativeMenuWebUI::Hide() {
// Only root can hide and exit the message loop.
DCHECK(menu_widget_->is_root());
DCHECK(!parent_);
@@ -347,8 +347,8 @@ void NativeMenuDOMUI::Hide() {
MessageLoop::current()->Quit();
}
-NativeMenuDOMUI* NativeMenuDOMUI::GetRoot() {
- NativeMenuDOMUI* ancestor = this;
+NativeMenuWebUI* NativeMenuWebUI::GetRoot() {
+ NativeMenuWebUI* ancestor = this;
while (ancestor->parent_)
ancestor = ancestor->parent_;
if (ancestor->menu_widget_->is_root())
@@ -357,7 +357,7 @@ NativeMenuDOMUI* NativeMenuDOMUI::GetRoot() {
return NULL;
}
-Profile* NativeMenuDOMUI::GetProfile() {
+Profile* NativeMenuWebUI::GetProfile() {
Browser* browser = BrowserList::GetLastActive();
// browser can be null in login screen.
if (!browser)
@@ -365,7 +365,7 @@ Profile* NativeMenuDOMUI::GetProfile() {
return browser->GetProfile();
}
-void NativeMenuDOMUI::InputIsReady() {
+void NativeMenuWebUI::InputIsReady() {
if (!on_menu_opened_called_) {
on_menu_opened_called_ = true;
FOR_EACH_OBSERVER(views::MenuListener, listeners_, OnMenuOpened());
@@ -373,9 +373,9 @@ void NativeMenuDOMUI::InputIsReady() {
}
////////////////////////////////////////////////////////////////////////////////
-// NativeMenuDOMUI, private:
+// NativeMenuWebUI, private:
-void NativeMenuDOMUI::ProcessActivate() {
+void NativeMenuWebUI::ProcessActivate() {
if (activated_menu_ &&
activated_menu_->IsEnabledAt(activated_index_) &&
MenuTypeCanExecute(activated_menu_->GetTypeAt(activated_index_))) {
@@ -383,14 +383,14 @@ void NativeMenuDOMUI::ProcessActivate() {
}
}
-void NativeMenuDOMUI::ShowAt(MenuLocator* locator) {
+void NativeMenuWebUI::ShowAt(MenuLocator* locator) {
model_->MenuWillShow();
menu_widget_->ShowAt(locator);
}
-NativeMenuDOMUI* NativeMenuDOMUI::FindMenuAt(const gfx::Point& point) {
+NativeMenuWebUI* NativeMenuWebUI::FindMenuAt(const gfx::Point& point) {
if (submenu_.get()) {
- NativeMenuDOMUI* found = submenu_->FindMenuAt(point);
+ NativeMenuWebUI* found = submenu_->FindMenuAt(point);
if (found)
return found;
}
diff --git a/chrome/browser/chromeos/views/native_menu_domui.h b/chrome/browser/chromeos/views/native_menu_webui.h
index 7222b49..c4d0a57 100644
--- a/chrome/browser/chromeos/views/native_menu_domui.h
+++ b/chrome/browser/chromeos/views/native_menu_webui.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
-#define CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
+#ifndef CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_WEBUI_H_
+#define CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_WEBUI_H_
#pragma once
#include <vector>
@@ -37,18 +37,18 @@ class MenuLocator;
class WebUIMenuWidget;
// A DOMUI implementation of MenuWrapper.
-class NativeMenuDOMUI : public views::MenuWrapper,
+class NativeMenuWebUI : public views::MenuWrapper,
public WebUIMenuControl,
public MessageLoop::Dispatcher {
public:
- NativeMenuDOMUI(ui::MenuModel* menu_model, bool root);
- virtual ~NativeMenuDOMUI();
+ NativeMenuWebUI(ui::MenuModel* menu_model, bool root);
+ virtual ~NativeMenuWebUI();
// Returns true if menu is currently shown.
bool is_menu_shown() { return menu_shown_; }
// Set parent menu.
- void set_parent(NativeMenuDOMUI* parent) { parent_ = parent; }
+ void set_parent(NativeMenuWebUI* parent) { parent_ = parent; }
// Overridden from views::MenuWrapper:
virtual void RunMenuAt(const gfx::Point& point, int alignment);
@@ -86,7 +86,7 @@ class NativeMenuDOMUI : public views::MenuWrapper,
// Returns the root of the menu tree. Returns NULL if it cannot find
// a root. (i.e. detached from root)
- NativeMenuDOMUI* GetRoot();
+ NativeMenuWebUI* GetRoot();
// Returns the profile to create DOMView.
Profile* GetProfile();
@@ -112,13 +112,13 @@ class NativeMenuDOMUI : public views::MenuWrapper,
void ShowAt(MenuLocator* locator);
// Find a menu object at point.
- NativeMenuDOMUI* FindMenuAt(const gfx::Point& point);
+ NativeMenuWebUI* FindMenuAt(const gfx::Point& point);
// If we're a submenu, this is the parent.
- NativeMenuDOMUI* parent_;
+ NativeMenuWebUI* parent_;
// Holds the current submenu.
- scoped_ptr<NativeMenuDOMUI> submenu_;
+ scoped_ptr<NativeMenuWebUI> submenu_;
ui::MenuModel* model_;
@@ -158,9 +158,9 @@ class NativeMenuDOMUI : public views::MenuWrapper,
// message loop is handled. see http://crosbug.com/7929 .
views::NestedDispatcherGtk* nested_dispatcher_;
- DISALLOW_COPY_AND_ASSIGN(NativeMenuDOMUI);
+ DISALLOW_COPY_AND_ASSIGN(NativeMenuWebUI);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
+#endif // CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_WEBUI_H_
diff --git a/chrome/browser/chromeos/views/webui_menu_widget.cc b/chrome/browser/chromeos/views/webui_menu_widget.cc
index 0329775..6f60db2 100644
--- a/chrome/browser/chromeos/views/webui_menu_widget.cc
+++ b/chrome/browser/chromeos/views/webui_menu_widget.cc
@@ -10,7 +10,7 @@
#include "base/singleton.h"
#include "base/task.h"
#include "chrome/browser/chromeos/views/menu_locator.h"
-#include "chrome/browser/chromeos/views/native_menu_domui.h"
+#include "chrome/browser/chromeos/views/native_menu_webui.h"
#include "chrome/browser/chromeos/wm_ipc.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
@@ -124,14 +124,14 @@ WebUIMenuWidget* WebUIMenuWidget::FindWebUIMenuWidget(gfx::NativeView native) {
///////////////////////////////////////////////////////////////////////////////
// WebUIMenuWidget public:
-WebUIMenuWidget::WebUIMenuWidget(chromeos::NativeMenuDOMUI* domui_menu,
+WebUIMenuWidget::WebUIMenuWidget(chromeos::NativeMenuWebUI* webui_menu,
bool root)
: views::WidgetGtk(views::WidgetGtk::TYPE_POPUP),
- domui_menu_(domui_menu),
+ webui_menu_(webui_menu),
dom_view_(NULL),
did_input_grab_(false),
is_root_(root) {
- DCHECK(domui_menu_);
+ DCHECK(webui_menu_);
// TODO(oshima): Disabling transparent until we migrate bookmark
// menus to DOMUI. See crosbug.com/7718.
// MakeTransparent();
@@ -162,8 +162,8 @@ void WebUIMenuWidget::Close() {
dom_view_ = NULL;
}
- // Detach the domui_menu_ which is being deleted.
- domui_menu_ = NULL;
+ // Detach the webui_menu_ which is being deleted.
+ webui_menu_ = NULL;
views::WidgetGtk::Close();
}
@@ -194,7 +194,7 @@ void WebUIMenuWidget::OnSizeAllocate(GtkWidget* widget,
// Don't move until the menu gets contents.
if (bounds.height() > 1) {
menu_locator_->Move(this);
- domui_menu_->InputIsReady();
+ webui_menu_->InputIsReady();
}
}
@@ -257,23 +257,23 @@ void WebUIMenuWidget::ExecuteJavascript(const std::wstring& script) {
}
void WebUIMenuWidget::ShowAt(chromeos::MenuLocator* locator) {
- DCHECK(domui_menu_);
+ DCHECK(webui_menu_);
menu_locator_.reset(locator);
if (!dom_view_) {
// TODO(oshima): Replace DOMView with direct use of RVH for beta.
// DOMView should be refactored to use RVH directly, but
// it'll require a lot of change and will take time.
dom_view_ = new DOMView();
- dom_view_->Init(domui_menu_->GetProfile(), NULL);
+ dom_view_->Init(webui_menu_->GetProfile(), NULL);
// TODO(oshima): remove extra view to draw rounded corner.
views::View* container = new views::View();
container->AddChildView(dom_view_);
container->set_border(new RoundedBorder(locator));
container->SetLayoutManager(new InsetsLayout());
SetContentsView(container);
- dom_view_->LoadURL(domui_menu_->menu_url());
+ dom_view_->LoadURL(webui_menu_->menu_url());
} else {
- domui_menu_->UpdateStates();
+ webui_menu_->UpdateStates();
dom_view_->GetParent()->set_border(new RoundedBorder(locator));
menu_locator_->Move(this);
}
@@ -287,7 +287,7 @@ void WebUIMenuWidget::ShowAt(chromeos::MenuLocator* locator) {
}
void WebUIMenuWidget::SetSize(const gfx::Size& new_size) {
- DCHECK(domui_menu_);
+ DCHECK(webui_menu_);
// Ignore the empty new_size request which is called when
// menu.html is loaded.
if (new_size.IsEmpty())
diff --git a/chrome/browser/chromeos/views/webui_menu_widget.h b/chrome/browser/chromeos/views/webui_menu_widget.h
index 1579250..a566920 100644
--- a/chrome/browser/chromeos/views/webui_menu_widget.h
+++ b/chrome/browser/chromeos/views/webui_menu_widget.h
@@ -16,14 +16,14 @@ class ExtensionApiTest;
namespace chromeos {
class MenuLocator;
-class NativeMenuDOMUI;
+class NativeMenuWebUI;
// WebUIMenuWidget is a window widget for a Web UI based menu.
class WebUIMenuWidget : public views::WidgetGtk {
public:
// Create a Window for the NativeMenuDMOUI. |root| specifies if
// the menu is root menu.
- WebUIMenuWidget(NativeMenuDOMUI* domui_menu, bool root);
+ WebUIMenuWidget(NativeMenuWebUI* webui_menu, bool root);
virtual ~WebUIMenuWidget();
// WidgetGtk overrides:
@@ -34,9 +34,9 @@ class WebUIMenuWidget : public views::WidgetGtk {
virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event);
virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation);
- // Returns NativeMenuDOMUI that owns this widget.
- NativeMenuDOMUI* domui_menu() const {
- return domui_menu_;
+ // Returns NativeMenuWebUI that owns this widget.
+ NativeMenuWebUI* webui_menu() const {
+ return webui_menu_;
}
// Returns true if the menu widget is a root.
@@ -85,7 +85,7 @@ class WebUIMenuWidget : public views::WidgetGtk {
void ClearGrabWidget();
// NativeMenu object that owns this widget.
- NativeMenuDOMUI* domui_menu_;
+ NativeMenuWebUI* webui_menu_;
// DOMView to render the menu contents.
DOMView* dom_view_;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 4256e0c..34daa6a 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -773,8 +773,8 @@
'browser/chromeos/views/dropdown_button.h',
'browser/chromeos/views/menu_locator.cc',
'browser/chromeos/views/menu_locator.h',
- 'browser/chromeos/views/native_menu_domui.cc',
- 'browser/chromeos/views/native_menu_domui.h',
+ 'browser/chromeos/views/native_menu_webui.cc',
+ 'browser/chromeos/views/native_menu_webui.h',
'browser/chromeos/views/webui_menu_widget.cc',
'browser/chromeos/views/webui_menu_widget.h',
'browser/chromeos/volume_bubble.cc',