| OLD | NEW |
| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 new WebIntentInlineDispositionDelegate(this, inline_web_contents_.get(), | 1136 new WebIntentInlineDispositionDelegate(this, inline_web_contents_.get(), |
| 1137 browser)); | 1137 browser)); |
| 1138 content::WebContents* web_contents = webview_->GetWebContents(); | 1138 content::WebContents* web_contents = webview_->GetWebContents(); |
| 1139 | 1139 |
| 1140 // Must call this immediately after WebContents creation to avoid race | 1140 // Must call this immediately after WebContents creation to avoid race |
| 1141 // with load. | 1141 // with load. |
| 1142 delegate_->OnInlineDispositionWebContentsCreated(web_contents); | 1142 delegate_->OnInlineDispositionWebContentsCreated(web_contents); |
| 1143 web_contents->GetController().LoadURL( | 1143 web_contents->GetController().LoadURL( |
| 1144 url, | 1144 url, |
| 1145 content::Referrer(), | 1145 content::Referrer(), |
| 1146 content::PAGE_TRANSITION_START_PAGE, | 1146 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 1147 std::string()); | 1147 std::string()); |
| 1148 | 1148 |
| 1149 // Disable all buttons and show throbber. | 1149 // Disable all buttons and show throbber. |
| 1150 service_buttons_->SetEnabled(false); | 1150 service_buttons_->SetEnabled(false); |
| 1151 service_buttons_->StartThrobber(url); | 1151 service_buttons_->StartThrobber(url); |
| 1152 extensions_->SetEnabled(false); | 1152 extensions_->SetEnabled(false); |
| 1153 more_suggestions_link_->SetEnabled(false); | 1153 more_suggestions_link_->SetEnabled(false); |
| 1154 contents_->Layout(); | 1154 contents_->Layout(); |
| 1155 } | 1155 } |
| 1156 | 1156 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 | 1292 |
| 1293 void WebIntentPickerViews::SizeToContents() { | 1293 void WebIntentPickerViews::SizeToContents() { |
| 1294 gfx::Size client_size = contents_->GetPreferredSize(); | 1294 gfx::Size client_size = contents_->GetPreferredSize(); |
| 1295 gfx::Rect client_bounds(client_size); | 1295 gfx::Rect client_bounds(client_size); |
| 1296 gfx::Rect new_window_bounds = window_->non_client_view()->frame_view()-> | 1296 gfx::Rect new_window_bounds = window_->non_client_view()->frame_view()-> |
| 1297 GetWindowBoundsForClientBounds(client_bounds); | 1297 GetWindowBoundsForClientBounds(client_bounds); |
| 1298 window_->CenterWindow(new_window_bounds.size()); | 1298 window_->CenterWindow(new_window_bounds.size()); |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 | 1301 |
| OLD | NEW |