summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 16:06:01 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 16:06:01 +0000
commit9bf2a8d5a178b92327a9364145ed1febdd444a91 (patch)
treeb1ca906d859b7f2e8786f05361c407e590577857
parentaae3406d662a2a3278f7b180135ecc9a939a99b1 (diff)
downloadchromium_src-9bf2a8d5a178b92327a9364145ed1febdd444a91.zip
chromium_src-9bf2a8d5a178b92327a9364145ed1febdd444a91.tar.gz
chromium_src-9bf2a8d5a178b92327a9364145ed1febdd444a91.tar.bz2
[Cleanup] Remove unnecessary code
- Location passed in ShowMenu is already in screen coordinates. - Delete dead code in MoveAllWindows in root_window_controller.cc. I forgot to cleanup when I finished CL. BUG=123160 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10804018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147452 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/root_window_controller.cc5
-rw-r--r--ash/shell_context_menu.cc7
2 files changed, 1 insertions, 11 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 5fa2bb4..1472b69 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -61,11 +61,6 @@ void MoveAllWindows(aura::RootWindow* src,
internal::kShellWindowId_SystemModalContainer,
internal::kShellWindowId_LockSystemModalContainer,
};
- const gfx::Point src_origin =
- gfx::Screen::GetDisplayNearestWindow(src).bounds().origin();
- const gfx::Point dst_origin =
- gfx::Screen::GetDisplayNearestWindow(src).bounds().origin();
-
for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) {
int id = kContainerIdsToMove[i];
aura::Window* src_container = Shell::GetContainer(src, id);
diff --git a/ash/shell_context_menu.cc b/ash/shell_context_menu.cc
index 0a7fe2c..7cf6f86 100644
--- a/ash/shell_context_menu.cc
+++ b/ash/shell_context_menu.cc
@@ -8,7 +8,6 @@
#include "ash/display/display_controller.h"
#include "ash/shell.h"
#include "grit/ash_strings.h"
-#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
@@ -36,12 +35,8 @@ void ShellContextMenu::ShowMenu(views::Widget* widget,
l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
views::MenuModelAdapter menu_model_adapter(&menu_model);
menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu()));
- aura::Window* window = widget->GetNativeView();
- gfx::Point menu_origin = location;
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointToScreen(window, &menu_origin);
if (menu_runner_->RunMenuAt(
- widget, NULL, gfx::Rect(menu_origin, gfx::Size()),
+ widget, NULL, gfx::Rect(location, gfx::Size()),
views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS) ==
views::MenuRunner::MENU_DELETED)
return;