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

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::WebContents; 19 using content::WebContents;
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 /////////////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////////////
24 // HTMLPageView 24 // HTMLPageView
25 HTMLPageView::HTMLPageView() 25 HTMLPageView::HTMLPageView()
(...skipping 18 matching lines...) Expand all
44 void HTMLPageScreen::CreateView() { 44 void HTMLPageScreen::CreateView() {
45 ViewScreen<HTMLPageView>::CreateView(); 45 ViewScreen<HTMLPageView>::CreateView();
46 } 46 }
47 47
48 void HTMLPageScreen::Refresh() { 48 void HTMLPageScreen::Refresh() {
49 VLOG(1) << "HTMLPageScreen::Refresh(): " << url_; 49 VLOG(1) << "HTMLPageScreen::Refresh(): " << url_;
50 StartTimeoutTimer(); 50 StartTimeoutTimer();
51 GURL url(url_); 51 GURL url(url_);
52 Profile* profile = ProfileManager::GetDefaultProfile(); 52 Profile* profile = ProfileManager::GetDefaultProfile();
53 view()->InitDOM(profile, 53 view()->InitDOM(profile,
54 SiteInstance::CreateSiteInstanceForURL(profile, url)); 54 content::SiteInstance::CreateSiteInstanceForURL(profile,
55 url));
55 view()->SetWebContentsDelegate(this); 56 view()->SetWebContentsDelegate(this);
56 view()->LoadURL(url); 57 view()->LoadURL(url);
57 } 58 }
58 59
59 HTMLPageView* HTMLPageScreen::AllocateView() { 60 HTMLPageView* HTMLPageScreen::AllocateView() {
60 return new HTMLPageView(); 61 return new HTMLPageView();
61 } 62 }
62 63
63 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 64 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
64 unhandled_keyboard_handler_.HandleKeyboardEvent(event, 65 unhandled_keyboard_handler_.HandleKeyboardEvent(event,
(...skipping 26 matching lines...) Expand all
91 if (g_browser_process) { 92 if (g_browser_process) {
92 const std::string locale = g_browser_process->GetApplicationLocale(); 93 const std::string locale = g_browser_process->GetApplicationLocale();
93 input_method::InputMethodManager* manager = 94 input_method::InputMethodManager* manager =
94 input_method::InputMethodManager::GetInstance(); 95 input_method::InputMethodManager::GetInstance();
95 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, ""); 96 manager->EnableInputMethods(locale, input_method::kKeyboardLayoutsOnly, "");
96 } 97 }
97 delegate()->GetObserver()->OnExit(code); 98 delegate()->GetObserver()->OnExit(code);
98 } 99 }
99 100
100 } // namespace chromeos 101 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698