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

Side by Side Diff: content/browser/webui/generic_handler.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/webui/generic_handler.h" 5 #include "content/browser/webui/generic_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "content/browser/disposition_utils.h" 11 #include "content/browser/disposition_utils.h"
12 #include "content/browser/tab_contents/tab_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "googleurl/src/gurl.h"
14 13
15 using content::OpenURLParams; 14 using content::OpenURLParams;
16 15
17 GenericHandler::GenericHandler() { 16 GenericHandler::GenericHandler() {
18 } 17 }
19 18
20 GenericHandler::~GenericHandler() { 19 GenericHandler::~GenericHandler() {
21 } 20 }
22 21
23 void GenericHandler::RegisterMessages() { 22 void GenericHandler::RegisterMessages() {
(...skipping 20 matching lines...) Expand all
44 43
45 CHECK(button == 0.0 || button == 1.0); 44 CHECK(button == 0.0 || button == 1.0);
46 bool middle_button = (button == 1.0); 45 bool middle_button = (button == 1.0);
47 46
48 WindowOpenDisposition disposition = 47 WindowOpenDisposition disposition =
49 disposition_utils::DispositionFromClick(middle_button, alt_key, ctrl_key, 48 disposition_utils::DispositionFromClick(middle_button, alt_key, ctrl_key,
50 meta_key, shift_key); 49 meta_key, shift_key);
51 if (disposition == CURRENT_TAB && target_string == "_blank") 50 if (disposition == CURRENT_TAB && target_string == "_blank")
52 disposition = NEW_FOREGROUND_TAB; 51 disposition = NEW_FOREGROUND_TAB;
53 52
54 web_ui()->tab_contents()->OpenURL(OpenURLParams( 53 web_ui()->web_contents()->OpenURL(OpenURLParams(
55 GURL(url_string), content::Referrer(), disposition, 54 GURL(url_string), content::Referrer(), disposition,
56 content::PAGE_TRANSITION_LINK, false)); 55 content::PAGE_TRANSITION_LINK, false));
57 56
58 // This may delete us! 57 // This may delete us!
59 } 58 }
OLDNEW
« no previous file with comments | « chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h ('k') | content/browser/webui/web_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698