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

Side by Side Diff: ui/keyboard/webui/vk_webui_controller.cc

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 years, 1 month 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
« no previous file with comments | « ui/keyboard/webui/vk_mojo_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/keyboard/webui/vk_webui_controller.h" 5 #include "ui/keyboard/webui/vk_webui_controller.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void VKWebUIController::RenderViewCreated(content::RenderViewHost* host) { 63 void VKWebUIController::RenderViewCreated(content::RenderViewHost* host) {
64 host->GetMainFrame()->GetServiceRegistry()->AddService<KeyboardUIHandlerMojo>( 64 host->GetMainFrame()->GetServiceRegistry()->AddService<KeyboardUIHandlerMojo>(
65 base::Bind(&VKWebUIController::CreateAndStoreUIHandler, 65 base::Bind(&VKWebUIController::CreateAndStoreUIHandler,
66 weak_factory_.GetWeakPtr())); 66 weak_factory_.GetWeakPtr()));
67 } 67 }
68 68
69 void VKWebUIController::CreateAndStoreUIHandler( 69 void VKWebUIController::CreateAndStoreUIHandler(
70 mojo::InterfaceRequest<KeyboardUIHandlerMojo> request) { 70 mojo::InterfaceRequest<KeyboardUIHandlerMojo> request) {
71 ui_handler_ = scoped_ptr<VKMojoHandler>( 71 ui_handler_ = make_scoped_ptr(new VKMojoHandler(request.Pass()));
72 mojo::WeakBindToRequest(new VKMojoHandler(), &request));
73 } 72 }
74 73
75 //////////////////////////////////////////////////////////////////////////////// 74 ////////////////////////////////////////////////////////////////////////////////
76 // VKWebUIControllerFactory: 75 // VKWebUIControllerFactory:
77 76
78 content::WebUI::TypeID VKWebUIControllerFactory::GetWebUIType( 77 content::WebUI::TypeID VKWebUIControllerFactory::GetWebUIType(
79 content::BrowserContext* browser_context, 78 content::BrowserContext* browser_context,
80 const GURL& url) const { 79 const GURL& url) const {
81 if (url == GURL(kKeyboardURL)) 80 if (url == GURL(kKeyboardURL))
82 return const_cast<VKWebUIControllerFactory*>(this); 81 return const_cast<VKWebUIControllerFactory*>(this);
(...skipping 27 matching lines...) Expand all
110 } 109 }
111 110
112 // protected 111 // protected
113 VKWebUIControllerFactory::VKWebUIControllerFactory() { 112 VKWebUIControllerFactory::VKWebUIControllerFactory() {
114 } 113 }
115 114
116 VKWebUIControllerFactory::~VKWebUIControllerFactory() { 115 VKWebUIControllerFactory::~VKWebUIControllerFactory() {
117 } 116 }
118 117
119 } // namespace keyboard 118 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/keyboard/webui/vk_mojo_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698