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

Side by Side Diff: chrome/browser/ui/views/website_settings/permission_selector_view.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 6 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
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | chrome/browser/ui/views/wrench_menu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/website_settings/permission_selector_view.h" 5 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 8 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const gfx::Point& point) { 129 const gfx::Point& point) {
130 menu_runner_.reset(new views::MenuRunner(menu_model_)); 130 menu_runner_.reset(new views::MenuRunner(menu_model_));
131 131
132 gfx::Point p(point); 132 gfx::Point p(point);
133 p.Offset(-source->width(), 0); 133 p.Offset(-source->width(), 0);
134 if (menu_runner_->RunMenuAt( 134 if (menu_runner_->RunMenuAt(
135 source->GetWidget()->GetTopLevelWidget(), 135 source->GetWidget()->GetTopLevelWidget(),
136 this, 136 this,
137 gfx::Rect(p, gfx::Size()), 137 gfx::Rect(p, gfx::Size()),
138 views::MenuItemView::TOPLEFT, 138 views::MenuItemView::TOPLEFT,
139 ui::MENU_SOURCE_NONE,
139 views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED) 140 views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED)
140 return; 141 return;
141 } 142 }
142 143
143 } // namespace internal 144 } // namespace internal
144 145
145 /////////////////////////////////////////////////////////////////////////////// 146 ///////////////////////////////////////////////////////////////////////////////
146 // PermissionSelectorView 147 // PermissionSelectorView
147 /////////////////////////////////////////////////////////////////////////////// 148 ///////////////////////////////////////////////////////////////////////////////
148 149
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 content_settings::SETTING_SOURCE_USER)); 257 content_settings::SETTING_SOURCE_USER));
257 258
258 FOR_EACH_OBSERVER(PermissionSelectorViewObserver, 259 FOR_EACH_OBSERVER(PermissionSelectorViewObserver,
259 observer_list_, 260 observer_list_,
260 OnPermissionChanged(this)); 261 OnPermissionChanged(this));
261 } 262 }
262 263
263 bool PermissionSelectorView::IsCommandIdChecked(int command_id) { 264 bool PermissionSelectorView::IsCommandIdChecked(int command_id) {
264 return current_setting_ == CommandIdToContentSetting(command_id); 265 return current_setting_ == CommandIdToContentSetting(command_id);
265 } 266 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | chrome/browser/ui/views/wrench_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698