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

Side by Side Diff: chrome/browser/chromeos/login/html_page_screen.cc

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months 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 #include "chrome/browser/chromeos/login/html_page_screen.h" 5 #include "chrome/browser/chromeos/login/html_page_screen.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
11 #include "chrome/browser/chromeos/input_method/input_method_util.h" 11 #include "chrome/browser/chromeos/input_method/input_method_util.h"
12 #include "chrome/browser/chromeos/login/screen_observer.h" 12 #include "chrome/browser/chromeos/login/screen_observer.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "content/browser/renderer_host/render_view_host.h" 14 #include "content/browser/renderer_host/render_view_host.h"
15 #include "content/browser/site_instance.h" 15 #include "content/public/browser/site_instance.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "ui/views/events/event.h" 17 #include "ui/views/events/event.h"
18 18
19 using content::SiteInstance;
19 using content::WebContents; 20 using content::WebContents;
20 21
21 namespace chromeos { 22 namespace chromeos {
22 23
23 /////////////////////////////////////////////////////////////////////////////// 24 ///////////////////////////////////////////////////////////////////////////////
24 // HTMLPageView 25 // HTMLPageView
25 HTMLPageView::HTMLPageView() 26 HTMLPageView::HTMLPageView()
26 : dom_view_(new WebPageDomView()) { 27 : dom_view_(new WebPageDomView()) {
27 } 28 }
28 29
(...skipping 14 matching lines...) Expand all
43 // HTMLPageScreen, ViewScreen implementation: 44 // HTMLPageScreen, ViewScreen implementation:
44 void HTMLPageScreen::CreateView() { 45 void HTMLPageScreen::CreateView() {
45 ViewScreen<HTMLPageView>::CreateView(); 46 ViewScreen<HTMLPageView>::CreateView();
46 } 47 }
47 48
48 void HTMLPageScreen::Refresh() { 49 void HTMLPageScreen::Refresh() {
49 VLOG(1) << "HTMLPageScreen::Refresh(): " << url_; 50 VLOG(1) << "HTMLPageScreen::Refresh(): " << url_;
50 StartTimeoutTimer(); 51 StartTimeoutTimer();
51 GURL url(url_); 52 GURL url(url_);
52 Profile* profile = ProfileManager::GetDefaultProfile(); 53 Profile* profile = ProfileManager::GetDefaultProfile();
53 view()->InitDOM(profile, 54 view()->InitDOM(profile, SiteInstance::CreateForURL(profile, url));
54 SiteInstance::CreateSiteInstanceForURL(profile, url));
55 view()->SetWebContentsDelegate(this); 55 view()->SetWebContentsDelegate(this);
56 view()->LoadURL(url); 56 view()->LoadURL(url);
57 } 57 }
58 58
59 HTMLPageView* HTMLPageScreen::AllocateView() { 59 HTMLPageView* HTMLPageScreen::AllocateView() {
60 return new HTMLPageView(); 60 return new HTMLPageView();
61 } 61 }
62 62
63 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 63 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
64 unhandled_keyboard_handler_.HandleKeyboardEvent(event, 64 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
(...skipping 26 matching lines...) Expand all
91 if (g_browser_process) { 91 if (g_browser_process) {
92 const std::string locale = g_browser_process->GetApplicationLocale(); 92 const std::string locale = g_browser_process->GetApplicationLocale();
93 input_method::InputMethodManager* manager = 93 input_method::InputMethodManager* manager =
94 input_method::InputMethodManager::GetInstance(); 94 input_method::InputMethodManager::GetInstance();
95 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, ""); 95 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
96 } 96 }
97 delegate()->GetObserver()->OnExit(code); 97 delegate()->GetObserver()->OnExit(code);
98 } 98 }
99 99
100 } // namespace chromeos 100 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/login/registration_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698