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

Side by Side Diff: chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc

Issue 2164483006: [MacViews] Implemented text context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 3 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer_context_menu/render_view_context_menu _views.h" 5 #include "chrome/browser/ui/views/renderer_context_menu/render_view_context_menu _views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
13 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/views/frame/browser_view.h" 14 #include "chrome/browser/ui/views/frame/browser_view.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/grit/generated_resources.h"
17 #include "components/renderer_context_menu/views/toolkit_delegate_views.h" 16 #include "components/renderer_context_menu/views/toolkit_delegate_views.h"
18 #include "content/public/browser/render_view_host.h" 17 #include "content/public/browser/render_view_host.h"
19 #include "content/public/browser/render_widget_host.h" 18 #include "content/public/browser/render_widget_host.h"
20 #include "content/public/browser/render_widget_host_view.h" 19 #include "content/public/browser/render_widget_host_view.h"
21 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
22 #include "ui/aura/client/screen_position_client.h" 21 #include "ui/aura/client/screen_position_client.h"
23 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
24 #include "ui/base/accelerators/accelerator.h" 23 #include "ui/base/accelerators/accelerator.h"
25 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/events/keycodes/keyboard_codes.h" 25 #include "ui/events/keycodes/keyboard_codes.h"
26 #include "ui/strings/grit/ui_strings.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 28
29 using content::WebContents; 29 using content::WebContents;
30 30
31 //////////////////////////////////////////////////////////////////////////////// 31 ////////////////////////////////////////////////////////////////////////////////
32 // RenderViewContextMenuViews, public: 32 // RenderViewContextMenuViews, public:
33 33
34 RenderViewContextMenuViews::RenderViewContextMenuViews( 34 RenderViewContextMenuViews::RenderViewContextMenuViews(
35 content::RenderFrameHost* render_frame_host, 35 content::RenderFrameHost* render_frame_host,
36 const content::ContextMenuParams& params) 36 const content::ContextMenuParams& params)
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 WebContents::FromRenderFrameHost(GetRenderFrameHost()); 292 WebContents::FromRenderFrameHost(GetRenderFrameHost());
293 if (!web_contents) { 293 if (!web_contents) {
294 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; 294 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents";
295 return NULL; 295 return NULL;
296 } 296 }
297 return web_contents->GetFullscreenRenderWidgetHostView() 297 return web_contents->GetFullscreenRenderWidgetHostView()
298 ? web_contents->GetFullscreenRenderWidgetHostView() 298 ? web_contents->GetFullscreenRenderWidgetHostView()
299 ->GetNativeView() 299 ->GetNativeView()
300 : web_contents->GetNativeView(); 300 : web_contents->GetNativeView();
301 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698