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

Side by Side Diff: mash/browser_driver/browser_driver_application_delegate.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « mash/browser_driver/browser_driver_application_delegate.h ('k') | mash/browser_driver/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/browser_driver/browser_driver_application_delegate.h" 5 #include "mash/browser_driver/browser_driver_application_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } // namespace 48 } // namespace
49 49
50 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate() 50 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate()
51 : connector_(nullptr), 51 : connector_(nullptr),
52 binding_(this), 52 binding_(this),
53 weak_factory_(this) {} 53 weak_factory_(this) {}
54 54
55 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {} 55 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {}
56 56
57 void BrowserDriverApplicationDelegate::Initialize( 57 void BrowserDriverApplicationDelegate::Initialize(
58 mojo::Connector* connector, 58 shell::Connector* connector,
59 const mojo::Identity& identity, 59 const shell::Identity& identity,
60 uint32_t id) { 60 uint32_t id) {
61 connector_ = connector; 61 connector_ = connector;
62 AddAccelerators(); 62 AddAccelerators();
63 } 63 }
64 64
65 bool BrowserDriverApplicationDelegate::AcceptConnection( 65 bool BrowserDriverApplicationDelegate::AcceptConnection(
66 mojo::Connection* connection) { 66 shell::Connection* connection) {
67 return true; 67 return true;
68 } 68 }
69 69
70 bool BrowserDriverApplicationDelegate::ShellConnectionLost() { 70 bool BrowserDriverApplicationDelegate::ShellConnectionLost() {
71 // Prevent the code in AddAccelerators() from keeping this app alive. 71 // Prevent the code in AddAccelerators() from keeping this app alive.
72 binding_.set_connection_error_handler(base::Bind(&DoNothing)); 72 binding_.set_connection_error_handler(base::Bind(&DoNothing));
73 return true; 73 return true;
74 } 74 }
75 75
76 void BrowserDriverApplicationDelegate::OnAccelerator( 76 void BrowserDriverApplicationDelegate::OnAccelerator(
(...skipping 30 matching lines...) Expand all
107 for (const AcceleratorSpec& spec : g_spec) { 107 for (const AcceleratorSpec& spec : g_spec) {
108 registrar->AddAccelerator( 108 registrar->AddAccelerator(
109 static_cast<uint32_t>(spec.id), 109 static_cast<uint32_t>(spec.id),
110 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), 110 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags),
111 base::Bind(&AssertTrue)); 111 base::Bind(&AssertTrue));
112 } 112 }
113 } 113 }
114 114
115 } // namespace browser_driver 115 } // namespace browser_driver
116 } // namespace main 116 } // namespace main
OLDNEW
« no previous file with comments | « mash/browser_driver/browser_driver_application_delegate.h ('k') | mash/browser_driver/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698