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

Side by Side Diff: chrome/browser/ui/apps/chrome_shell_window_delegate.cc

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove is_valid check Created 7 years 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/platform_util_win.cc ('k') | chrome/browser/ui/browser_commands.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/chrome_shell_window_delegate.h" 5 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/favicon/favicon_tab_helper.h" 8 #include "chrome/browser/favicon/favicon_tab_helper.h"
9 #include "chrome/browser/file_select_helper.h" 9 #include "chrome/browser/file_select_helper.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
(...skipping 29 matching lines...) Expand all
40 40
41 ShellWindowLinkDelegate::ShellWindowLinkDelegate() {} 41 ShellWindowLinkDelegate::ShellWindowLinkDelegate() {}
42 42
43 ShellWindowLinkDelegate::~ShellWindowLinkDelegate() {} 43 ShellWindowLinkDelegate::~ShellWindowLinkDelegate() {}
44 44
45 // TODO(rockot): Add a test that exercises this code. See 45 // TODO(rockot): Add a test that exercises this code. See
46 // http://crbug.com/254260. 46 // http://crbug.com/254260.
47 content::WebContents* ShellWindowLinkDelegate::OpenURLFromTab( 47 content::WebContents* ShellWindowLinkDelegate::OpenURLFromTab(
48 content::WebContents* source, 48 content::WebContents* source,
49 const content::OpenURLParams& params) { 49 const content::OpenURLParams& params) {
50 platform_util::OpenExternal(params.url); 50 if (source) {
51 platform_util::OpenExternal(
52 Profile::FromBrowserContext(source->GetBrowserContext()), params.url);
53 }
51 delete source; 54 delete source;
52 return NULL; 55 return NULL;
53 } 56 }
54 57
55 ChromeShellWindowDelegate::ChromeShellWindowDelegate() {} 58 ChromeShellWindowDelegate::ChromeShellWindowDelegate() {}
56 59
57 ChromeShellWindowDelegate::~ChromeShellWindowDelegate() {} 60 ChromeShellWindowDelegate::~ChromeShellWindowDelegate() {}
58 61
59 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() { 62 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() {
60 disable_external_open_for_testing_ = true; 63 disable_external_open_for_testing_ = true;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (host) { 159 if (host) {
157 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( 160 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized(
158 host->GetRoutingID(), blocked)); 161 host->GetRoutingID(), blocked));
159 } 162 }
160 } 163 }
161 164
162 bool ChromeShellWindowDelegate::IsWebContentsVisible( 165 bool ChromeShellWindowDelegate::IsWebContentsVisible(
163 content::WebContents* web_contents) { 166 content::WebContents* web_contents) {
164 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); 167 return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
165 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_win.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698