Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 10916180: Context menus on view elements should be positioned above the finger when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 controller_->tabstrip_->StopAllHighlighting(); 96 controller_->tabstrip_->StopAllHighlighting();
97 } 97 }
98 98
99 void Cancel() { 99 void Cancel() {
100 controller_ = NULL; 100 controller_ = NULL;
101 } 101 }
102 102
103 void RunMenuAt(const gfx::Point& point) { 103 void RunMenuAt(const gfx::Point& point) {
104 if (menu_runner_->RunMenuAt( 104 if (menu_runner_->RunMenuAt(
105 tab_->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 105 tab_->GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
106 views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS) == 106 views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS |
107 views::MenuRunner::CONTEXT_MENU) ==
107 views::MenuRunner::MENU_DELETED) 108 views::MenuRunner::MENU_DELETED)
108 return; 109 return;
109 } 110 }
110 111
111 // Overridden from ui::SimpleMenuModel::Delegate: 112 // Overridden from ui::SimpleMenuModel::Delegate:
112 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE { 113 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE {
113 return false; 114 return false;
114 } 115 }
115 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE { 116 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
116 return controller_->IsCommandEnabledForTab( 117 return controller_->IsCommandEnabledForTab(
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); 580 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB);
580 tabstrip_->AddTabAt(index, data, is_active); 581 tabstrip_->AddTabAt(index, data, is_active);
581 } 582 }
582 583
583 void BrowserTabStripController::UpdateLayoutType() { 584 void BrowserTabStripController::UpdateLayoutType() {
584 bool adjust_layout = false; 585 bool adjust_layout = false;
585 TabStripLayoutType layout_type = 586 TabStripLayoutType layout_type =
586 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); 587 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout);
587 tabstrip_->SetLayoutType(layout_type, adjust_layout); 588 tabstrip_->SetLayoutType(layout_type, adjust_layout);
588 } 589 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698