| OLD | NEW |
| 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/shell/shell.h" | 5 #include "content/shell/shell.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "content/browser/tab_contents/navigation_controller.h" | 10 #include "content/browser/tab_contents/navigation_controller.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 if (!url.is_empty()) | 71 if (!url.is_empty()) |
| 72 shell->LoadURL(url); | 72 shell->LoadURL(url); |
| 73 return shell; | 73 return shell; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void Shell::LoadURL(const GURL& url) { | 76 void Shell::LoadURL(const GURL& url) { |
| 77 tab_contents_->controller().LoadURL( | 77 tab_contents_->controller().LoadURL( |
| 78 url, | 78 url, |
| 79 GURL(), | 79 GURL(), |
| 80 PageTransition::TYPED, | 80 content::PAGE_TRANSITION_TYPED, |
| 81 std::string()); | 81 std::string()); |
| 82 tab_contents_->Focus(); | 82 tab_contents_->Focus(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void Shell::GoBackOrForward(int offset) { | 85 void Shell::GoBackOrForward(int offset) { |
| 86 tab_contents_->controller().GoToOffset(offset); | 86 tab_contents_->controller().GoToOffset(offset); |
| 87 tab_contents_->Focus(); | 87 tab_contents_->Focus(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void Shell::Reload() { | 90 void Shell::Reload() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 119 void Shell::DidNavigateMainFramePostCommit(TabContents* tab) { | 119 void Shell::DidNavigateMainFramePostCommit(TabContents* tab) { |
| 120 PlatformSetAddressBarURL(tab->GetURL()); | 120 PlatformSetAddressBarURL(tab->GetURL()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void Shell::UpdatePreferredSize(TabContents* source, | 123 void Shell::UpdatePreferredSize(TabContents* source, |
| 124 const gfx::Size& pref_size) { | 124 const gfx::Size& pref_size) { |
| 125 PlatformSizeTo(pref_size.width(), pref_size.height()); | 125 PlatformSizeTo(pref_size.width(), pref_size.height()); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace content | 128 } // namespace content |
| OLD | NEW |