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

Side by Side Diff: chrome/browser/ui/cocoa/intents/web_intent_inline_service_view_controller.mm

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 #import "chrome/browser/ui/cocoa/intents/web_intent_inline_service_view_controll er.h" 5 #import "chrome/browser/ui/cocoa/intents/web_intent_inline_service_view_controll er.h"
6 6
7 #include "chrome/browser/ui/browser_finder.h" 7 #include "chrome/browser/ui/browser_finder.h"
8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u tils.h" 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u tils.h"
9 #import "chrome/browser/ui/cocoa/flipped_view.h" 9 #import "chrome/browser/ui/cocoa/flipped_view.h"
10 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 10 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 if (serviceURL_.is_empty()) { 95 if (serviceURL_.is_empty()) {
96 if (webContents_.get()) { 96 if (webContents_.get()) {
97 [webContents_->GetNativeView() removeFromSuperview]; 97 [webContents_->GetNativeView() removeFromSuperview];
98 webContents_.reset(); 98 webContents_.reset();
99 } 99 }
100 delegate_.reset(); 100 delegate_.reset();
101 return; 101 return;
102 } 102 }
103 103
104 Browser* browser = browser::FindBrowserWithWebContents( 104 Browser* browser = chrome::FindBrowserWithWebContents(
105 picker_->web_contents()); 105 picker_->web_contents());
106 webContents_.reset(picker_->delegate()->CreateWebContentsForInlineDisposition( 106 webContents_.reset(picker_->delegate()->CreateWebContentsForInlineDisposition(
107 browser->profile(), url)); 107 browser->profile(), url));
108 delegate_.reset(new WebIntentInlineDispositionDelegate( 108 delegate_.reset(new WebIntentInlineDispositionDelegate(
109 picker_, webContents_.get(), browser)); 109 picker_, webContents_.get(), browser));
110 110
111 webContents_->GetController().LoadURL(url, 111 webContents_->GetController().LoadURL(url,
112 content::Referrer(), 112 content::Referrer(),
113 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 113 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
114 std::string()); 114 std::string());
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 [webContentView_ setFrame:webFrame]; 174 [webContentView_ setFrame:webFrame];
175 [webContents_->GetNativeView() setFrame:[webContentView_ bounds]]; 175 [webContents_->GetNativeView() setFrame:[webContentView_ bounds]];
176 } 176 }
177 } 177 }
178 178
179 - (void)viewRemovedFromSuperview { 179 - (void)viewRemovedFromSuperview {
180 [self setServiceURL:GURL::EmptyGURL()]; 180 [self setServiceURL:GURL::EmptyGURL()];
181 } 181 }
182 182
183 @end 183 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698