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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 155671: Experiment with opening links opened via context menu in the foreground.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/clipboard.h" 8 #include "base/clipboard.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 dictionary_language.Init(prefs::kSpellCheckDictionary, 353 dictionary_language.Init(prefs::kSpellCheckDictionary,
354 profile_->GetPrefs(), NULL); 354 profile_->GetPrefs(), NULL);
355 dictionary_language.SetValue(ASCIIToWide(languages[language_number])); 355 dictionary_language.SetValue(ASCIIToWide(languages[language_number]));
356 } 356 }
357 357
358 return; 358 return;
359 } 359 }
360 360
361 switch (id) { 361 switch (id) {
362 case IDS_CONTENT_CONTEXT_OPENLINKNEWTAB: 362 case IDS_CONTENT_CONTEXT_OPENLINKNEWTAB:
363 OpenURL(params_.link_url, NEW_BACKGROUND_TAB, PageTransition::LINK); 363 OpenURL(params_.link_url, NEW_FOREGROUND_TAB, PageTransition::LINK);
364 break; 364 break;
365 365
366 case IDS_CONTENT_CONTEXT_OPENLINKNEWWINDOW: 366 case IDS_CONTENT_CONTEXT_OPENLINKNEWWINDOW:
367 OpenURL(params_.link_url, NEW_WINDOW, PageTransition::LINK); 367 OpenURL(params_.link_url, NEW_WINDOW, PageTransition::LINK);
368 break; 368 break;
369 369
370 case IDS_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: 370 case IDS_CONTENT_CONTEXT_OPENLINKOFFTHERECORD:
371 OpenURL(params_.link_url, OFF_THE_RECORD, PageTransition::LINK); 371 OpenURL(params_.link_url, OFF_THE_RECORD, PageTransition::LINK);
372 break; 372 break;
373 373
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 // applications may not enocode non-ASCII characters in UTF-8. 649 // applications may not enocode non-ASCII characters in UTF-8.
650 // So the 4th parameter of net::FormatUrl() should be false. 650 // So the 4th parameter of net::FormatUrl() should be false.
651 // See crbug.com/2820. 651 // See crbug.com/2820.
652 WideToUTF8(net::FormatUrl( 652 WideToUTF8(net::FormatUrl(
653 url, profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 653 url, profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
654 false, UnescapeRule::NONE, NULL, NULL)); 654 false, UnescapeRule::NONE, NULL, NULL));
655 655
656 WriteTextToClipboard(UTF8ToUTF16(utf8_text)); 656 WriteTextToClipboard(UTF8ToUTF16(utf8_text));
657 DidWriteURLToClipboard(utf8_text); 657 DidWriteURLToClipboard(utf8_text);
658 } 658 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698