| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/shell/browser/android/cast_window_android.h" | 5 #include "chromecast/shell/browser/android/cast_window_android.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chromecast/shell/browser/android/cast_window_manager.h" | 9 #include "chromecast/shell/browser/android/cast_window_manager.h" |
| 10 #include "content/public/browser/devtools_agent_host.h" | 10 #include "content/public/browser/devtools_agent_host.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void CastWindowAndroid::Close() { | 73 void CastWindowAndroid::Close() { |
| 74 // Note: if multiple windows becomes supported, this may close other devtools | 74 // Note: if multiple windows becomes supported, this may close other devtools |
| 75 // sessions. | 75 // sessions. |
| 76 content::DevToolsAgentHost::DetachAllClients(); | 76 content::DevToolsAgentHost::DetachAllClients(); |
| 77 CloseCastWindowView(java_object_.obj()); | 77 CloseCastWindowView(java_object_.obj()); |
| 78 delete this; | 78 delete this; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void CastWindowAndroid::LoadURL(const GURL& url) { | 81 void CastWindowAndroid::LoadURL(const GURL& url) { |
| 82 content::NavigationController::LoadURLParams params(url); | 82 content::NavigationController::LoadURLParams params(url); |
| 83 params.transition_type = content::PageTransitionFromInt( | 83 params.transition_type = ui::PageTransitionFromInt( |
| 84 content::PAGE_TRANSITION_TYPED | | 84 ui::PAGE_TRANSITION_TYPED | |
| 85 content::PAGE_TRANSITION_FROM_ADDRESS_BAR); | 85 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); |
| 86 web_contents_->GetController().LoadURLWithParams(params); | 86 web_contents_->GetController().LoadURLWithParams(params); |
| 87 web_contents_->Focus(); | 87 web_contents_->Focus(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void CastWindowAndroid::AddNewContents(content::WebContents* source, | 90 void CastWindowAndroid::AddNewContents(content::WebContents* source, |
| 91 content::WebContents* new_contents, | 91 content::WebContents* new_contents, |
| 92 WindowOpenDisposition disposition, | 92 WindowOpenDisposition disposition, |
| 93 const gfx::Rect& initial_pos, | 93 const gfx::Rect& initial_pos, |
| 94 bool user_gesture, | 94 bool user_gesture, |
| 95 bool* was_blocked) { | 95 bool* was_blocked) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 126 contents->GetRenderViewHost()->Blur(); | 126 contents->GetRenderViewHost()->Blur(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { | 129 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { |
| 130 LOG(ERROR) << "Render process gone: status=" << status; | 130 LOG(ERROR) << "Render process gone: status=" << status; |
| 131 Close(); | 131 Close(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace shell | 134 } // namespace shell |
| 135 } // namespace chromecast | 135 } // namespace chromecast |
| OLD | NEW |