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

Side by Side Diff: chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/tab_contents/render_view_context_menu_win.h" 5 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/tab_contents/retargeting_details.h" 10 #include "chrome/browser/tab_contents/retargeting_details.h"
11 #include "chrome/browser/ui/browser_finder.h" 11 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
13 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
14 15
15 using content::WebContents; 16 using content::WebContents;
16 17
17 RenderViewContextMenuWin::RenderViewContextMenuWin( 18 RenderViewContextMenuWin::RenderViewContextMenuWin(
18 WebContents* web_contents, 19 WebContents* web_contents,
19 const content::ContextMenuParams& params) 20 const content::ContextMenuParams& params)
20 : RenderViewContextMenuViews(web_contents, params) { 21 : RenderViewContextMenuViews(web_contents, params) {
21 } 22 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 profile_->GetOriginalProfile(), false); 60 profile_->GetOriginalProfile(), false);
60 if (browser) { 61 if (browser) {
61 content::OpenURLParams url_params( 62 content::OpenURLParams url_params(
62 params_.link_url, 63 params_.link_url,
63 content::Referrer(params_.frame_url.is_empty() ? 64 content::Referrer(params_.frame_url.is_empty() ?
64 params_.page_url : params_.frame_url, 65 params_.page_url : params_.frame_url,
65 params_.referrer_policy), 66 params_.referrer_policy),
66 NEW_FOREGROUND_TAB, 67 NEW_FOREGROUND_TAB,
67 content::PAGE_TRANSITION_LINK, 68 content::PAGE_TRANSITION_LINK,
68 false); 69 false);
69 WebContents* source_web_contents = browser->GetActiveWebContents(); 70 WebContents* source_web_contents = chrome::GetActiveWebContents(browser);
70 WebContents* new_contents = source_web_contents->OpenURL(url_params); 71 WebContents* new_contents = source_web_contents->OpenURL(url_params);
71 DCHECK(new_contents); 72 DCHECK(new_contents);
72 return; 73 return;
73 } 74 }
74 } 75 }
75 RenderViewContextMenu::ExecuteCommand(command_id, event_flags); 76 RenderViewContextMenu::ExecuteCommand(command_id, event_flags);
76 } 77 }
77 78
78 void RenderViewContextMenuWin::SetExternal() { 79 void RenderViewContextMenuWin::SetExternal() {
79 external_ = true; 80 external_ = true;
80 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698